From a9bd890c7d1a6456f27247658675095f72d8ac3d Mon Sep 17 00:00:00 2001 From: Robert Shaw Date: Mon, 10 Nov 2025 19:59:40 +0000 Subject: [PATCH 1/2] updated Signed-off-by: Robert Shaw --- vllm/config/vllm.py | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/vllm/config/vllm.py b/vllm/config/vllm.py index d4ee6f980e6e..43264b180e56 100644 --- a/vllm/config/vllm.py +++ b/vllm/config/vllm.py @@ -608,17 +608,19 @@ def __post_init__(self): ) current_platform.check_and_update_config(self) - assert ( - self.parallel_config.dcp_kv_cache_interleave_size - <= self.cache_config.block_size - and self.cache_config.block_size - % self.parallel_config.dcp_kv_cache_interleave_size - == 0 - ), ( - f"Block_size({self.cache_config.block_size}) should be " - "greater than or equal to and divisible by dcp_kv_cache_interleave_size " - f"({self.parallel_config.dcp_kv_cache_interleave_size})." - ) + # If DCP, ensure the block size is right. + if self.parallel_config.decode_context_parallel_size > 1: + assert ( + self.parallel_config.dcp_kv_cache_interleave_size + <= self.cache_config.block_size + and self.cache_config.block_size + % self.parallel_config.dcp_kv_cache_interleave_size + == 0 + ), ( + f"Block_size({self.cache_config.block_size}) should be " + "greater than or equal to and divisible by dcp_kv_cache_interleave_size " + f"({self.parallel_config.dcp_kv_cache_interleave_size})." + ) assert ( self.parallel_config.dcp_kv_cache_interleave_size == 1 From 48e8b5de0dab86b1f9812d57ddff36ce90792475 Mon Sep 17 00:00:00 2001 From: Robert Shaw Date: Mon, 10 Nov 2025 20:08:40 +0000 Subject: [PATCH 2/2] pre-commit Signed-off-by: Robert Shaw --- vllm/config/vllm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vllm/config/vllm.py b/vllm/config/vllm.py index 43264b180e56..0fca967d9083 100644 --- a/vllm/config/vllm.py +++ b/vllm/config/vllm.py @@ -617,8 +617,8 @@ def __post_init__(self): % self.parallel_config.dcp_kv_cache_interleave_size == 0 ), ( - f"Block_size({self.cache_config.block_size}) should be " - "greater than or equal to and divisible by dcp_kv_cache_interleave_size " + f"Block_size({self.cache_config.block_size}) should be greater " + "than or equal to and divisible by dcp_kv_cache_interleave_size " f"({self.parallel_config.dcp_kv_cache_interleave_size})." )