Profiling pytorch on GPU: synchronization issue


(handesy) #1

I was wondering how I could enforce synchronization for all cuda operations when profiling on GPU (in order to find the operations/function calls that are slow). Thanks!


(Solomon K ) #2

I think:

torch.cuda.synchronize()