Clock() function in Optix

Hi there, the function clock() is a CUDA function, and there’s a CUDA sample demonstrating how to use it properly in the CUDA SDK samples named 0_Simple/clock_nvrtc. Documentation is here: https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#time-function

The docs mention that cudaDevAttrClockRate() returns the peak clock rate in kilohertz, which might not the be your current clock rate. You can lock your clock rate to a specific value for profiling and timings using nvidia-smi.


David.