Local memory from OpenCL on imx6q

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Local memory from OpenCL on imx6q

677 次查看
aballier
Contributor I

Is it possible to make use of the 1kB local memory from OpenCL on the imx6q ?

The i.MX Graphics User’s Guide states:

> if local memory type is CL_GLOBAL, the local memory is emulated using global memory

And that is exactly what I have here (with imx-gpu-viv_6.2.4.p1.6 drivers). Initial benchmarks show that there is no gain (or rather a performance loss) when trying to use local from OpenCL, and that the 1kB limit does not apply.

Is there some option to change the local memory type ? How is this cache used in the case local memory is emulated by global memory ?

0 项奖励
2 回复数

466 次查看
igorpadykov
NXP Employee
NXP Employee

Hi Alexis

the OpenCL Embedded Profile specification defines the minimum requirement for local
memory to be 1KB to pass conformance testing. Based on algorithm analysis and profiling
different image and computer vision algorithms, it was found that a 1KB local memory size
was too small to benefit those algorithms. In most cases, those algorithms actually slowed
down when using 1KB local memory. To increase performance recommended not using
local memory since it is more efficient to transfer larger chunks of data from system memory
to keep the OpenCL pipeline full.

If local memory type is CL_GLOBAL, the local memory is emulated using global memory,
and the performance will be the same as global memory. There is extra overhead on data
copy from global to local, which will slow down the performance.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励

466 次查看
aballier
Contributor I

Hi Igor,

Yes, I had read this in the graphics user guide. My question is about what is not covered in the guide: How can I get local memory type to be CL_LOCAL instead of CL_GLOBAL ? What happens to this 1kB memory in case it is CL_GLOBAL ?

Bests,

Alexis.

0 项奖励