[Refactor]Abstract Platform Interface for Distributed Backend and Add xccl Support for Intel XPU (#19410)

Signed-off-by: dbyoung18 <yang5.yang@intel.com>
Signed-off-by: Kunshang Ji <kunshang.ji@intel.com>
Co-authored-by: Kunshang Ji <kunshang.ji@intel.com>
This commit is contained in:
Yang Yang
2025-07-07 04:32:32 +00:00
committed by GitHub
co-authored by Kunshang Ji
parent 47db8c2c15
commit 6e2c19ce22
17 changed files with 44 additions and 8 deletions
+6
View File
@@ -1886,6 +1886,12 @@ def supports_dynamo() -> bool:
return base_torch_version >= Version("2.4.0")
# Supports xccl with PyTorch versions >= 2.8.0 for XPU platform
def supports_xccl() -> bool:
return is_torch_equal_or_newer(
"2.8.0") and torch.distributed.is_xccl_available()
# Some backends use pytorch version < 2.4.0 which doesn't
# support `torch.library.custom_op`.
def supports_custom_op() -> bool: