torch.mtia.stream¶ torch.mtia.stream(stream)[源代码][源代码]¶ 围绕上下文管理器 StreamContext 封装,用于选择给定的流。 参数 stream (Stream) – 选择的流。如果为 None,则此管理器不执行任何操作。 返回类型 StreamContext ..Note:: 在 eager 模式下,stream 的类型为 Stream 类,而在 JIT 中,它不支持 torch.mtia.stream