-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Enable Intel ScalableVectorSearch support #4548
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
base: main
Are you sure you want to change the base?
Conversation
Support LVQ/LeanVec runtime quantization level
Enable SVS LeanVec
Support SVS index factory
|
The format step is requesting these changes (let me know if you can see logs, then I won't paste a huge block in the future): |
solved. Thanks! |
|
@mnorris11 has imported this pull request. If you are a Meta employee, you can view this in D84713772. |
| @@ -0,0 +1,72 @@ | |||
| /* | |||
| * Copyright (c) Meta Platforms, Inc. and affiliates. | |||
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.
Our internal linter is flagging that this copyright has 2 headers (which is OK), but we should prepend "Portions", so it should just read as "Portions Copyright ...etc" instead of starting with just "Copyright". I think this would be applicable to any new file added.
| if(FAISS_ENABLE_SVS) | ||
| list(APPEND FAISS_TEST_SRC test_svs.cpp) | ||
| endif() | ||
|
|
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.
For some reason the build is failing, even though there is a condition here for including test_svs.cpp. (Ideally no build will change from this PR, and we can add a CI for SVS enabled in a second PR.)
[100%] Building CXX object tests/CMakeFiles/faiss_test.dir/test_svs.cpp.o
https://github.com/facebookresearch/faiss/actions/runs/18384740136/job/52824514737?pr=4548
| option(FAISS_ENABLE_C_API "Build C API." OFF) | ||
| option(FAISS_ENABLE_EXTRAS "Build extras like benchmarks and demos" ON) | ||
| option(FAISS_USE_LTO "Enable Link-Time optimization" OFF) | ||
| option(FAISS_ENABLE_SVS "Enable SVS (Intel(R) Scalable Vector Search) integration." ON) |
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 the build failure due to this by default being ON?
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.
by default do we want to keep it ON or we want o keep it OFF? (concern stems from whether we are confident that SVS works on all platforms that we care to support, with the expected performance levels)
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.
Yeah after discussion, we plan to set OFF by default, and we will create a new CI which will enable it. If it does not break other platforms, eventually we can set ON by default, but that can be a separate PR.
update SVS lib to support gcc14
| svs->deserialize_impl(is); | ||
| idx = svs; | ||
| } else if (h == fourcc("ISVF")) { | ||
| // SVS Flat |
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.
nit: comment needed?
| find_package(svs REQUIRED) | ||
| target_compile_options(svs::svs INTERFACE "-DSVS_ENABLE_OMP=1") | ||
|
|
||
| target_link_libraries(faiss PUBLIC svs::svs svs::svs_shared_library) |
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.
nit: maybe we can use a loop?
fix(io): don't read too many bytes from IOReader
fix(svsio): allow writing/reading of non-initialized index
…-fixup fix store/load for vamana & leanvec
Pull Request resolved: #4450
This pull request introduces support for Intel ScalableVectorSearch, integrating Intel's proprietary LVQ and LeanVec technologies in binary form. The following index types are now supported:
IndexSVSVamana,IndexSVSVamanaLVQ,IndexSVSVamanaLeanVec, andIndexSVSFlat.IndexSVSVamanaandIndexSVSFlatutilizes SVS open-source float32/float16/int8 implementation.Key features and enhancements include:
search,add, andremove_idsrange_searchtutorial/directoryFAISS_ENABLE_SVSflag to allows users to optionally enable SVSTODOs:
IndexSVSIVFandIndexSVSFlatwith LVQ and LeanVec