Skip to content

Commit b7772b3

Browse files
committed
[faiss-sys] Update to v1.8.0
- checkout faiss commit referring to v1.8.0 - update gen_bindings.sh to use the latest bindgen version - update bindings.rs and bindings_gpu.rs
1 parent 3cc97ff commit b7772b3

File tree

4 files changed

+1779
-1655
lines changed

4 files changed

+1779
-1655
lines changed

faiss-sys/faiss

Submodule faiss updated 551 files

faiss-sys/gen_bindings.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,27 @@
44
# Ensure that the submodule is updated and checked out in the intended revision
55
if ! which bindgen > /dev/null; then
66
echo "ERROR: `bindgen` not found. Please install using cargo:"
7-
echo " cargo install bindgen"
7+
echo " cargo install bindgen-cli --version=^0.69"
88
exit 1
99
fi
1010

1111
repo_url=https://github.com/facebookresearch/faiss
12-
repo_rev=v1.7.2
12+
repo_rev=v1.8.0
1313
cuda_root=/opt/cuda
1414

1515
if [ ! -d faiss ]; then
1616
git clone "$repo_url" faiss --branch "$repo_rev" --depth 1
1717
fi
1818

19-
bindgen_opt='--size_t-is-usize --whitelist-function faiss_.* --whitelist-type idx_t|Faiss.* --opaque-type FILE'
19+
bindgen_opt='--allowlist-function faiss_.* --allowlist-type idx_t|Faiss.* --opaque-type FILE'
2020

2121
headers=`ls faiss/c_api/*_c.h faiss/c_api/impl/*_c.h faiss/c_api/utils/*_c.h`
2222
echo '// Auto-generated, do not edit!' > c_api.h
2323
for header in $headers; do
2424
echo "#include \""$header"\"" >> c_api.h;
2525
done
2626

27-
cmd="bindgen --rust-target 1.33 $bindgen_opt c_api.h -o src/bindings.rs"
27+
cmd="bindgen --rust-target 1.59 $bindgen_opt c_api.h -o src/bindings.rs"
2828
echo ${cmd}
2929
${cmd}
3030

@@ -33,7 +33,7 @@ for header in $headers; do
3333
echo "#include \""$header"\"" >> c_api.h;
3434
done
3535

36-
cmd="bindgen --rust-target 1.33 $bindgen_opt c_api.h -o src/bindings_gpu.rs -- -Ifaiss/c_api -I$cuda_root/include"
36+
cmd="bindgen --rust-target 1.59 $bindgen_opt c_api.h -o src/bindings_gpu.rs -- -Ifaiss/c_api -I$cuda_root/include"
3737
echo ${cmd}
3838
${cmd}
3939

0 commit comments

Comments
 (0)