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