How does Thrust know how to automatically configure the kernels it launches?

北战南征 提交于 2019-12-10 15:59:39

问题


Thrust is able to hide a variety of details from the coder and it is claimed that Thrust sets the parameters to some degree with respect to the system specifications. How does Thrust choose the best parameterization and how does it handle a variety of codes in different machines? What is Thrust's approach to implementing such a generic library?


回答1:


Thrust uses a heuristic which attempts to maximize the potential occupancy of the CUDA kernels it launches.

A standalone version of the heuristic Thrust uses is here:

https://github.com/jaredhoberock/cuda_launch_config



来源:https://stackoverflow.com/questions/16749794/how-does-thrust-know-how-to-automatically-configure-the-kernels-it-launches

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!