Skip to content

Commit a3aca9e

Browse files
committed
fix(xpu): remove XPU_CCL_BACKEND
Signed-off-by: dbyoung18 <yang5.yang@intel.com>
1 parent 28e5118 commit a3aca9e

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

vllm/platforms/__init__.py

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -138,30 +138,18 @@ def xpu_platform_plugin() -> Optional[str]:
138138
logger.debug("Checking if XPU platform is available.")
139139
try:
140140
# installed IPEX if the machine has XPUs.
141-
# detect dist_backend
142-
import os
143-
144141
import intel_extension_for_pytorch # noqa: F401
145142
import torch
146143
if supports_xccl():
147-
default_backend = "xccl"
144+
dist_backend = "xccl"
148145
else:
149-
logger.debug("xccl is not available.")
150-
default_backend = "ccl"
151-
detect_backend = os.getenv("XPU_CCL_BACKEND", default_backend)
152-
153-
if detect_backend not in ["xccl", "ccl"]:
154-
raise ValueError(
155-
f"Unknown {detect_backend} backend for XPU platform.")
156-
157-
if detect_backend == "ccl":
158-
logger.debug("Checking if ccl is available.")
146+
dist_backend = "ccl"
159147
import oneccl_bindings_for_pytorch # noqa: F401
160148

161149
if hasattr(torch, 'xpu') and torch.xpu.is_available():
162150
is_xpu = True
163151
from vllm.platforms.xpu import XPUPlatform
164-
XPUPlatform.dist_backend = detect_backend
152+
XPUPlatform.dist_backend = dist_backend
165153
logger.debug("Confirmed %s backend is available.",
166154
XPUPlatform.dist_backend)
167155
logger.debug("Confirmed XPU platform is available.")

0 commit comments

Comments
 (0)