1

i am trying to use local memory in my OpenCL kernel.

Following lists are related information.

Device info

GPU: Qualcomm Adreno 420
local memory size: 32768Bytes = 32KB
max work group size: 1024

kernel info A (without local memory usage)

CL_KERNEL_WORK_GROUP_SIZE=1024
CL_KERNEL_LOCAL_MEM_SIZE=0 Bytes

kernel info B (with local memory usage)

CL_KERNEL_WORK_GROUP_SIZE=224
CL_KERNEL_LOCAL_MEM_SIZE=2048 Bytes

Difference between kernel A and B is just usage of local memory. what makes this situation?

if this is register problem, then CL_KERNEL_WORK_GROUP_SIZEof kernel A should be lower than 1024.

I really want to check register usage, but i can't.

I believe that i have enough local memory, global memory.

Please help.

eclipse0922
  • 158
  • 2
  • 15
  • 3
    The source of the kernels in question would help. – fjarri Jun 12 '15 at 04:08
  • 1
    It's also worth querying `CL_KERNEL_PRIVATE_MEM_SIZE`, which is similar to register usage. – jprice Jun 12 '15 at 09:18
  • 1
    possible dupe (hard to spot) of [this](http://stackoverflow.com/questions/27074906/determine-limiting-factor-of-opencl-workgroup-size/27086317#27086317) – Baiz Jun 12 '15 at 12:56
  • 1
    When you added local memory did you also add synchronization? The hardware may be better able to manage large work groups if it can serialize them. Alternatively, accessing local memory may require registers and that would then affect the workgroup size. – Lee Jun 12 '15 at 17:42

0 Answers0