Function c10::cuda::getStreamFromPool(const bool, DeviceIndex)¶
Defined in File CUDAStream.h
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.)