Skip to content

Conversation

@rfsaliev
Copy link
Collaborator

@rfsaliev rfsaliev commented Dec 10, 2025

This pull request updates the Scalable Vector Search (SVS) integration by upgrading the SVS submodule and all related prebuilt library URLs to version 0.1.0. It also introduces a new unit test to verify the correctness and safety of SVS distance computations, especially with regard to memory alignment and hardware-accelerated implementations.

SVS version upgrade and integration:

  • Updated the ScalableVectorSearch submodule to the latest commit, bringing in the newest SVS features and fixes.
  • Changed all SVS prebuilt shared library URLs in cmake/svs.cmake from version 0.0.11 to 0.1.0, ensuring the project uses the latest SVS release for both Clang and GCC toolchains, and for all supported GLIBC versions.

Testing and validation improvements:

  • Added a new unit test compute_distance in test_svs.cpp to validate SVS distance computation functions. The test checks for correct handling of custom memory alignment using system page boundaries and verifies that hardware-optimized (AVX2/AVX512) and default implementations produce identical results.

Which issues this PR fixes

  1. #...
  2. MOD...

Main objects this PR modified

  1. SVS submodule and URLs
  2. SVS unit tests

Mark if applicable

  • This PR introduces API changes
  • This PR introduces serialization changes

meiravgri added a commit that referenced this pull request Dec 10, 2025
@rfsaliev rfsaliev force-pushed the rfsaliev/test-svs-distance branch from 79b8abd to 5128cf4 Compare December 11, 2025 12:18
@rfsaliev rfsaliev changed the title Add test with direct call to SVS distance computations [SVS] Add test with direct call to SVS distance computations Dec 11, 2025
@rfsaliev rfsaliev force-pushed the rfsaliev/test-svs-distance branch from f5d85b9 to a70e36d Compare December 17, 2025 10:04
@rfsaliev rfsaliev changed the title [SVS] Add test with direct call to SVS distance computations [SVS] Update SVS with distance computation fix and add unit test to validate the fix Dec 17, 2025
@rfsaliev rfsaliev marked this pull request as ready for review December 17, 2025 10:14
@rfsaliev
Copy link
Collaborator Author

It seems like here is duplication with #865...

@codecov
Copy link

codecov bot commented Dec 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.04%. Comparing base (1a89238) to head (a27655c).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #858      +/-   ##
==========================================
- Coverage   97.06%   97.04%   -0.03%     
==========================================
  Files         126      126              
  Lines        7403     7403              
==========================================
- Hits         7186     7184       -2     
- Misses        217      219       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@meiravgri
Copy link
Collaborator

@rfsaliev can you rebase once #865 is merged?

* Use system page protection to catch the unmasked vector loading issue
* Do not use pre-compiled SVS binaries but compile from sources
* Update SVS submodule to the latest main with AVX2 fixes
@rfsaliev rfsaliev force-pushed the rfsaliev/test-svs-distance branch from a70e36d to 0608bd4 Compare December 18, 2025 10:04
@rfsaliev rfsaliev changed the title [SVS] Update SVS with distance computation fix and add unit test to validate the fix [SVS] Add unit test to validate the compute distance fix Dec 18, 2025
auto dist_ip = svs::distance::compute(svs::DistanceIP{}, std::span(a, dim), std::span(b, dim));
EXPECT_GT(dist_ip, 0.0);

#ifdef __x86_64__
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there any value in running this test on non x86_64 platforms?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

no, isn't.

Copy link
Collaborator

Choose a reason for hiding this comment

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

so lets move it to guard the entire test

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I mean explicit calls to AVX2 and AVX512 optimizations make no sense on non-x86 platforms.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

moved

@meiravgri meiravgri enabled auto-merge December 18, 2025 11:47
@meiravgri meiravgri added this pull request to the merge queue Dec 18, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 18, 2025
@meiravgri meiravgri added this pull request to the merge queue Dec 18, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 18, 2025
@meiravgri meiravgri added this pull request to the merge queue Dec 18, 2025
Merged via the queue into main with commit e493894 Dec 18, 2025
19 checks passed
@meiravgri meiravgri deleted the rfsaliev/test-svs-distance branch December 18, 2025 14:18
github-actions bot pushed a commit that referenced this pull request Dec 18, 2025
* Add test with direct call to SVS distance computations

* Use system page protection to catch the unmasked vector loading issue
* Do not use pre-compiled SVS binaries but compile from sources
* Update SVS submodule to the latest main with AVX2 fixes

* Address code review comment

(cherry picked from commit e493894)
@github-actions
Copy link

Successfully created backport PR for 8.2:

github-merge-queue bot pushed a commit that referenced this pull request Dec 18, 2025
[SVS] Add unit test to validate the compute distance fix (#858)

* Add test with direct call to SVS distance computations

* Use system page protection to catch the unmasked vector loading issue
* Do not use pre-compiled SVS binaries but compile from sources
* Update SVS submodule to the latest main with AVX2 fixes

* Address code review comment

(cherry picked from commit e493894)

Co-authored-by: Rafik Saliev <rafik.f.saliev@intel.com>
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