Files
pytorch/docs
Yu, Guangye 9b498d3bb2 Update docs for torch.device (#156686)
# Motivation
Update the doc, to make `torch.device`'s constructor officially support the following methods:
- A device string, which is a string representation of the device type and optionally the device ordinal.
- A device type and a device ordinal.
- A device ordinal, which is treated as the current accelerator type.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/156686
Approved by: https://github.com/albanD
2025-06-25 02:12:36 +00:00
..
2019-10-08 12:18:30 -07:00
2020-05-21 13:03:55 -07:00

Please see the Writing documentation section of CONTRIBUTING.md for details on both writing and building the docs.