Commit 40ad646
Fix cuVS build (#5107)
Summary:
Pull Request resolved: #5107
```
The sentinel bug exists in both builds — the code is identical. The reason it manifests only
on CMake/GHA:
Different GPU hardware. Internal Buck tests run on RE with A100/H100 GPUs. GHA uses T4
(compute capability 7.5). On the T4, cuVS CAGRA's filtered search doesn't explore enough graph
to fill all k result slots, leaving sentinel values (INT32_MAX). On more powerful GPUs with
higher throughput, the search finds all k valid neighbors before hitting the iteration limit.
Possibly different cuVS versions. Buck uses Meta's vendored fbsource//third-party/cuvs:cuvs.
GHA installs libcuvs=26.02 from the rapidsai conda channel. The sentinel behavior (what value,
when it appears) could differ between versions.
The underlying bug — blindly thrust::copying uint32_t indices to idx_t without sanitizing
sentinels — exists in both builds. It just doesn't trigger internally because the GPU hardware
is powerful enough to always fill all k slots. The thrust::transform fix is correct
regardless of which GPU it runs on.
```
Reviewed By: junjieqi
Differential Revision: D101072304
fbshipit-source-id: fe191f61b2daba9f34f10bbd0f42c8530d51ad731 parent 57bf474 commit 40ad646
4 files changed
Lines changed: 40 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
287 | | - | |
288 | | - | |
| 287 | + | |
| 288 | + | |
289 | 289 | | |
290 | | - | |
291 | | - | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
292 | 293 | | |
293 | 294 | | |
294 | 295 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
318 | | - | |
319 | | - | |
| 318 | + | |
| 319 | + | |
320 | 320 | | |
321 | | - | |
322 | | - | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
323 | 324 | | |
324 | 325 | | |
325 | 326 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
115 | 116 | | |
116 | 117 | | |
117 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
118 | 137 | | |
119 | 138 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
74 | 85 | | |
75 | 86 | | |
76 | 87 | | |
0 commit comments