Function c10::cuda::getCurrentCUDAStream¶
Defined in File CUDAStream.h
Function Documentation¶
-
CUDAStream c10::cuda::getCurrentCUDAStream(DeviceIndex device_index = -1)¶
Get the current CUDA stream, for the passed CUDA device, or for the current device if no device index is passed.
The current CUDA stream will usually be the default CUDA stream for the device, but it may be different if someone called ‘setCurrentCUDAStream’ or used ‘StreamGuard’ or ‘CUDAStreamGuard’.