# tensorplay.cuda.current_stream

Source: https://www.tensorplay.cn/docs/generated/tensorplay.cuda.current_stream.html

# tensorplay.cuda.current_stream

tensorplay.cuda.current_stream(device: [Any](https://docs.python.org/3/library/typing.html#typing.Any) | [None](https://docs.python.org/3/library/constants.html#None) = None) &#x2192; [Stream](tensorplay.cuda.streams.Stream.html#tensorplay.cuda.streams.Stream)[[source]](../_modules/tensorplay/cuda.html#current_stream)

Return the currently selected Stream for a given device.

Parameters:

device ([tensorplay.Device](tensorplay.Device.html#tensorplay.Device) or [int](https://docs.python.org/3/library/functions.html#int), optional) – selected device. Returns
the currently selected Stream for the current device, given
by [current_device()](tensorplay.cuda.current_device.html#tensorplay.cuda.current_device), if [device](tensorplay.cuda.device.html#tensorplay.cuda.device) is None
(default).
