Shortcuts

Function c10::cuda::getCurrentCUDAStream

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’.

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources