From 852b04b358e273b37a1b7229edc7452663055347 Mon Sep 17 00:00:00 2001 From: Shangming Cai Date: Mon, 24 Aug 2026 13:56:41 +0800 Subject: [PATCH] fix(xpu): read enable_deterministic_inference from the config bag (#36149) --- python/sglang/srt/layers/attention/xpu_backend.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/sglang/srt/layers/attention/xpu_backend.py b/python/sglang/srt/layers/attention/xpu_backend.py index 8cbb6895e..136580d14 100644 --- a/python/sglang/srt/layers/attention/xpu_backend.py +++ b/python/sglang/srt/layers/attention/xpu_backend.py @@ -16,6 +16,7 @@ from sglang.srt.mem_cache.memory_pool import KVWriteLoc from sglang.srt.mem_cache.swa_memory_pool import SWAKVPool from sglang.srt.model_executor.forward_batch_info import ForwardBatch, ForwardMode from sglang.srt.runtime_context import ( + get_exec, get_schedule, get_spec, ) @@ -106,7 +107,7 @@ class XPUAttentionBackend(AttentionBackend): # when deterministic inference is enabled to keep attention reduction # order fixed. This mirrors the flash-attention (fa3) backend. self.num_splits = ( - 1 if model_runner.server_args.enable_deterministic_inference else 0 + 1 if get_exec().deterministic.enable_deterministic_inference else 0 ) self.is_encoder_decoder = model_runner.model_config.is_encoder_decoder