Commit 3d077f9
authored
[BugFix][KV Pool] Gate Memcache lazy init by protocol and make register buffer default (vllm-project#12064)
### What this PR does / why we need it?
Memcache initialization currently uses the Ascend device type as a proxy
for the configured transport protocol. This is no longer accurate
because buffer registration decisions are handled by
`store.register_buffer()`, while lazy initialization is only required by
the `device_sdma` protocol.
This PR:
- removes the A2-specific `all_gather` and device-type checks from
`MemcacheBackend`;
- enables requested lazy initialization only when
`MMC_LOCAL_CONFIG_PATH` sets `ock.mmc.local_service.protocol` to
`device_sdma`;
- requires `MMC_LOCAL_CONFIG_PATH`, handles protocol whitespace and
comments, and surfaces missing or unreadable configuration file errors;
- forwards buffer registration decisions to Memcache and defers pending
registrations until a lazy store is initialized.
### Does this PR introduce _any_ user-facing change?
Yes. Memcache lazy initialization is now selected by the configured
`device_sdma` protocol instead of the Ascend device type. Other
protocols initialize the store eagerly.
### How was this patch tested?
- All repository pre-commit hooks passed, including ruff, formatting,
spelling, custom Python checks, and commit sign-off validation.
- Python syntax compilation passed for the modified backend.
- Targeted checks passed for protocol whitespace, comments, missing
environment variables, missing-file error propagation,
`device_sdma`/`device_rdma` selection, and deferred buffer registration
after lazy initialization.
- vLLM version: v0.25.1
- vLLM main:
vllm-project/vllm@fe784ff
Signed-off-by: Pz1116 <zpbzpb123123@gmail.com>1 parent b2f683c commit 3d077f9
2 files changed
Lines changed: 24 additions & 22 deletions
File tree
- tests/ut/distributed/ascend_store
- vllm_ascend/distributed/kv_transfer/kv_pool/ascend_store/backend
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
600 | 600 | | |
601 | 601 | | |
602 | 602 | | |
603 | | - | |
604 | | - | |
605 | | - | |
| 603 | + | |
606 | 604 | | |
607 | 605 | | |
608 | 606 | | |
| |||
612 | 610 | | |
613 | 611 | | |
614 | 612 | | |
615 | | - | |
616 | 613 | | |
617 | 614 | | |
618 | 615 | | |
| |||
Lines changed: 23 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
14 | 30 | | |
15 | 31 | | |
16 | 32 | | |
| |||
32 | 48 | | |
33 | 49 | | |
34 | 50 | | |
35 | | - | |
36 | | - | |
| 51 | + | |
37 | 52 | | |
38 | 53 | | |
39 | 54 | | |
40 | 55 | | |
41 | | - | |
42 | | - | |
| 56 | + | |
43 | 57 | | |
44 | 58 | | |
45 | 59 | | |
| |||
68 | 82 | | |
69 | 83 | | |
70 | 84 | | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | 85 | | |
77 | 86 | | |
78 | 87 | | |
| |||
108 | 117 | | |
109 | 118 | | |
110 | 119 | | |
111 | | - | |
| 120 | + | |
112 | 121 | | |
113 | 122 | | |
114 | 123 | | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
| 124 | + | |
120 | 125 | | |
121 | 126 | | |
122 | | - | |
| 127 | + | |
123 | 128 | | |
124 | 129 | | |
125 | | - | |
| 130 | + | |
126 | 131 | | |
127 | 132 | | |
128 | 133 | | |
| |||
0 commit comments