How to get the number of cores per computing unit

Hello,

I want to know the number of core per unit to limit batch size.
Having the number of computing unit is quite simple, but i found nothing on the number of cores.
I know that it is possible to know it in cuda but how to do that in openCL?

Sincerely

Can you describe what you mean by “batch size”?

As for “core”, it is a marketing term with no clear definition from an engineering viewpoint. What is called a “core” on one device may not have any relationship with what is called “core” on another device. That’s why the term is avoided in the OpenCL specification.

I mean by batch size the globalWorkSize.
For exemple when you have an eavy task to run (eg : globalWorkSize = 1 000 000 vertices to process), you can execute it by running the kernel in a loop with batchSize < globalWorkSize with an offset given to the kernel to avoid the kernel being killed when a display is attached to your graphic card.

I mean by core the number of processor unit by computing unit. In cuda it refers to cuda cores.

Sincerelly

If by batch size you mean the warp size in cuda devices or the wavefront size in ati/amd devices, you can typically get them by looking at the CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE property of a (compiled) kernel for the device.