torch.cuda.set_rng_state — PyTorch 2.7 documentation (original) (raw)
torch.cuda.set_rng_state(new_state, device='cuda')[source][source]¶
Set the random number generator state of the specified GPU.
Parameters
new_state (torch.ByteTensor) – The desired state
device (torch.device or int, optional) – The device to set the RNG state. Default:
'cuda'
(i.e.,torch.device('cuda')
, the current CUDA device).
To analyze traffic and optimize your experience, we serve cookies on this site. By clicking or navigating, you agree to allow our usage of cookies. As the current maintainers of this site, Facebook’s Cookies Policy applies. Learn more, including about available controls: Cookies Policy.