-
Notifications
You must be signed in to change notification settings - Fork 41
Add leanvec_primary_only build option to C++ runtime #323
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
Open
ibhati
wants to merge
11
commits into
main
Choose a base branch
from
ib/leanvec-primary-only
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 8 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
f051d26
Add leanvec_primary_only build option to C++ runtime
ibhati b2ea2c5
Merge branch 'main' into ib/leanvec-primary-only
ibhati d49c5ca
ci: use public release tarball + ibhati/faiss for runtime tests
ibhati cacbfc8
Merge remote-tracking branch 'origin/main' into ib/leanvec-primary-only
ibhati 00f3b29
ci: point SVS_URL at leanvec-primary-only nightly tarball
ibhati ffb0cc4
ci: use glibc228-compatible leanvec-primary-only tarballs
ibhati 97a4902
ci: install curl in conda env for runtime tarball download
ibhati 544ddb5
ci: use glibc228-compatible svs_runtime tarball
ibhati 267e288
ci: install libsvs-runtime from local conda package (per Ethan's review)
ibhati 8c13acc
Merge remote-tracking branch 'origin/main' into ib/leanvec-primary-only
ibhati e9551eb
Merge remote-tracking branch 'origin/main' into ib/leanvec-primary-only
ibhati File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -27,15 +27,30 @@ conda create -y -n svsenv python=3.11 | |||||||||||||||||||||||||
| source /opt/conda/etc/profile.d/conda.sh | ||||||||||||||||||||||||||
| conda activate svsenv | ||||||||||||||||||||||||||
| conda config --set solver libmamba | ||||||||||||||||||||||||||
| conda install -y -c conda-forge cmake=3.30.4 make=4.2 swig=4.0 "numpy>=2.0,<3.0" scipy=1.16 pytest=7.4 gflags=2.2 setuptools | ||||||||||||||||||||||||||
| conda install -y -c conda-forge cmake=3.30.4 make=4.2 swig=4.0 "numpy>=2.0,<3.0" scipy=1.16 pytest=7.4 gflags=2.2 setuptools curl | ||||||||||||||||||||||||||
| conda install -y -c conda-forge gxx_linux-64=14.2 sysroot_linux-64=2.17 | ||||||||||||||||||||||||||
| conda install -y mkl=2025.3 mkl-devel=2025.3 | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| # Install libsvs-runtime from local conda package | ||||||||||||||||||||||||||
| conda install -y /runtime_conda/libsvs-runtime-*.conda | ||||||||||||||||||||||||||
| # Install libsvs-runtime from the public release tarball (includes the | ||||||||||||||||||||||||||
| # leanvec_primary_only API). Once a conda-forge package with this API is | ||||||||||||||||||||||||||
| # published, this can revert to: | ||||||||||||||||||||||||||
| # conda install -y /runtime_conda/libsvs-runtime-*.conda | ||||||||||||||||||||||||||
| SVS_RUNTIME_URL="${SVS_RUNTIME_URL:-https://github.com/intel/ScalableVectorSearch/releases/download/nightly/svs_runtime-0.3.0-linux-x86_64-leanvec-primary-only-glibc228.tar.gz}" | ||||||||||||||||||||||||||
| SVS_RUNTIME_PREFIX="${SVS_RUNTIME_PREFIX:-$HOME/svs_runtime}" | ||||||||||||||||||||||||||
| mkdir -p "$SVS_RUNTIME_PREFIX" | ||||||||||||||||||||||||||
| curl -fsSL "$SVS_RUNTIME_URL" | tar -xz -C "$SVS_RUNTIME_PREFIX" | ||||||||||||||||||||||||||
| export CMAKE_PREFIX_PATH="$SVS_RUNTIME_PREFIX${CMAKE_PREFIX_PATH:+:$CMAKE_PREFIX_PATH}" | ||||||||||||||||||||||||||
| export LD_LIBRARY_PATH="$SVS_RUNTIME_PREFIX/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" | ||||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| # Validate python and C++ tests against FAISS CI | ||||||||||||||||||||||||||
| git clone https://github.com/facebookresearch/faiss.git | ||||||||||||||||||||||||||
| # NOTE: temporarily clone the ibhati/faiss fork's leanvec_primary_only | ||||||||||||||||||||||||||
| # branch instead of upstream facebookresearch/faiss, since the new | ||||||||||||||||||||||||||
| # leanvec_primary_only API is not yet merged upstream. Revert to | ||||||||||||||||||||||||||
| # `git clone https://github.com/facebookresearch/faiss.git` once the | ||||||||||||||||||||||||||
| # corresponding FAISS PR lands. | ||||||||||||||||||||||||||
| FAISS_REPO="${FAISS_REPO:-https://github.com/ibhati/faiss.git}" | ||||||||||||||||||||||||||
| FAISS_BRANCH="${FAISS_BRANCH:-ib/leanvec-primary-only}" | ||||||||||||||||||||||||||
| git clone --depth 1 --branch "$FAISS_BRANCH" "$FAISS_REPO" faiss | ||||||||||||||||||||||||||
| cd faiss | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| echo "===============================================" | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -105,7 +105,8 @@ struct SVS_RUNTIME_API DynamicVamanaIndexLeanVec : public DynamicVamanaIndex { | |
| size_t leanvec_dims, | ||
| const VamanaIndex::BuildParams& params, | ||
| const VamanaIndex::SearchParams& default_search_params, | ||
| const VamanaIndex::DynamicIndexParams& dynamic_index_params | ||
| const VamanaIndex::DynamicIndexParams& dynamic_index_params, | ||
| bool leanvec_primary_only = false | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why didn't you just extend the |
||
| ) noexcept; | ||
|
|
||
| // Specialization to build LeanVec-based Vamana index with provided training data | ||
|
|
@@ -128,7 +129,8 @@ struct SVS_RUNTIME_API DynamicVamanaIndexLeanVec : public DynamicVamanaIndex { | |
| const LeanVecTrainingData* training_data, | ||
| const VamanaIndex::BuildParams& params, | ||
| const VamanaIndex::SearchParams& default_search_params, | ||
| const VamanaIndex::DynamicIndexParams& dynamic_index_params | ||
| const VamanaIndex::DynamicIndexParams& dynamic_index_params, | ||
| bool leanvec_primary_only = false | ||
| ) noexcept; | ||
| }; | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.