[XPU] check is_xccl_available before oneccl warmup (#39302)

Signed-off-by: Xinyu Chen <xinyu1.chen@intel.com>
This commit is contained in:
Xinyu Chen
2026-04-10 03:42:17 +08:00
committed by GitHub
parent 2800706f06
commit a8134aef4e

View File

@@ -86,6 +86,7 @@ class XPUWorker(Worker):
) )
# global all_reduce needed for overall oneccl warm up # global all_reduce needed for overall oneccl warm up
if torch.distributed.is_xccl_available():
torch.distributed.all_reduce(torch.zeros(1).xpu()) torch.distributed.all_reduce(torch.zeros(1).xpu())
# Set random seed. # Set random seed.