Skip to content

Add support for FP16/INT8 on GPU indexes#1183

Merged
sre-ci-robot merged 8 commits into
zilliztech:mainfrom
lowener:fea-fp16
Jun 16, 2025
Merged

Add support for FP16/INT8 on GPU indexes#1183
sre-ci-robot merged 8 commits into
zilliztech:mainfrom
lowener:fea-fp16

Conversation

@lowener
Copy link
Copy Markdown
Contributor

@lowener lowener commented May 9, 2025

issue: #1201

lowener added 6 commits March 24, 2025 11:04
Signed-off-by: Mickael Ide <mide@nvidia.com>
Signed-off-by: Mickael Ide <mide@nvidia.com>
Signed-off-by: Mickael Ide <mide@nvidia.com>
Signed-off-by: Mickael Ide <mide@nvidia.com>
Signed-off-by: Mickael Ide <mide@nvidia.com>
@mergify
Copy link
Copy Markdown

mergify Bot commented May 9, 2025

@lowener 🔍 Important: PR Classification Needed!

For efficient project management and a seamless review process, it's essential to classify your PR correctly. Here's how:

  1. If you're fixing a bug, label it as kind/bug.
  2. For small tweaks (less than 20 lines without altering any functionality), please use kind/improvement.
  3. Significant changes that don't modify existing functionalities should be tagged as kind/enhancement.
  4. Adjusting APIs or changing functionality? Go with kind/feature.

For any PR outside the kind/improvement category, ensure you link to the associated issue using the format: “issue: #”.

Thanks for your efforts and contribution to the community!.

Signed-off-by: Mickael Ide <mide@nvidia.com>
@mergify mergify Bot added ci-passed and removed ci-passed labels May 20, 2025
@lowener lowener marked this pull request as ready for review May 21, 2025 11:25
@mergify mergify Bot added ci-passed and removed ci-passed labels May 29, 2025
Comment thread cmake/libs/libcuvs.cmake
set(CUVS_VERSION "${RAPIDS_VERSION}")
set(CUVS_FORK "rapidsai")
set(CUVS_PINNED_TAG "branch-25.02")
set(CUVS_PINNED_TAG "branch-25.06")
Copy link
Copy Markdown
Collaborator

@alexanderguzhva alexanderguzhva May 29, 2025

Choose a reason for hiding this comment

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

has cuvs 25.06 been released already? If not, then is it safe to use it already?

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.

The official release for 25.06 is the 5th of June. So it will be safe to use from that day on.

auto k = neighbors.extent(1);
auto k_tmp = k + k_offset;
if (refine_ratio > 1.0f) {
bool do_refine_step = refine_ratio > 1.0f;
Copy link
Copy Markdown
Collaborator

@alexanderguzhva alexanderguzhva May 29, 2025

Choose a reason for hiding this comment

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

is the refine index type the same as the coarse index type? If not, then 1.0f refine_ratio value is acceptable: imagine coarse index being fp16 and the fine index being fp32

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.

The refinement step will narrow the n_candidates neighbors selected by the ANN search down to k neighbors. If the refine_ratio is equal to 1.0 then there is no need to narrow it down because n_candidates == k


if constexpr (index_kind == cuvs_proto::cuvs_index_kind::brute_force) {
if (k_tmp > k) {
for (auto i = 0; i < host_ids.extent(0); ++i) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why is this logic no longer needed?

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 logic was introduced for post-filtering the brute-force algorithm. It now supports pre-filtering so that's why it is not required anymore.
I found also some comments left at the time it was introduced detailing it: #286 (comment)

Signed-off-by: Mickael Ide <mide@nvidia.com>
@mergify mergify Bot added ci-passed and removed ci-passed labels Jun 10, 2025
@alexanderguzhva
Copy link
Copy Markdown
Collaborator

/lgtm

@alexanderguzhva
Copy link
Copy Markdown
Collaborator

issue #1201

@alexanderguzhva
Copy link
Copy Markdown
Collaborator

issue: #1201

@alexanderguzhva
Copy link
Copy Markdown
Collaborator

/kind improvement

@alexanderguzhva
Copy link
Copy Markdown
Collaborator

/approve

@sre-ci-robot
Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alexanderguzhva, lowener

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sre-ci-robot sre-ci-robot merged commit de81019 into zilliztech:main Jun 16, 2025
12 checks passed
@lowener lowener deleted the fea-fp16 branch June 17, 2025 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants