[BugFix] Require kv producer for layer sharding (#8563)
### What this PR does / why we need it? This PR introduce stricter Ascend `additional_config.layer_sharding` validation to the 0.18 release branch so it is only accepted on PD-disaggregated P nodes with `kv_role="kv_producer"`. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? E2E test --------- Signed-off-by: chenchuw886 <chenchuw@huawei.com> Co-authored-by: chenchuw886 <chenchuw@huawei.com>
This commit is contained in:
@@ -689,12 +689,13 @@ class TestNPUPlatform(TestBase):
|
||||
|
||||
self.assertEqual(vllm_config.cache_config.block_size, 512)
|
||||
|
||||
def test_validate_layer_sharding_config_accepts_single_node(self):
|
||||
def test_validate_layer_sharding_config_rejects_missing_kv_transfer_config(self):
|
||||
vllm_config = TestNPUPlatform.mock_vllm_config()
|
||||
vllm_config.additional_config = {"layer_sharding": ["q_b_proj", "o_proj"]}
|
||||
vllm_config.kv_transfer_config = None
|
||||
|
||||
self.platform._validate_layer_sharding_config(vllm_config)
|
||||
with pytest.raises(ValueError, match="layer_sharding is only supported on P nodes"):
|
||||
self.platform._validate_layer_sharding_config(vllm_config)
|
||||
|
||||
def test_validate_layer_sharding_config_accepts_kv_producer(self):
|
||||
vllm_config = TestNPUPlatform.mock_vllm_config()
|
||||
|
||||
Reference in New Issue
Block a user