torch.cuda.current_stream#
- torch.cuda.current_stream(device=None)[原始碼]#
返回給定裝置的當前選定的
Stream。- 引數
device (torch.device 或 int, 可選) – 選定的裝置。如果
device為None(預設值),則返回當前裝置(由current_device()指定)的當前選定的Stream。- 返回型別
返回給定裝置的當前選定的 Stream。
device (torch.device 或 int, 可選) – 選定的裝置。如果 device 為 None(預設值),則返回當前裝置(由 current_device() 指定)的當前選定的 Stream。