Thanks for sharing the code! CUDA operations are executed asynchronously so you would need to synchronize the code via torch.cuda.synchronize()
before starting and stopping the timers.
Thanks for sharing the code! CUDA operations are executed asynchronously so you would need to synchronize the code via torch.cuda.synchronize()
before starting and stopping the timers.