CUDA Event Kajanan told me about this. Resources https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__EVENT.html https://pytorch.org/docs/stable/generated/torch.cuda.Event.html