torch.xpu.manual_seed_all¶ torch.xpu.manual_seed_all(seed)[源码][源码]¶ 为所有 XPU 设备设置生成随机数的种子。 如果 XPU 不可用,调用此函数是安全的;在这种情况下,它将被静默忽略。 参数 seed (int) – 期望的种子。