torch.cpu.current_stream¶ torch.cpu.current_stream(device=None)[source][source]¶ 返回给定设备的当前选定 Stream。 参数 device (torch.device 或 int, 可选) – 已忽略。 返回类型 Stream 注意:此函数仅用于方便设备无关的代码