-
Notifications
You must be signed in to change notification settings - Fork 143
Open
Labels
bugSomething isn't workingSomething isn't working
Description
When built for a single GPU, mg_index doesn't write the outputs during search with default parameters.
The culprit is the sharded-tree-merge search implementation that is designed for even number of GPUs.
With rank == 1 (single GPU) the code for copying the data to output is never reached:
cuvs/cpp/src/neighbors/mg/snmg.cuh
Lines 427 to 438 in 2db8516
| if (remaining <= 1) { | |
| raft::copy(neighbors.data_handle() + output_offset, | |
| tmp_neighbors.data_handle(), | |
| part_size, | |
| raft::resource::get_cuda_stream(dev_res)); | |
| raft::copy(distances.data_handle() + output_offset, | |
| tmp_distances.data_handle(), | |
| part_size, | |
| raft::resource::get_cuda_stream(dev_res)); | |
| resource::sync_stream(dev_res); | |
| } |
...because it's nested under the following loop:
cuvs/cpp/src/neighbors/mg/snmg.cuh
Lines 367 to 370 in 2db8516
| int64_t remaining = index.num_ranks_; | |
| int64_t radix = 2; | |
| while (remaining > 1) { |
That is, if one builds and searches an SNMG index using ANN_BENCH tool with default parameters and a single GPU, the recall is always zero.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
Todo