From 22587bc0b43867dd2bd1b54078519e4cb526709b Mon Sep 17 00:00:00 2001 From: Yibo Cai Date: Tue, 16 Dec 2025 13:32:41 +0800 Subject: [PATCH] [BugFix] Fix CPU inference failure (#15231) --- python/sglang/srt/server_args.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/sglang/srt/server_args.py b/python/sglang/srt/server_args.py index f731ad432..75f7e4762 100644 --- a/python/sglang/srt/server_args.py +++ b/python/sglang/srt/server_args.py @@ -1443,7 +1443,9 @@ class ServerArgs: # TODO: currently, it is only supported in the single node scenario. https://github.com/flashinfer-ai/flashinfer/issues/2006 # TODO: there is currently a bug on H20 device specifically, https://github.com/flashinfer-ai/flashinfer/issues/2204 device_name = get_device_name() - is_h20_device = "H20" in device_name and "H200" not in device_name + is_h20_device = ( + device_name and "H20" in device_name and "H200" not in device_name + ) if ( not self.enable_flashinfer_allreduce_fusion and model_arch