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