Files
pytorch/docs/source/xpu.aliases.md
Jiannan Wang 6ac2b3ae35 [BE] Adding aliases for CUDA and XPU API documentation (#162984)
This PR reorganizes CUDA and XPU API documentation with additional aliases pages. Multiple entries of APIs under torch.cuda are thus removed.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/162984
Approved by: https://github.com/janeyx99
2025-09-21 22:28:27 +00:00

768 B

Aliases in torch.xpu

The following are aliases to their counterparts in torch.xpu in the nested namespaces in which they are defined. For any of these APIs, feel free to use the top-level version in torch.xpu like torch.xpu.seed or the nested version torch.xpu.random.seed.

.. automodule:: torch.xpu.random
.. currentmodule:: torch.xpu.random
.. autosummary::
    :toctree: generated
    :nosignatures:

    get_rng_state
    get_rng_state_all
    initial_seed
    manual_seed
    manual_seed_all
    seed
    seed_all
    set_rng_state
    set_rng_state_all
.. automodule:: torch.xpu.streams
.. currentmodule:: torch.xpu.streams
.. autosummary::
    :toctree: generated
    :nosignatures:

    Event
    Stream