cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

tofic
Journeyman III

Access to the clock register on GPU

I need to do some granular profiling of huge kernels. Nvidia provides an access to its clock register via inline assembler:

uint clock_time()
{
   
uint clock_time;
   
asm("mov.u32 %0, %%clock;" : "=r"(clock_time));
   
return clock_time;
}

Is there a similar  possibility to get the current time/clock within the kernel on AMD/ATI GPUs?

0 Likes
3 Replies
realhet
Miniboss

Hi,

Here is a topic http://devgurus.amd.com/message/1287882#1287882 that tries to get some information on how to exchange register data between OCL and AMD_IL. But seems like there is no way to do it from OCL.

Maybe there is no register mapping at all, just an inline asm block alone o.O. Or maybe it's super secret

0 Likes
himanshu_gautam
Grandmaster

I will ask someone relevant about this, and let you know. Thanks

0 Likes

Currently the clock counters are not exposed in OpenCL. It may be exposed in future via a OpenCL extension, depending on the priorities.

0 Likes