W3cubDocs

/PyTorch 2.9

torch.xpu.set_rng_state_all

torch.xpu.set_rng_state_all(new_states) [source]

Set the random number generator state of all devices.

Parameters

new_states (Iterable of torch.ByteTensor) – The desired state for each device.

© 2025, PyTorch Contributors
PyTorch has a BSD-style license, as found in the LICENSE file.
https://docs.pytorch.org/docs/2.9/generated/torch.xpu.set_rng_state_all.html