From 329817e26248822c253c04d27225f1da88647456 Mon Sep 17 00:00:00 2001 From: Bingxu Chen Date: Thu, 5 Mar 2026 02:23:42 +0800 Subject: [PATCH] [AMD] Move get_global_server_args import out of CUDA-only block to fix NameError on AMD (#19866) --- python/sglang/srt/layers/moe/fused_moe_triton/fused_moe.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/sglang/srt/layers/moe/fused_moe_triton/fused_moe.py b/python/sglang/srt/layers/moe/fused_moe_triton/fused_moe.py index 0c9cdce08..75f62c955 100644 --- a/python/sglang/srt/layers/moe/fused_moe_triton/fused_moe.py +++ b/python/sglang/srt/layers/moe/fused_moe_triton/fused_moe.py @@ -45,10 +45,10 @@ _use_aiter = get_bool_env_var("SGLANG_USE_AITER") and _is_hip _is_xpu = is_xpu() _use_sgl_xpu = use_intel_xpu_backend() +from sglang.srt.server_args import get_global_server_args + if _is_cuda: from sgl_kernel import gelu_and_mul, moe_sum_reduce, silu_and_mul - - from sglang.srt.server_args import get_global_server_args elif _is_cpu and _is_cpu_amx_available: pass elif _is_hip: