torch.xpu.current_stream¶ torch.xpu.current_stream(device=None)[原始碼][原始碼]¶ 返回給定設備目前選定的 Stream 。 參數 device (torch.device 或 int, 可選) – 選定的設備。如果 device 為 None (預設),則返回由 current_device() 給定的目前設備所選定的 Stream 。 返回類型 Stream