OpenCL:查询处理元素数 [英] OpenCL: query number of processing elements

查看:82
本文介绍了OpenCL:查询处理元素数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在OpenCL中查询处理元素的数量(每个计算单元)?如果是,怎么办?我在 文档页面.

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.

推荐答案

处理元素(PE)是标准术语,不,您不能查询该数字.

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. 定义本身:

  1. The definition itself:

PE:虚拟的标量处理器.一个工作项目可以在一个或多个上执行 处理元素.

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

因此,根据体系结构,将返回的数字或多或少是没有意义的.我认为例如以前使用VLIW处理器的AMD GPU的体系结构.

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.

PE是标准中最有用的抽象,它用于说明/定义一些概念,例如,请参见SIMD,SPMD和平台模型的定义.但是这个概念在实践中并没有使用(尽管对于开发人员了解以达到良好的性能非常有用).您将改为关注工作组中工作项的最大数量.

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.

即使在给定的体系结构中,处理元素也属于不同的类型.例如,如果我们采用 GK110开普勒架构一个SMx(相当于计算单元)具有192个SPCUDA内核,64个DP单元,32个特殊功能单元(SFU).那么,查询返回PE数量的查询的返回数字应该是什么?

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?

这篇关于OpenCL:查询处理元素数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆