How to time CUDA Event

Hi,

In CUDA C, you can time how long GPU ran by using event, this will record the time for just GPU running time, which does not include data transfer. Is there a similar functionality in CuArray or other GPU packages?

CUDAdrv wraps the event API. You can use CUDAdrv.@elapsed to automatically enqueue events before and after code and return the elapsed time between both. Or manually construct CuEvents and call record/synchronize/elapsed on them.

Thank you! Is there any difference in reporting between the two methods?

No, one is built on top of the other: CUDAdrv.jl/events.jl at 2a77dff0eaad0df12abd8cf05e73b3f9d5968ad5 · JuliaGPU/CUDAdrv.jl · GitHub