cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

dstokac
Journeyman III

IL equivalent of get_global_size(0)

Is there an IL equivalent of the get_global(local)_size(0) command from OpenCL?
Thanks!
P.S.
Tried to get .il files by exporting GPU_DUMP_DEVICE_KERNEL=3, but it didn't
work. Any idea why?

0 Likes
3 Replies

There are similar IL registers, but they are not equivalent in all cases. The registers are vAbsTid, vThreadGrpId, and vTidInGrp an they can be found in the Intermediate Language spec.
0 Likes

Micah, I am aware of thread ID registers, but I would like to know in my kernel the total number of threads without using e.g. constant memory to provide that information to the kernel.

0 Likes

That is not currently possible, even in OpenCL this information is passed via a constant buffer from the runtime to the kernel.
0 Likes