Commit 261a3e9
[Misc] M2m 0724 continuation (vllm-project#12648)
### What this PR does / why we need it?
Adapt vllm-ascend to vLLM main commits up to July 24.
### Changes
| Files | Upstream vLLM Change | vllm-ascend Adaptation |
|---|---|---|
|
`vllm_ascend/worker/v2/attn_utils.py`<br>`vllm_ascend/worker/v2/spec_decode/dflash/speculator.py`<br>`vllm_ascend/worker/v2/spec_decode/dspark/speculator.py`
| [vllm#44492](vllm-project/vllm#44492)
([4ec199b6](vllm-project/vllm@4ec199b6)) —
Populate draft `seq_lens_cpu_upper_bound` for spec-decode attention
metadata. Upstream threads `seq_lens_cpu_upper_bound` through
`_multi_step_decode()` (new 5th positional arg) and
`_build_draft_attn_metadata()` (new `seq_lens_cpu_upper_bound` + `step`
kwargs). | `attn_utils.py`: Added `build_attn_metadata` with
`seq_lens_cpu_upper_bound` param (defaults to `seq_lens_cpu`) and
`build_attn_metadata_wrapper()` context manager for Ascend NPU attention
metadata building.<br>`dflash/speculator.py`: `propose()` caches
`self.input_batch` before `super().propose()`;
`build_draft_attn_metadatas()` passes actual `num_reqs`, padded counts,
`seq_lens_cpu_upper_bound`, and `step` to
`_build_draft_attn_metadata`.<br>`dspark/speculator.py`:
`build_draft_attn_metadatas()` passes `seq_lens_cpu_upper_bound` +
`step`; `propose()` caches `self.input_batch` (version-gated for main
only, since v0.25.1 never reaches this code path via `run_fullgraph`). |
| `vllm_ascend/worker/v2/spec_decode/dflash/aclgraph.py` |
[vllm#47914](vllm-project/vllm#47914)
([0d12618e](vllm-project/vllm@0d12618e)) —
`causal` moved from `DFlashCudaGraphManager.__init__` to `capture()`. |
`capture()` is version-gated: passes `causal` kwarg only on main branch;
v0.25.1 receives it via `__init__`. `run_fullgraph()` accesses
`self.speculator.input_batch.seq_lens_cpu_upper_bound` for building
draft attention metadata during full-graph replay, then updates Ascend
NPU full-graph params. |
| `vllm_ascend/core/recompute_scheduler.py` |
[vllm#47312](vllm-project/vllm#47312)
([12213c67](vllm-project/vllm@12213c67)) —
Handle grammar compilation failures. `finish_requests()` return type
changed from `list[tuple(str, int)]` to `list[Request]`. | Assertion in
`_finish_recomputed_request` is version-gated: on main branch extracts
`(request_id, client_index)` from `Request` objects; v0.25.1 retains the
direct tuple comparison. |
| `vllm_ascend/_310p/model_runner_310p.py` | General vLLM V1 API
evolution (model loading, KV cache allocation,
`determine_available_memory` flow). | New file. 310P hardware platform
model runner extending `NPUModelRunner`. Adapts 310P-specific ACL graph
capture/replay, splitfuse attention, NPU input batch, and FRACTAL_NZ
weight layout to the upstream V1 API. |
| `.github/vllm-main-verified.commit` | N/A (CI tracking) | Updated to
`d02df748bf9efd99022f1a062597dc3cb3808485` to record the verified
upstream vLLM commit. |
### Does this PR introduce _any_ user-facing change?
### How was this patch tested?
- vLLM version: v0.25.1
- vLLM main:
vllm-project/vllm@fe784ff
---------
Signed-off-by: Chen zhichao <chenzhichao33@h-partners.com>
Signed-off-by: hfadzxy <starmoon_zhang@163.com>
Co-authored-by: Chen zhichao <chenzhichao33@h-partners.com>
Co-authored-by: hfadzxy <starmoon_zhang@163.com>1 parent 686732c commit 261a3e9
10 files changed
Lines changed: 84 additions & 19 deletions
File tree
- .github
- vllm_ascend
- _310p
- core
- worker/v2
- spec_decode
- autoregressive
- dflash
- dspark
- eagle
- mtp
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
58 | 62 | | |
59 | 63 | | |
60 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
147 | 152 | | |
148 | 153 | | |
149 | 154 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| 112 | + | |
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
| |||
127 | 128 | | |
128 | 129 | | |
129 | 130 | | |
| 131 | + | |
| 132 | + | |
130 | 133 | | |
131 | 134 | | |
132 | 135 | | |
| |||
145 | 148 | | |
146 | 149 | | |
147 | 150 | | |
148 | | - | |
| 151 | + | |
149 | 152 | | |
150 | 153 | | |
151 | 154 | | |
| |||
Lines changed: 16 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
275 | 276 | | |
276 | 277 | | |
277 | 278 | | |
| 279 | + | |
278 | 280 | | |
279 | 281 | | |
280 | 282 | | |
| |||
288 | 290 | | |
289 | 291 | | |
290 | 292 | | |
291 | | - | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
292 | 297 | | |
293 | 298 | | |
294 | 299 | | |
295 | 300 | | |
296 | 301 | | |
297 | 302 | | |
| 303 | + | |
| 304 | + | |
298 | 305 | | |
299 | 306 | | |
300 | 307 | | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
308 | 316 | | |
309 | 317 | | |
310 | 318 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
109 | 112 | | |
110 | 113 | | |
111 | 114 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
80 | | - | |
| 81 | + | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
| 88 | + | |
| 89 | + | |
87 | 90 | | |
88 | 91 | | |
89 | 92 | | |
| |||
107 | 110 | | |
108 | 111 | | |
109 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
110 | 118 | | |
111 | 119 | | |
112 | 120 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
39 | 45 | | |
40 | 46 | | |
41 | 47 | | |
| |||
82 | 88 | | |
83 | 89 | | |
84 | 90 | | |
85 | | - | |
| 91 | + | |
86 | 92 | | |
87 | 93 | | |
88 | 94 | | |
89 | 95 | | |
90 | 96 | | |
91 | 97 | | |
| 98 | + | |
| 99 | + | |
92 | 100 | | |
93 | 101 | | |
94 | 102 | | |
| |||
112 | 120 | | |
113 | 121 | | |
114 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
115 | 128 | | |
116 | 129 | | |
117 | 130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
111 | 112 | | |
112 | 113 | | |
113 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
114 | 119 | | |
115 | 120 | | |
116 | 121 | | |
117 | 122 | | |
118 | 123 | | |
| 124 | + | |
119 | 125 | | |
120 | 126 | | |
121 | 127 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| |||
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
| 81 | + | |
| 82 | + | |
79 | 83 | | |
80 | 84 | | |
81 | 85 | | |
| |||
84 | 88 | | |
85 | 89 | | |
86 | 90 | | |
87 | | - | |
88 | | - | |
89 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
0 commit comments