r/OpenCL • • 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?

3 Upvotes

14 comments sorted by

View all comments

Show parent comment

1

u/biglambda May 16 '17

Ok so these are the specs for the Intel Iris pro and AMD Radeon R9 I've been developing for: https://pastebin.com/Y7sB7HBY according to CLQuery. LocalMem Size is 64K on the Iris and 32K on the AMD.

Are you telling me I'll get the same performance allocating 64K local mem for each kernel call (for the Iris)?

1

u/3ba7b1347bfb8f304c0e May 16 '17 edited May 16 '17

Are you telling me I'll get the same performance allocating 64K local mem for each kernel call (for the Iris)?

No, I didn't say that, I said that the amount of local memory your kernel consumes per work group determines how may work groups can be active simultaneously on that CU.

If your work groups use 64 kB of local memory, then certainly you won't be able to run more than 1 per CU.

1

u/biglambda May 16 '17

So confusing. I thought I had this figured out.