Files
pytorch/docs/source/cpu.rst
wz337 a614281ea9 Add current_device() to torch.cpu (#110987)
Better support device agnostic, add a "cpu" return for `current_device()` in torch.cpu so that we won't run into `AttributeError: module 'torch.cpu' has no attribute 'current_device'`.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/110987
Approved by: https://github.com/wanchaol
2023-10-11 05:13:10 +00:00

26 lines
406 B
ReStructuredText

torch.cpu
===================================
.. automodule:: torch.cpu
.. currentmodule:: torch.cpu
.. autosummary::
:toctree: generated
:nosignatures:
current_device
current_stream
is_available
synchronize
stream
set_device
device_count
StreamContext
Streams and events
------------------
.. autosummary::
:toctree: generated
:nosignatures:
Stream