Function c10::cuda::setCurrentCUDAStream#
Defined in File CUDAStream.h
Function Documentation#
-
void c10::cuda::setCurrentCUDAStream(CUDAStream stream)#
Set the current stream on the device of the passed in stream to be the passed in stream.
Yes, you read that right: this function has nothing to do with the current device: it toggles the current stream of the device of the passed stream.
Confused? Avoid using this function; prefer using ‘CUDAStreamGuard’ instead (which will switch both your current device and current stream in the way you expect, and reset it back to its original state afterwards).