Local memory from OpenCL on imx6q

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Local memory from OpenCL on imx6q

671 Views
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 Kudos
2 Replies

460 Views
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 Kudos

460 Views
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 Kudos