torch.xpu.stream torch.xpu.stream(stream)[源代码] 使用上下文管理器 StreamContext 来选择指定的流。 参数 stream (Stream) – 选定的流。如果为None,则该管理器不会执行任何操作。 返回类型 StreamContext