[Fix] Refactor dummy attention metadata creation (#3497)
### What this PR does / why we need it? The `force_attention` parameter is designed for flash infer kernel warmup, we don't actually need it on Ascend device (at least for now).And it tends to make things more complicated. So we replace the `force_attention` parameter with `aclgraph_runtime_mode` in the attention metadata creation logic. This change makes the control flow more explicit by directly using the graph runtime mode to determine how to build attention metadata, rather than relying on an intermediate boolean flag. This simplification removes redundant logic and clarifies the conditions for building attention metadata for full decode graph mode. ### Does this PR introduce _any_ user-facing change? None. ### How was this patch tested? DP + `FULL_DECODE_ONLY` + online serving. - vLLM version: v0.11.0rc3 - vLLM main: https://github.com/vllm-project/vllm/commit/v0.11.0 --------- Signed-off-by: Yizhou Liu <liu_yizhou@outlook.com>
This commit is contained in:
@@ -456,9 +456,7 @@ class TestNPUWorker(TestBase):
|
||||
|
||||
# Verify call
|
||||
mock_model_runner._dummy_run.assert_called_once_with(
|
||||
num_tokens=mock_decode_token_per_req,
|
||||
uniform_decode=True,
|
||||
force_attention=False)
|
||||
num_tokens=mock_decode_token_per_req, uniform_decode=True)
|
||||
|
||||
@patch("vllm_ascend.worker.worker_v1.envs_vllm")
|
||||
@patch("vllm_ascend.worker.worker_v1.logger")
|
||||
|
||||
Reference in New Issue
Block a user