torch.mtia.stream¶ torch.mtia.stream(stream)[原始碼][原始碼]¶ 包裝 Context-manager StreamContext,用於選擇給定的流。 引數 stream (Stream) – 選定的流。如果為 None,此管理器將無效(no-op)。 返回型別 StreamContext 注意 在 eager 模式下,流是 Stream 類型別,而在 JIT 中不支援 torch.mtia.stream。