warp.get_stream#

warp.get_stream(device=None)[source]#

Return the stream currently used by the given device.

Parameters:

device (Device | str | None) – An optional Device instance or device alias (e.g. “cuda:0”) for which the current stream will be returned. If None, the default device will be used.

Raises:

RuntimeError – The device is not a CUDA device.

Return type:

Stream