torch.xpu.set_rng_state_all torch.xpu.set_rng_state_all(new_states)[源代码] 为所有设备设置随机数生成器的状态。 参数 new_states (Iterable of torch.ByteTensor) – 每个设备的新状态。