[XPU] Adapt device agnostic API usage (#32093)

Co-authored-by: mingfeima <mingfei.ma@intel.com>
This commit is contained in:
ANSHUMAN TRIPATHY
2026-09-11 10:03:12 +08:00
committed by GitHub
co-authored by mingfeima
parent 67d3a2ea57
commit 2adb2e8485
4 changed files with 115 additions and 73 deletions
+2 -1
View File
@@ -28,6 +28,7 @@ from sglang.srt.runtime_context import (
get_server_args,
get_serving,
)
from sglang.srt.utils import get_device
# -------------------------------------- config base ------------------------------------------
@@ -1175,7 +1176,7 @@ def _get_default_exp_name(timeout_seconds: int = 60):
if dist.is_initialized():
_collective_with_timeout(
lambda: dist.broadcast_object_list(object_list, device="cuda"),
lambda: dist.broadcast_object_list(object_list, device=get_device()),
operation_name="broadcast_object_list in _get_default_exp_name",
timeout_seconds=timeout_seconds,
)