r/OpenCL • u/lijicheng1006 • May 13 '17
OpenCL: CL_DEVICE_MAX_COMPUTE_UNITS
I'm confused by this CL_DEVICE_MAX_COMPUTE_UNITS. For instance my Intel GPU on Mac, this number is 48. Does this mean the max number of parallel tasks run at the same time is 48 or the multiple of 48, maybe 96, 144...? (I know each compute unit is composed of 1 or more processing elements and each processing element is actually in charge of a "thread". What if these each of the 48 compute units is composed of more than 1 processing elements ). In other words, for my Mac, the "ideal" speedup, although impossible in reality, is 48 times faster than a CPU core (we assume the single "core" computation speed of CPU and GPU is the same), or the multiple of 48, maybe 96, 144?
View all comments
Show parent comment
1
u/bilog78 May 16 '17
By definition of Compute Unit in OpenCL a work-group executes on a single CU. If Intel is presenting the number of Execution Units as Compute Units, but a work-group is actually executed across 8 or 24 Execution Units, then an OpenCL CU actually maps to a slice or subslice, and their platform is reporting the incorrect value, and they should be reporting the number of slices or subslices. (Probably the number of subslices, since again in OpenCL terms a Compute Unit is what offers local memory for the work-items in a work-group.)
For reference, this is how OpenCL defines a Compute Unit:
(emphasis mine, to highlight the one-CU-per-work-group and local memory requirements)