Rate this Page

torch.cuda.current_stream#

torch.cuda.current_stream(device=None)[source]#

Return the currently selectedStream for a given device.

Parameters

device (torch.device orint,optional) – selected device. Returnsthe currently selectedStream for the current device, givenbycurrent_device(), ifdevice isNone(default).

Return type

Stream