cudacuda-events

Can a CUDA event be fired from device-side code?


Is there any way to fire an event (for benchmarking purposes, similar to cudaEvents in the CPU code) from a device kernel in CUDA?

E.g. suppose I would like to measure the time passed from kernel start to the first thread ever that starts a computation and the time passed from the last thread that leaves the computation to the CPU return.

Can I do that?


Solution

  • The device runtime API (used with dynamic parallelism) does have limited stream and events support, but event timing is not supported.

    So, no you can't do that.