Skip to content

MG Python API#1307

Merged
rapids-bot[bot] merged 26 commits intorapidsai:branch-25.10from
viclafargue:mg-python-api
Sep 19, 2025
Merged

MG Python API#1307
rapids-bot[bot] merged 26 commits intorapidsai:branch-25.10from
viclafargue:mg-python-api

Conversation

@viclafargue
Copy link
Copy Markdown
Contributor

No description provided.

@viclafargue viclafargue requested review from a team as code owners September 2, 2025 12:52
@viclafargue viclafargue added improvement Improves an existing functionality non-breaking Introduces a non-breaking change labels Sep 2, 2025
Comment thread docs/source/python_api/neighbors.rst Outdated
Comment on lines +430 to +432
index->dtype.code = kDLFloat;
index->dtype.bits = 32;
index->addr = reinterpret_cast<uintptr_t>(_mg_distribute<float>(res, filename));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change intentional? (do we only support float32 here, and you meant to remove support for the other dtypes?)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This functions deserializes a single-GPU index and distributes it across multiple GPUs. The IVF-PQ index does not have a T template parameter, only IdxT (which is always int64_t). Because of this, a file containing a serialized IVF-PQ index is not prepended with an index type (float, half, uint8_t, int8_t). This makes it impossible to find the index type necessary to instantiate a multi-GPU index. This is fundamentally an issue in the multi-GPU API that should be remediated. In the meantime, we should assume that for this specific case (the replication of a single-GPU IVF-PQ index), the user is planning to search with floats.

Comment thread python/cuvs/cuvs/neighbors/mg_ivf_flat/mg_ivf_flat.pxd
Comment thread python/cuvs/cuvs/neighbors/mg_ivf_flat/__init__.py Outdated
Comment thread python/cuvs/cuvs/neighbors/mg_cagra/mg_cagra.pyx
Comment thread python/cuvs/cuvs/neighbors/mg_cagra/mg_cagra.pyx
@cjnolet cjnolet moved this from Todo to In Progress in Unstructured Data Processing Sep 5, 2025
@benfred
Copy link
Copy Markdown
Contributor

benfred commented Sep 18, 2025

lgtm!

@cjnolet
Copy link
Copy Markdown
Member

cjnolet commented Sep 19, 2025

/merge

@rapids-bot rapids-bot Bot merged commit d02e0fc into rapidsai:branch-25.10 Sep 19, 2025
162 of 164 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Unstructured Data Processing Sep 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants