Nvidia Cuda 是否会扭曲 Scheduler 产量?
我已经阅读了 Cuda 编程指南,但仍然不清楚扭曲是否会屈服于其他准备执行的扭曲?请问有什么解释或指示吗?如果是,在什么条件下会产生翘曲?
I have gone through Cuda programming guide but still not clear whether a warp will yield in favor of other ready-to-execute warp? Any explanation or pointer please? If yes, in what condition does a warp yield?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,片上调度程序交错执行扭曲。有意未指定调度策略,因为调度策略可能会改变。 NVIDIA 不希望 CUDA 开发人员编写依赖当前调度策略但在较新的 GPU 上失败的代码。
一般来说,拥有多个warp的目的是,当一个线程等待指令完成执行时,另一个线程可以准备好执行而无需等待。因此,当执行全局加载或慢速浮点运算等长延迟指令时,很可能会产生扭曲。某些架构(例如 Fermi)会同时执行多个扭曲 ( http:// www.nvidia.com/content/PDF/fermi_white_papers/NVIDIA_Fermi_Compute_Architecture_Whitepaper.pdf 第 10 页)。
Yes, the on-chip scheduler interleaves the execution of warps. The scheduling policy is intentionally left unspecified, because the scheduling policy may be changed. NVIDIA does not want CUDA developers to write code that relies on the current scheduling policies but fails on newer GPUs.
Generally speaking, the purpose of having multiple warps is that while one thread waits for an instruction to finish executing, another thread may be ready to execute without waiting. So it is likely that a warp will yield when a long-latency instruction such as a global load or a slow floating-point operation is executed. Some architectures, such as Fermi, execute multiple warps at the same time ( http://www.nvidia.com/content/PDF/fermi_white_papers/NVIDIA_Fermi_Compute_Architecture_Whitepaper.pdf page 10).