目录

torch.cpu

This package implements abstractions found in torch.cuda to facilitate writing device-agnostic code.

current_stream

Returns the currently selected Stream for a given device.

is_available

Returns a bool indicating if CPU is currently available.

synchronize

Waits for all kernels in all streams on the CPU device to complete.

stream

Wrapper around the Context-manager StreamContext that selects a given stream.

device_count

Returns number of CPU devices (not cores).

StreamContext

Context-manager that selects a given stream.

Streams and events

Stream

N.B.

文档

访问 PyTorch 的全面开发人员文档

查看文档

教程

获取面向初学者和高级开发人员的深入教程

查看教程

资源

查找开发资源并解答您的问题

查看资源