OpenCL-Docs icon indicating copy to clipboard operation
OpenCL-Docs copied to clipboard

Clarify CL_DEVICE_LOCAL_MEM_SIZE

Open Pennycook opened this issue 1 year ago • 0 comments

The definition of CL_DEVICE_LOCAL_MEM_SIZE is given as:

Size of local memory region in bytes. The minimum value is 32 KB for devices that are not of type CL_DEVICE_TYPE_CUSTOM.

I think the meaning of "local memory region" here is ambiguous, because it could refer to either:

  1. The size of the physical local memory present in each compute unit; or
  2. The maximum amount of local memory available to a single work-group.

Based on the behavior of existing implementations, it seems that the intent is 2). Wording like the following would be clearer:

Maximum amount of local memory available to each work-group, in bytes. The minimum value is 32 KB for devices that are not of type CL_DEVICE_TYPE_CUSTOM.

Pennycook avatar Dec 13 '24 17:12 Pennycook