Skip to content

Commit 1652e30

Browse files
committed
fix: Update metadata builder access for vLLM compatibility, now c60e613
Signed-off-by: Yizhou Liu <liu_yizhou@outlook.com>
1 parent 6683277 commit 1652e30

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

vllm_ascend/worker/model_runner_v1.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2289,8 +2289,12 @@ def _build_attention_metadata(self, create_mixed_batch, num_reqs,
22892289
)
22902290

22912291
for attn_group in self.attn_groups[kv_cache_group_id]:
2292-
attn_metadata_i = attn_group.metadata_builder\
2293-
.build_for_graph_capture(common_attn_metadata)
2292+
if vllm_version_is("0.10.2"):
2293+
builder = attn_group.metadata_builder
2294+
else:
2295+
builder = attn_group.get_metadata_builder()
2296+
attn_metadata_i = builder.build_for_graph_capture(
2297+
common_attn_metadata)
22942298
for layer_name in kv_cache_group_spec.layer_names:
22952299
attn_metadata[layer_name] = attn_metadata_i
22962300

@@ -3196,7 +3200,10 @@ def initialize_aclgraph_capture(self) -> None:
31963200
min_ag_builder_name = None
31973201

31983202
for attn_group in self._attn_group_iterator():
3199-
builder = attn_group.metadata_builder
3203+
if vllm_version_is("0.10.2"):
3204+
builder = attn_group.metadata_builder
3205+
else:
3206+
builder = attn_group.get_metadata_builder()
32003207
if builder.cudagraph_support.value < min_ag_support.value:
32013208
min_ag_support = builder.cudagraph_support
32023209
min_ag_builder_name = builder.__class__.__name__

0 commit comments

Comments
 (0)