torch.mps.set_rng_state torch.mps.set_rng_state(new_state, device='mps') Sets the random number generator state. Parameters: new_state (torch.ByteTensor) – The desired state device () – The device to set the RNG state. Default: (i.e., , the current MPS device).