torch.xpu.current_stream¶
- torch.xpu.current_stream(device=None)[源代码]¶
返回给定设备当前选定的
Stream。- 参数
device (torch.device 或 int,可选) – 选择的设备。如果
device为None(默认值),则返回由current_device()给出的当前设备的当前选定Stream。- 返回类型
返回给定设备当前选定的 Stream。
device (torch.device 或 int,可选) – 选择的设备。如果 device 为 None(默认值),则返回由 current_device() 给出的当前设备的当前选定 Stream。