torch.xpu.current_stream¶
- torch.xpu.current_stream(device=None)[源代码]¶
返回给定设备的当前选定的
Stream
。- Parameters
设备 (torch.device 或 int, 可选) – 选择的设备。返回当前选择的
Stream
对于当前设备,由current_device()
给出,如果device
是None
(默认)。- Return type
返回给定设备的当前选定的Stream
。
设备 (torch.device 或 int, 可选) – 选择的设备。返回当前选择的 Stream
对于当前设备,由 current_device()
给出,如果 device
是 None
(默认)。