-
Notifications
You must be signed in to change notification settings - Fork 21
[SVS] Add unit test to validate the compute distance fix #858
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
79b8abd to
5128cf4
Compare
f5d85b9 to
a70e36d
Compare
|
It seems like here is duplication with #865... |
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
* 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
a70e36d to
0608bd4
Compare
tests/unit/test_svs.cpp
Outdated
| 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__ |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, isn't.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved
* 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)
|
Successfully created backport PR for |
[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>
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:
ScalableVectorSearchsubmodule to the latest commit, bringing in the newest SVS features and fixes.cmake/svs.cmakefrom 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:
compute_distanceintest_svs.cppto 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
Main objects this PR modified
Mark if applicable