Remotery:
Remove CUDA context push/pop around all CUDA calls as cuCtxPopCurrent is quite expensive (order of milliseconds). Not sure if it's creating some kind of sync point.