OpenCL: query number of processing elements

纵然是瞬间 提交于 2019-11-28 05:55:03

问题


Is it possible to query the number of processing elements (per compute unit) in OpenCL? If yes, how? I did not find a corresponding parameter on the clGetDeviceInfo doc page.

I am not sure if processing element is standard terminology. I got the term from this video.

I'd like to query this information because I am curious, not for a practical purpose.


回答1:


Processing element (PE) is the standard terminology and no you cannot query the number.

Now I see some reasons why it's not possible:

  1. The definition itself:

    PE: A virtual scalar processor. A work-item may execute on one or more processing elements.

    So depending on the architecture the number that would be returned would be more or less meaningless. I think for instance to the previous architecture of AMD GPUs which used VLIW processors.

  2. PE is an abstraction that is most useful in the standard to illustrate/define some concepts see for instance the definitions given to SIMD, SPMD and of course the Platform Model. But this concept is not used in practice (though very useful to know by the developer to achieve good performance). You will care instead about the max number of work-items in a work-group.

  3. Even within an given architecture the processing elements are of different types. For example if we take the GK110 Kepler Architecture an SMx (the equivalent of the Compute Unit) has 192 SP CUDA cores, 64 DP units, 32 special function units (SFU). So what should be the returned number of a query asking for the number of PE?



来源:https://stackoverflow.com/questions/21170154/opencl-query-number-of-processing-elements

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