Repository navigation
Commit b44cc5b
committed
fix: defer transfer array materialization off the scheduler thread
from_tracker eagerly converted every group's block ids and gvas to
numpy arrays on the scheduler critical path; main only materializes
arrays on the worker thread. At 256 concurrent requests with 256
blocks x 5 groups this added ~13.5 ms to every scheduler step (and
~192 ms at 4096 blocks), directly inflating TTFT on prefill-heavy
workloads; an E2E benchmark on DeepSeek-V4-Flash measured ~1%
throughput/TTFT regression.
Store the tracker's id lists by reference instead and materialize
them lazily on first array access, which happens on the worker
thread (planes/gva read paths now go through get_block_ids_array).
The lazy source shares identity with ReqMeta.block_ids_by_group, so
pickling the metadata payload costs no extra bytes. Empty gvas
conversions reuse one shared empty array.
Measured: scheduler-side from_tracker drops 13.51 ms -> 0.22 ms per
step (256 req x 256 blocks x 5 groups); the one-time materialization
runs on the worker thread where main performs the same conversion.
Full ascend_store + kv_offload suite: zero per-test changes.
Signed-off-by: zhaosusu <zhaosusu1@h-partners.com>1 parent 8e1def2 commit b44cc5b
2 files changed
Lines changed: 27 additions & 20 deletions
File tree
- vllm_ascend/distributed/kv_transfer/kv_pool/ascend_store
- layerwise/planes
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
| 131 | + | |
139 | 132 | | |
140 | 133 | | |
141 | 134 | | |
| |||
376 | 369 | | |
377 | 370 | | |
378 | 371 | | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
| 372 | + | |
387 | 373 | | |
388 | 374 | | |
389 | 375 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
15 | 18 | | |
16 | 19 | | |
17 | 20 | | |
| |||
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
38 | 46 | | |
39 | 47 | | |
40 | 48 | | |
| |||
50 | 58 | | |
51 | 59 | | |
52 | 60 | | |
53 | | - | |
| 61 | + | |
| 62 | + | |
54 | 63 | | |
55 | | - | |
56 | | - | |
57 | | - | |
| 64 | + | |
58 | 65 | | |
59 | 66 | | |
60 | 67 | | |
61 | 68 | | |
| 69 | + | |
62 | 70 | | |
63 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
64 | 81 | | |
| 82 | + | |
| 83 | + | |
65 | 84 | | |
66 | 85 | | |
67 | 86 | | |
68 | 87 | | |
69 | 88 | | |
| 89 | + | |
| 90 | + | |
70 | 91 | | |
71 | 92 | | |
72 | 93 | | |
| |||
0 commit comments