Skip to content

fix: handle int8 cosine normalization for GPU CAGRA#1720

Merged
sre-ci-robot merged 1 commit into
zilliztech:mainfrom
marcelo-cjl:fix-cagra-int8-cosine
Jul 16, 2026
Merged

fix: handle int8 cosine normalization for GPU CAGRA#1720
sre-ci-robot merged 1 commit into
zilliztech:mainfrom
marcelo-cjl:fix-cagra-int8-cosine

Conversation

@marcelo-cjl

@marcelo-cjl marcelo-cjl commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Normalize INT8 COSINE rows with a float norm and a scaled int8 representation instead of applying RAFT row normalization directly to int8 buffers.
  • Rescale valid INT8 COSINE CAGRA IP scores by 127^2 so returned COSINE scores stay in [-1, 1].
  • Add GPU_CUVS_CAGRA INT8 COSINE regression coverage.

issue: #1721

Test plan

  • git diff --check -- src/common/cuvs/integration/cuvs_knowhere_index.cuh tests/ut/test_gpu_search.cc
  • clang-format-15 --dry-run --Werror src/common/cuvs/integration/cuvs_knowhere_index.cuh tests/ut/test_gpu_search.cc
  • GPU cuVS build: cmake --build build-main/Release --target knowhere_tests -- -j16
  • GPU_CUVS_CAGRA INT8 COSINE regression: knowhere_tests "Test All GPU Index" -c "Test Gpu Cagra Int8 Cosine Score Range" -s
  • Large-scale INT8/FLOAT CAGRA COSINE validation confirmed returned valid COSINE scores stay within [-1, 1]

@sre-ci-robot

Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: marcelo-cjl

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

@mergify

mergify Bot commented Jul 16, 2026

Copy link
Copy Markdown

@marcelo-cjl 🔍 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!.

@marcelo-cjl
marcelo-cjl force-pushed the fix-cagra-int8-cosine branch from 92f81e2 to 189441b Compare July 16, 2026 07:27
@marcelo-cjl marcelo-cjl added the kind/bug This PR is a bug fix label Jul 16, 2026
@marcelo-cjl

Copy link
Copy Markdown
Collaborator Author

@Mergifyio refresh

@mergify

mergify Bot commented Jul 16, 2026

Copy link
Copy Markdown

refresh

✅ Pull request refreshed

Signed-off-by: marcelo-cjl <marcelo.chen@zilliz.com>
@marcelo-cjl
marcelo-cjl force-pushed the fix-cagra-int8-cosine branch 2 times, most recently from 101f749 to e236277 Compare July 16, 2026 09:55
@mergify mergify Bot added the ci-passed label Jul 16, 2026
@alexanderguzhva

Copy link
Copy Markdown
Collaborator

/lgtm

@sre-ci-robot
sre-ci-robot merged commit 62ee636 into zilliztech:main Jul 16, 2026
15 of 16 checks passed
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