OpenCL* for CPU
Ask questions and share information on Intel® SDK for OpenCL™ Applications and OpenCL™ implementations for Intel® CPU
Announcements
This forum covers OpenCL* for CPU only. OpenCL* for GPU questions can be asked in the GPU Compute Software forum. Intel® FPGA SDK for OpenCL™ questions can be ask in the FPGA Intel® High Level Design forum.
1663 Discussions

Are there *any* circumstances that will implicitly allocate shared local memory?

allanmac1
Beginner
117 Views

I'm curious if there are any circumstances that will result in an implicit increase in a kernel workgroup's shared memory requirements?

For example, do the workgroup (or subgroup) functions like scan or reduce quietly "reserve" SLM?

If there are any circumstances where this might happen on SB, IVB, HSW or BDW then could you list them?

 

0 Kudos
2 Replies
Robert_I_Intel
Employee
117 Views

Allan,

The following functions do implicitly reserve SLM on BDW, since all of them are OpenCL 2.0 functions:

work_group_broadcast()

work_group_any()

work_group_all()

work_group_reduce<op>()

work_group_scan_inclusive<op>()

work_group_scan_exclusive<op>()

 

The amount of reserved local memory varies per function, for example broadcast / any / all require l...

We currently use implicit SLM in the implementation, but things could always change in the future.

allanmac1
Beginner
117 Views

Perfect, that makes sense.

I'll assume clGetKernelWorkGroupInfo(CL_KERNEL_LOCAL_MEM_SIZE) will properly report the extra SLM in use.

Thanks for the clarification.

 

Reply