Skip to content

Commit 06924db

Browse files
committed
Merge branch 'rfsaliev/cpp-runtime-binding' into eglaser/cpp-bindings-public-only
2 parents 5358b4f + 9a16d53 commit 06924db

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

bindings/cpp/src/dynamic_vamana_index.cpp

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,19 @@ using DynamicVamanaIndexLeanVecImplManager =
124124

125125
// DynamicVamanaIndex interface implementation
126126
Status DynamicVamanaIndex::check_storage_kind(StorageKind storage_kind) noexcept {
127-
return runtime_error_wrapper([&] {
128-
return storage::is_supported_storage_kind(storage_kind)
129-
? Status_Ok
130-
: Status(
131-
ErrorCode::INVALID_ARGUMENT,
132-
"The specified storage kind is not compatible with the "
133-
"DynamicVamanaIndex"
134-
);
127+
bool supported = false;
128+
auto status = runtime_error_wrapper([&] {
129+
supported = storage::is_supported_storage_kind(storage_kind);
135130
});
131+
if (!status.ok()) {
132+
return status;
133+
}
134+
return supported ? Status_Ok
135+
: Status(
136+
ErrorCode::INVALID_ARGUMENT,
137+
"The specified storage kind is not compatible with the "
138+
"DynamicVamanaIndex"
139+
);
136140
}
137141

138142
Status DynamicVamanaIndex::build(

docker/x86_64/test-cpp-runtime-bindings.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ conda install -y -c conda-forge cmake=3.30.4 make=4.2 swig=4.0 "numpy>=2.0,<3.0"
3131
conda install -y -c conda-forge gxx_linux-64=14.2 sysroot_linux-64=2.17
3232
conda install -y mkl=2022.2.1 mkl-devel=2022.2.1
3333

34-
# TODO: point to root repo eventually
34+
# TODO: point to root repo eventually
3535
git clone -b svs-io https://github.com/ahuber21/faiss.git
3636
cd faiss
3737
sed -i "s|set(SVS_URL .*|set(SVS_URL \"file:///runtime_lib/svs-cpp-runtime-bindings${SUFFIX}.tar.gz\" CACHE STRING \"SVS URL\")|" faiss/CMakeLists.txt
@@ -46,7 +46,7 @@ cmake -DBUILD_TESTING=ON -DFAISS_ENABLE_SVS=ON -DFAISS_ENABLE_GPU=OFF ..
4646
make -j swigfaiss faiss_test
4747
echo "------------------------------------------------"
4848
echo " FAISS C++ tests: "
49-
./tests/faiss_test --gtest_filter=SVS.*
49+
./tests/faiss_test --gtest_filter="SVS.*:SVS_LL.*:SVS_NoLL.*"
5050
echo "------------------------------------------------"
5151
echo " FAISS python bindings: "
5252
cd faiss/python/

0 commit comments

Comments
 (0)