current_stream¶
- paddle.device. current_stream ( device=None ) [source]
-
Return the current stream by the device. :param device: The device which want to get stream from. If device is None, the device is the current device. Default: None.
It can be
gpu
,gpu:x
,``custom_device``,custom_device:x
, wherecustom_device
is the name of CustomDevicec, wherex
is the index of the GPUs, CustomDevicecs. And it can be paddle.CUDAPlace(n) or paddle.CustomPlace(n).- Returns
-
The stream to the device.
- Return type
-
Stream
Examples