torch.cpu ¶
译者:片刻小哥哥
该包实现了“torch.cuda”中的抽象,以方便编写与设备无关的代码。
current_stream |
返回给定设备当前选择的 Stream 。 |
is_available |
返回一个布尔值,指示 CPU 当前是否可用。 |
synchronize |
等待 CPU 设备上所有流中的所有内核完成。 |
stream |
围绕选择给定流的上下文管理器 StreamContext 的包装。 |
device_count |
返回 CPU 设备(不是核心)的数量。 |
StreamContext |
选择给定流的上下文管理器。 |
流和事件 ¶
Stream |
注意: |