torch.xpu.stream¶ torch.xpu.stream(stream)[source][source]¶ 包裹一个上下文管理器 StreamContext,用于选择给定的流。 参数 stream (Stream) – 选定的流。如果此管理器为 None,则它是一个空操作 (no-op)。 返回类型 StreamContext