PDA

View Full Version : Controling register usage through clBuildProgram?



coleb
01-07-2010, 10:19 AM
Is there any way to control how much register space a kernel uses? My goal is to increase the CL_KERNEL_WORK_GROUP_SIZE value reported by my kernel to increase parallelism to hide memory latencies.

Thanks,
Brian

dbs2
01-11-2010, 06:06 AM
Besides reducing the complexity of your kernel (and any private variables/arrays) you would have to be able to tell the compiler to make a different optimization tradeoff. There are no standard compiler flags for doing this, but the Nvidia driver does have a few custom ones which might include such options.

coleb
01-11-2010, 10:42 AM
Are those custom NVidia flags documented anywhere? I know the PTX assembler has maxrregcount. But how to pass that through the OpenCL implementation?

Thanks,
Brian

dbs2
01-11-2010, 07:10 PM
I'd take a look at the Nvidia OpenCL guide, but that's only a guess.