Commit 687af83
committed
[None][fix] Address code review: API safety, assertion, and comment accuracy
- Replace getFragmentPointerDevice()/getFragmentPointerHost() with a single
getFragmentPointerSlot() that returns both rows atomically and advances workIdx
once, making it impossible to call them in the wrong order (gripe 2).
- Add TLLM_CHECK that cacheBlockIds is non-empty on the cross-KV path before
accessing cacheBlockIds[0] (gripe 5).
- Fix the Fix-3 description in encDecBeamSearchTest.cpp: this branch uses a
repaired kernel (per-slot fragmentPointerDevice), not the direct-copy path
described by the stale comment (gripe 3).
Signed-off-by: Aurelien Chartier <2567591+achartier@users.noreply.github.com>1 parent 8204325 commit 687af83
4 files changed
Lines changed: 19 additions & 22 deletions
File tree
- cpp
- include/tensorrt_llm/batch_manager
- tensorrt_llm/batch_manager
- utils
- tests/unit_tests/batch_manager
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
227 | | - | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
228 | 230 | | |
229 | | - | |
| 231 | + | |
| 232 | + | |
230 | 233 | | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
| 234 | + | |
238 | 235 | | |
239 | 236 | | |
240 | 237 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3948 | 3948 | | |
3949 | 3949 | | |
3950 | 3950 | | |
| 3951 | + | |
| 3952 | + | |
3951 | 3953 | | |
3952 | 3954 | | |
3953 | 3955 | | |
| |||
Lines changed: 4 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
111 | 109 | | |
112 | | - | |
113 | | - | |
| 110 | + | |
114 | 111 | | |
115 | 112 | | |
116 | 113 | | |
| |||
Lines changed: 7 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
0 commit comments