From 638a872d77b51cc4c160e713a58a589671de3a0c Mon Sep 17 00:00:00 2001 From: Yuxiang Liang Date: Fri, 20 Mar 2026 11:52:35 +0800 Subject: [PATCH] fix(xpu): Re-compute compile ranges after platform-specific config updates (#37523) Signed-off-by: Yuxiang Liang Signed-off-by: Yuxiang Liang Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- vllm/config/vllm.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vllm/config/vllm.py b/vllm/config/vllm.py index 948335d6cd..f525ac871c 100644 --- a/vllm/config/vllm.py +++ b/vllm/config/vllm.py @@ -985,8 +985,6 @@ class VllmConfig: "--kv-sharing-fast-prefill requires changes on model side for " "correctness and to realize prefill savings." ) - # TODO: Move after https://github.com/vllm-project/vllm/pull/26847 lands - self._set_compile_ranges() if ( self.model_config @@ -1022,6 +1020,10 @@ class VllmConfig: ) current_platform.check_and_update_config(self) + # Re-compute compile ranges after platform-specific config updates + # (e.g., XPU may lower max_num_batched_tokens when MLA is enabled) + self._set_compile_ranges() + # Do this after all the updates to compilation_config.mode effective_dp_size = ( self.parallel_config.data_parallel_size