torch.cuda.current_stream
- torch.cuda.current_stream(device=None)[source][source]
返回给定设备当前选中的
Stream
- 参数:
device (torch.device 或 int,可选) – 选择设备。返回当前设备所选的
Stream
,给定由current_device()
,如果device
是None
(默认)。- 返回类型:
返回给定设备当前选中的 Stream
device (torch.device 或 int,可选) – 选择设备。返回当前设备所选的 Stream
,给定由 current_device()
,如果 device
是 None
(默认)。