torch.mtia.current_stream#
- torch.mtia.current_stream(device=None)[源代码]#
返回给定设备的当前选定
Stream
。- 参数
device (torch.device 或 int, optional) – 选定的设备。如果
device
为None
(默认),则返回当前设备上通过current_device()
获取的当前选定Stream
。- 返回类型
返回给定设备的当前选定 Stream
。
device (torch.device 或 int, optional) – 选定的设备。如果 device
为 None
(默认),则返回当前设备上通过 current_device()
获取的当前选定 Stream
。