Aliases in torch.xpu#
Created On: Sep 21, 2025 | Last Updated On: Sep 21, 2025
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
.
get_rng_state |
Return the random number generator state of the specified GPU as a ByteTensor. |
get_rng_state_all |
Return a list of ByteTensor representing the random number states of all devices. |
initial_seed |
Return the current random seed of the current GPU. |
manual_seed |
Set the seed for generating random numbers for the current GPU. |
manual_seed_all |
Set the seed for generating random numbers on all GPUs. |
seed |
Set the seed for generating random numbers to a random number for the current GPU. |
seed_all |
Set the seed for generating random numbers to a random number on all GPUs. |
set_rng_state |
Set the random number generator state of the specified GPU. |
set_rng_state_all |
Set the random number generator state of all devices. |