From 755f026ea5b1ce7df2c4b00762151fd349e69346 Mon Sep 17 00:00:00 2001 From: "Han, Chao1" Date: Thu, 5 Jun 2025 21:12:41 +0800 Subject: [PATCH] Ensure XCCL is the default backend for XPU --- torch/distributed/distributed_c10d.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torch/distributed/distributed_c10d.py b/torch/distributed/distributed_c10d.py index 4b25bf3ea523..23d4640253e1 100644 --- a/torch/distributed/distributed_c10d.py +++ b/torch/distributed/distributed_c10d.py @@ -340,7 +340,7 @@ def register_backend( if devices is not None: for device in devices: - if device != "cpu" and device != "cuda": + if device not in Backend.default_device_backend_map: Backend.default_device_backend_map[device] = name.lower() Backend.backend_type_map[name.lower()] = ProcessGroup.BackendType.CUSTOM