torch.accelerator.current_stream#
- torch.accelerator.current_stream(device=None, /)[原始碼]#
返回指定裝置的當前選定流。
- 引數
device (
torch.device, str, int, optional) – 指定的裝置,該裝置必須與當前的 accelerator 裝置型別相匹配。如果未給出,則預設使用torch.accelerator.current_device_index()。- 返回
指定裝置的當前選定流。
- 返回型別