torch.accelerator.current_stream¶
- torch.accelerator.current_stream(device=None, /)[原始碼][原始碼]¶
傳回指定裝置目前選取的串流。
- 參數
device (
torch.device
, str, int, optional) – 給定的裝置,必須符合目前的 加速器 裝置類型。如果未給定,預設使用torch.accelerator.current_device_index()
。- 傳回
指定裝置目前選取的串流。
- 傳回類型