Shortcuts

Function c10::cuda::getStreamFromPool(const bool, DeviceIndex)

Function Documentation

CUDAStream c10::cuda::getStreamFromPool(const bool isHighPriority = false, DeviceIndex device = -1)

Get a new stream from the CUDA stream pool.

You can think of this as “creating” a new stream, but no such creation actually happens; instead, streams are preallocated from the pool and returned in a round-robin fashion.

You can request a stream from the high priority pool by setting isHighPriority to true, or a stream for a specific device by setting device (defaulting to the current CUDA stream.)

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