Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
206 commits
Select commit Hold shift + click to select a range
be12427
Upstream changes to big batch search (#3170)
mlomeli1 Dec 12, 2023
9a8b34e
Offline IVF powered by faiss big batch search (#3175)
mlomeli1 Dec 18, 2023
5621487
Remove unused function from faiss/impl/ProductQuantizer.cpp
r-barnes Dec 21, 2023
65b08ef
Remove unused function from faiss/utils/quantize_lut.cpp
r-barnes Dec 21, 2023
77c28f8
Back out "Offline IVF powered by faiss big batch search"
algoriddle Dec 22, 2023
9d74f09
Adding [[fallthrough]] annotation to case statements in faiss/utils/h…
Dec 23, 2023
0727fff
Adding [[fallthrough]] annotation to case statements in faiss/utils/h…
EddyLXJ Dec 26, 2023
449f02c
Add missing fallthrough to fbcode/faiss/utils/hamming_distance/neon-i…
r-barnes Dec 27, 2023
b7681be
Remove unused exception parameter from files inc facer/engine/utils/S…
r-barnes Jan 3, 2024
beef610
faiss paper benchmarks (#3189)
algoriddle Jan 5, 2024
db09984
Fix shadowed variable in faiss/impl/simd_result_handlers.h
r-barnes Jan 8, 2024
952941b
Fix shadowed variable in faiss/MatrixStats.cpp
r-barnes Jan 9, 2024
c399b11
Fix shadowed variable in faiss/utils/hamming.cpp
r-barnes Jan 9, 2024
42b6216
Fix shadowed variable in faiss/impl/ScalarQuantizer.cpp
r-barnes Jan 9, 2024
0710cbd
Fix shadowed variable in faiss/impl/ResultHandler.h
r-barnes Jan 9, 2024
0013c70
avx512 CI + conda packages (#3197)
algoriddle Jan 11, 2024
32f0e8c
Generalize ResultHanlder, support range search for HNSW and Fast Scan…
mdouze Jan 11, 2024
c3aa526
Add SIMD NEON Optimization for QT_FP16 in Scalar Quantizer (#3166)
naveentatikonda Jan 11, 2024
b7efd3a
bump libraft version to fix nightly
algoriddle Jan 13, 2024
f884ba2
Remove unused variables in faiss/IndexHNSW.cpp
r-barnes Jan 14, 2024
cfcefc0
Remove unused variables in faiss/utils/sorting.cpp
r-barnes Jan 14, 2024
7442a54
Fix shadowed variable in faiss/impl/index_write.cpp
r-barnes Jan 14, 2024
1be1d32
Fix shadowed variable in faiss/impl/io.cpp
r-barnes Jan 14, 2024
46320e0
Fix shadowed variable in faiss/utils/hamming_distance/avx2-inl.h
r-barnes Jan 14, 2024
3973017
Fix shadowed variable in faiss/IndexBinaryIVF.cpp
r-barnes Jan 16, 2024
4150fb1
Fix shadowed variable in faiss/impl/PolysemousTraining.cpp
r-barnes Jan 16, 2024
0fc8456
Offline IVF powered by faiss big batch search (#3202)
mlomeli1 Jan 16, 2024
7dd06dd
Fix shadowed variable in faiss/impl/NNDescent.cpp
r-barnes Jan 16, 2024
9a63a3c
Fix shadowed variable in faiss/IndexFastScan.cpp
r-barnes Jan 16, 2024
739ce13
doc update to mention the paper
mdouze Jan 17, 2024
5e3eae4
Remove unused variables in faiss/utils/hamming.cpp
r-barnes Jan 18, 2024
091f344
add gpu to avx512 (#3210)
algoriddle Jan 18, 2024
c540e76
Use packaging instead of deprecated distutils for version handling (#…
kyamagu Jan 18, 2024
aff812e
Fix shadowed variable in faiss/clone_index.cpp
r-barnes Jan 19, 2024
7f3e0a3
Mismatch tags take 2 (#3211)
r-barnes Jan 21, 2024
7e01b47
fix raft build
algoriddle Jan 22, 2024
3e666ae
Remove extra semi colon from faiss/invlists/InvertedLists.cpp
r-barnes Jan 23, 2024
522452f
Remove extra semi colon from faiss/python/python_callbacks.cpp
r-barnes Jan 23, 2024
683eadf
Remove extra semi colon from faiss/utils/distances_simd.cpp
r-barnes Jan 23, 2024
b10eb35
Remove extra semi colon from faiss/Clustering.cpp
r-barnes Jan 23, 2024
e19de27
Remove extra semi colon from faiss/IndexIVFFastScan.cpp
r-barnes Jan 23, 2024
a651069
Remove unused variables in faiss/impl/index_read.cpp
r-barnes Jan 23, 2024
e55a0ac
Remove unused variables in faiss/impl/index_write.cpp
r-barnes Jan 23, 2024
b274cb4
Remove unused variables in faiss/IndexIVFFastScan.cpp
r-barnes Jan 23, 2024
a70a8a5
Remove unused variables in faiss/impl/HNSW.cpp
r-barnes Jan 23, 2024
bffedda
Fix shadowed variable in faiss/IndexIDMap.cpp
r-barnes Jan 23, 2024
0716bde
Fix shadowed variable in faiss/IndexNSG.cpp
r-barnes Jan 23, 2024
bbb6ec7
Remove unused variables in faiss/IndexShardsIVF.cpp
r-barnes Jan 23, 2024
e8494f6
Remove unused variables in faiss/IndexBinaryHash.cpp
r-barnes Jan 24, 2024
99c0e2b
Remove unused variables in faiss/utils/sorting.cpp
r-barnes Jan 24, 2024
63edc32
Fix AVX512 build targets in CMakeLists.txt (#3214)
kyamagu Jan 24, 2024
12637a2
Fix shadowed variable in faiss/utils/utils.cpp
r-barnes Jan 24, 2024
7c4fb6d
Fix shadowed variable in faiss/impl/ResultHandler.h
r-barnes Jan 24, 2024
ae25b1b
Fix shadowed variable in faiss/impl/residual_quantizer_encode_steps.cpp
r-barnes Jan 24, 2024
a7b76a7
Fix shadowed variable in faiss/IndexAdditiveQuantizerFastScan.cpp
r-barnes Jan 24, 2024
6b2c79c
Remove extra semi colon from faiss/index_factory.cpp
r-barnes Jan 24, 2024
fc4dbd5
Remove extra semi colon from faiss/IndexIVFSpectralHash.cpp
r-barnes Jan 24, 2024
a30fd74
Remove unused function from faiss/clone_index.cpp
r-barnes Jan 24, 2024
c4b91a5
Replace pickle serialization to address security vulnerability
algoriddle Jan 25, 2024
51b6083
faiss on rocksdb demo (#3216)
algoriddle Jan 25, 2024
1dcb5d3
Add missing header files (#3218)
kyamagu Jan 25, 2024
898ce35
Remove unused function from faiss/utils/distances_simd.cpp
r-barnes Jan 25, 2024
67c6a19
Remove extra semi colon from faiss/impl/ProductAdditiveQuantizer.h
r-barnes Jan 27, 2024
2817344
fix ACCESS VIOLATION error when searching using IDSelectorArray
algoriddle Jan 30, 2024
31bddeb
add faiss_gpu lib (#3222)
algoriddle Jan 30, 2024
420d25f
Index pretransform support in search_preassigned (#3225)
mlomeli1 Jan 30, 2024
75ae0bf
Remove unused variables in faiss/IndexScalarQuantizer.cpp
r-barnes Jan 30, 2024
1d0e8d4
index optimizer (#3154)
algoriddle Jan 30, 2024
c1822a8
cuda dependencies (#3230)
algoriddle Jan 31, 2024
31a29d0
HNSW search use efSearch from params if provided (#3233)
xinhuitian Feb 2, 2024
ed3f6e5
faiss-gpu to use 11.4.4 and be the only one supporting P100 (#3237)
algoriddle Feb 2, 2024
bfa46a3
pin circleci windows image (#3248)
algoriddle Feb 9, 2024
ebb5f84
add a context parameter to InvertedLists and InvertedListsIterator (#…
bladepan Feb 9, 2024
8898eab
Add feature in IndexIDMap.cpp range_search with Parameters. (#3213)
yuhaijun999 Feb 13, 2024
f262011
fix omp parallelism in fast scan range search
algoriddle Feb 13, 2024
a187394
libraft 24.02 is released, switching channel
algoriddle Feb 14, 2024
aaca1c2
Remove semicolon(s) from 3 files inc facer/engine/utils/UDPServer.h
r-barnes Feb 14, 2024
53fc617
Remove unused variables in faiss/tests/test_threaded_index.cpp
r-barnes Feb 14, 2024
1b0d274
Remove unused variables in faiss/IndexIVF.cpp
r-barnes Feb 15, 2024
1338e0d
Remove unused variables in faiss/IndexBinaryIVF.cpp
r-barnes Feb 15, 2024
a87b432
Remove unused variables in faiss/IndexIVFPQ.cpp
r-barnes Feb 15, 2024
c0624d2
Remove unused variables in faiss/invlists/OnDiskInvertedLists.cpp
r-barnes Feb 15, 2024
6d00c41
Remove unused variables in faiss/utils/hamming_distance/neon-inl.h
r-barnes Feb 15, 2024
873b1bc
fix perf test (#3253)
algoriddle Feb 15, 2024
8400ece
Remove unused variables in faiss/utils/partitioning.cpp
r-barnes Feb 15, 2024
c577f43
fix perf test (#3255)
algoriddle Feb 15, 2024
87d43b9
Fix AVX2 build on Windows (#3238)
borrrden Feb 15, 2024
27b1055
Integrate IVF-PQ from RAFT (#3044)
tarang-jain Feb 21, 2024
b8d91d8
fixes for D51074065
algoriddle Feb 21, 2024
abff75e
faiss gpu: fix DeviceVector reallocations (#3256)
Feb 21, 2024
943d08b
Prepare for v.1.8.0 release (#3265)
junjieqi Feb 29, 2024
12b92e9
Skip HNSWPQ sdc init with new io flag (#3250)
jmazanec15 Mar 1, 2024
dafdff1
Change intall.md to reflect faiss 1.8.0
junjieqi Mar 4, 2024
e99ad12
AIX compilation fix for io classes (#3275)
ranjitsastra Mar 15, 2024
d5e4c79
Removed index_shard_and_quantize OIVFBBS (#3291)
mlomeli1 Mar 18, 2024
7d21c92
Dim reduction support in OIVFBBS (#3290)
mlomeli1 Mar 18, 2024
f7fe62e
Remove swig version and always rely on the latest version (#3295)
junjieqi Mar 19, 2024
cf364ec
Remove unused fallthrough (#3296)
junjieqi Mar 19, 2024
0e06a28
Revert D54973709: Remove unused fallthrough
Mar 19, 2024
6f3843e
Back out "Remove swig version and always rely on the latest version" …
junjieqi Mar 19, 2024
5483f21
Use cmake's find_package to link to GTest (#3278)
yurivict Mar 20, 2024
9c79e3d
RAFT 24.04 API changes (#3282)
divyegala Mar 20, 2024
8274c38
Remove TypedStorage usage when working with torch_utils (#3301)
ramilbakhshyiev Mar 21, 2024
b77061f
move to raft 24.04 (#3302)
algoriddle Mar 21, 2024
fa1f39e
Fix HNSW stats (#3309)
mdouze Mar 22, 2024
798427c
Handling FaissException in few destructors of ResultHandler.h (#3311)
kuarora Mar 22, 2024
af5793c
Adding test for IndexBinaryFlat.reconstruct_n() (#3310)
kuarora Mar 22, 2024
0c96b0d
enable rapidsai-nightly channel for libraft (#3317)
algoriddle Mar 25, 2024
14b8af6
Fix IVFPQFastScan decode function (#3312)
junjieqi Mar 25, 2024
55dc880
Change cmake to build googletest from source (#3319)
junjieqi Mar 27, 2024
03db694
Fix problems when using 64-bit integers. (#3322)
Mar 28, 2024
d685413
Fix faiss swig build with version > 4.2.x (#3315)
junjieqi Mar 29, 2024
d99f07e
AVX512 for PQFastScan (#3276)
alexanderguzhva Mar 29, 2024
4e6b6f8
Add the ability to clone and read binary indexes to the C API. (#3318)
aalekhpatel07 Mar 29, 2024
77e2e79
Throw when attempting to move IndexPQ to GPU (#3328)
ramilbakhshyiev Mar 29, 2024
c9c86f0
Fix missing overload variable in Rocksdb ivf demo (#3326)
Warmchay Apr 2, 2024
da9f292
Support of skip_ids in merge_from_multiple function of OnDiskInverted…
kuarora Apr 3, 2024
cfc7fe5
Implement reconstruct_n for GPU IVFFlat indexes (#3338)
junjieqi Apr 5, 2024
f34588a
Support for Remove ids from IVFPQFastScan index (#3349)
kuarora Apr 5, 2024
7657e81
Change index_cpu_to_gpu to throw for indices not implemented on GPU (…
ramilbakhshyiev Apr 6, 2024
366a814
Revert D55723390: Support for Remove ids from IVFPQFastScan index
Apr 6, 2024
252ae16
Support for Remove ids from IVFPQFastScan index (#3354)
kuarora Apr 9, 2024
17fbeb8
Improve filtering & search parameters propagation (#3304)
alexanderguzhva Apr 11, 2024
40e8643
selector parameter for FastScan (#3362)
mdouze Apr 11, 2024
acd06d6
Switch sprintf to snprintf (#3363)
junjieqi Apr 12, 2024
a35eb0a
Remove unused variables in faiss/IndexIVF.cpp
r-barnes Apr 12, 2024
ab2b7f5
Apply clang-format 18
zertosh Apr 14, 2024
0169f29
Update required cmake version to 3.24. (#3305)
iotamudelta Apr 17, 2024
3677ab5
Switch clang-format-11 to clang-format-18 (#3372)
junjieqi Apr 19, 2024
5893ab7
remove unused code (#3371)
junjieqi Apr 22, 2024
b2e91f6
Unroll loop in lookup_2_lanes (#3364)
Apr 24, 2024
67574aa
Fix the endianness issue in AIX while running the benchmark. (#3345)
KamathForAIX Apr 24, 2024
783e044
support big-endian machines (#3361)
mdouze Apr 24, 2024
2379b45
Few fixes in bench_fw to enable IndexFromCodec (#3383)
kuarora Apr 24, 2024
03750f5
Fix IndexBinary.assign Python method
Apr 24, 2024
bd22c93
Fix swig osx (#3357)
junjieqi Apr 25, 2024
5cbff67
fix raft log spew
algoriddle Apr 26, 2024
a233bc9
Demo on how to address mulitple index contents
mdouze Apr 26, 2024
c5599a0
Fix deprecated use of 0/NULL in faiss/python/python_callbacks.cpp + 1
r-barnes Apr 27, 2024
7e1d2b1
Initial config and linux-x86_64-cmake build job only
ramilbakhshyiev Apr 29, 2024
825cbac
Add linux-x86_64-AVX2-cmake build
ramilbakhshyiev Apr 30, 2024
3121fc6
Fix #3379: Add tutorial for HNSW index (#3381)
JayjeetAtGithub Apr 30, 2024
c92b480
Add format check
ramilbakhshyiev Apr 30, 2024
5fd8b81
Enable linux-x86_64-conda build via GitHub Actions (#3405)
ramilbakhshyiev May 1, 2024
74562b2
Enable windows-x86_64-conda build via GitHub Actions (#3406)
ramilbakhshyiev May 1, 2024
96b88ac
Enable linux-arm64-conda check via GitHub Actions (#3407)
ramilbakhshyiev May 2, 2024
7b8b981
Enable packages builds on main for windows, linux-arm64, linux-x86_64…
ramilbakhshyiev May 3, 2024
1b1a403
Change linux-arm64-packages build to use 2-core-ubuntu-arm for better…
ramilbakhshyiev May 3, 2024
0cc0e19
Enable osx-arm64-packages build via GitHub Actions (#3411)
ramilbakhshyiev May 3, 2024
b3e3c2d
TimeoutCallback C++ and Python (#3417)
May 9, 2024
34fa2ae
Enable linux-x86_64-GPU-w-RAFT-cmake build via GitHub Actions (#3418)
ramilbakhshyiev May 9, 2024
e1e4ad0
PowerPC, improve code generation for function fvec_L2sqr (#3416)
May 10, 2024
b487c62
Update system dependencies to enable CUDA builds on v6 kernel and new…
ramilbakhshyiev May 13, 2024
2e04533
Enable linux-x86_64-GPU-cmake build on GitHub Actions (#3427)
ramilbakhshyiev May 13, 2024
4d06d70
Add disabled linux-x86_64-AVX512-cmake build on GitHub Actions (#3428)
ramilbakhshyiev May 13, 2024
83df64c
Get rid of redundant instructions in ScalarQuantizer (#3430)
alexanderguzhva May 15, 2024
509f4c1
fix install instructions (#3442)
mdouze May 15, 2024
558a7c3
interrupt for NNDescent (#3432)
May 15, 2024
b8e4489
Remove unused variables in faiss/IndexIVFFastScan.cpp (#3439)
r-barnes May 15, 2024
2050a03
Add cuda-toolkit package dependency to faiss-gpu and faiss-gpu-raft c…
ramilbakhshyiev May 15, 2024
745bca8
stabilize formatting for bench_cppcontrib_sa_decode.cpp (#3443)
May 15, 2024
72571c7
Enable both RAFT package builds and CUDA 12.1.1 GPU package build (#3…
ramilbakhshyiev May 15, 2024
1876925
Implement METRIC.NaNEuclidean (#3414)
May 16, 2024
4972abd
Improve testing code step 1 (#3451)
fxdawnn May 16, 2024
bf8bd6b
Delete all remaining print (#3452)
fxdawnn May 17, 2024
e822a8c
GitHub Actions files cleanup (#3454)
ramilbakhshyiev May 17, 2024
5e452ed
Cleaning up more unnecessary print (#3455)
fxdawnn May 17, 2024
0c983f3
Workaround for CUDA 11.4.4 build in Conda on Ubuntu 22 / v6 kernel (#…
ramilbakhshyiev May 20, 2024
86bf74d
Enable linux-x86_64-GPU-packages-CUDA-11-4-4 build via GitHub Actions…
ramilbakhshyiev May 20, 2024
7fc8184
Relax version requirements for action steps (#3461)
ramilbakhshyiev May 20, 2024
8c95c69
Fix linter warnings in faiss-gpu Conda build script (#3463)
ramilbakhshyiev May 20, 2024
0698ac7
Properly pass the label for conda upload steps (#3464)
ramilbakhshyiev May 21, 2024
a60a9e5
Fix CUDA 11.4.4 builds under CircleCI (#3466)
ramilbakhshyiev May 21, 2024
c1528b5
Enable nightly builds via GitHub Actions (#3467)
ramilbakhshyiev May 21, 2024
4489773
Add tutorial for FastScan (#3465)
fxdawnn May 21, 2024
59e3ee1
Missed printing 'D' (#3433)
saarthdeshpande May 21, 2024
f38e52c
Add tutorial on PQFastScan for cpp (#3468)
fxdawnn May 21, 2024
7d7fef0
Add FastScan refinement tutorial for python (#3469)
fxdawnn May 22, 2024
f352168
Fix cron schedule for nightlies via GitHub Actions (#3470)
ramilbakhshyiev May 22, 2024
b39dd4d
Fix CUDA 11.4.4 nightly in GitHub Actions (#3473)
ramilbakhshyiev May 22, 2024
414fd1e
Add tutorial for FastScan with refinement for cpp (#3474)
fxdawnn May 22, 2024
6a94c67
QT_bf16 for scalar quantizer for bfloat16 (#3444)
alexanderguzhva May 23, 2024
ee7ce21
Add display names to all PR build jobs on GitHub Actions (#3475)
ramilbakhshyiev May 23, 2024
93bc9b6
Gate all PR builds behind linux-x86_64-cmake in GitHub Actions (#3476)
ramilbakhshyiev May 23, 2024
eec4cba
Disable CircleCI builds (#3477)
ramilbakhshyiev May 23, 2024
729a66f
Remove extra semi colon from deprecated/libmccpp/ThreadSafeClientPool…
r-barnes May 23, 2024
eb28481
Remove duplicate NegativeDistanceComputer instances (#3450)
alexanderguzhva May 23, 2024
6580156
Delete Raft Handle (#3435)
tarang-jain May 23, 2024
6e423cc
Add python tutorial on different indexs refinement and respect accura…
fxdawnn May 27, 2024
db6ff2e
Workaround for missing intrinsic on gcc < 9 (#3481)
borrrden May 28, 2024
6e7d9e0
fix algorithm of spreading vectors over shards (#3374)
simshi May 28, 2024
0beecb4
sys.big_endian to sys.byteorder (#3422)
kuarora May 30, 2024
2230434
Adding buck target for experiment bench_fw_ivf (#3423)
kuarora May 31, 2024
bf73e38
add skip_storage flag to HNSW (#3487)
mdouze May 31, 2024
a900cfa
Add cpp tutorial for index factory refine index construction (#3494)
fxdawnn Jun 5, 2024
ec67ac1
Update .gitignore (#3492)
abhiramvad Jun 5, 2024
df0dea6
Interop between CAGRA and HNSW (#3252)
divyegala Jun 11, 2024
f71d5b9
fix spurious include to land the cagra diff (#3502)
mdouze Jun 11, 2024
3d32330
add use_raft to knn_gpu (torch) (#3509)
algoriddle Jun 13, 2024
d45f78b
Add conda bin to path early in the cmake GitHub action (#3512)
ramilbakhshyiev Jun 13, 2024
34feae4
typo in test_io_no_storage (#3515)
algoriddle Jun 13, 2024
44d21ee
Consolidate build environment configuration steps in cmake builds (#3…
ramilbakhshyiev Jun 14, 2024
e65a910
fix Windows build - signed int OMP for MSVC (#3517)
algoriddle Jun 14, 2024
849557a
Unbreak RAFT conda builds (#3519)
ramilbakhshyiev Jun 17, 2024
e188eb3
Bump libraft to 24.06 to unblock nightly RAFT builds (#3522)
ramilbakhshyiev Jun 18, 2024
e758973
Add ABS_INNER_PRODUCT metric (#3524)
mdouze Jun 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
384 changes: 15 additions & 369 deletions .circleci/config.yml

Large diffs are not rendered by default.

105 changes: 105 additions & 0 deletions .github/actions/build_cmake/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: Build cmake
inputs:
opt_level:
description: 'Compile options / optimization level.'
required: false
default: generic
gpu:
description: 'Enable GPU support.'
required: false
default: OFF
raft:
description: 'Enable RAFT support.'
required: false
default: OFF
runs:
using: composite
steps:
- name: Setup miniconda
uses: conda-incubator/setup-miniconda@v3
with:
python-version: '3.11'
miniconda-version: latest
- name: Configure build environment
shell: bash
run: |
# initialize Conda
conda config --set solver libmamba
conda update -y -q conda
echo "$CONDA/bin" >> $GITHUB_PATH

# install base packages
conda install -y -q -c conda-forge gxx_linux-64=11.2 sysroot_linux-64=2.28
conda install -y -q python=3.11 cmake make swig mkl=2023 mkl-devel=2023 numpy scipy pytest

# install CUDA packages
if [ "${{ inputs.gpu }}" = "ON" ] && [ "${{ inputs.raft }}" = "OFF" ]; then
conda install -y -q cuda-toolkit -c "nvidia/label/cuda-11.8.0"
fi

# install RAFT packages
if [ "${{ inputs.raft }}" = "ON" ]; then
conda install -y -q libraft cuda-version=11.8 cuda-toolkit -c rapidsai-nightly -c "nvidia/label/cuda-11.8.0" -c conda-forge
fi

# install test packages
conda install -y pytest
if [ "${{ inputs.gpu }}" = "ON" ]; then
conda install -y -q pytorch pytorch-cuda=11.8 -c pytorch -c nvidia/label/cuda-11.8.0
else
conda install -y -q pytorch -c pytorch
fi
- name: Build all targets
shell: bash
run: |
eval "$(conda shell.bash hook)"
conda activate
cmake -B build \
-DBUILD_TESTING=ON \
-DBUILD_SHARED_LIBS=ON \
-DFAISS_ENABLE_GPU=${{ inputs.gpu }} \
-DFAISS_ENABLE_RAFT=${{ inputs.raft }} \
-DFAISS_OPT_LEVEL=${{ inputs.opt_level }} \
-DFAISS_ENABLE_C_API=ON \
-DPYTHON_EXECUTABLE=$CONDA/bin/python \
-DCMAKE_BUILD_TYPE=Release \
-DBLA_VENDOR=Intel10_64_dyn \
-DCMAKE_CUDA_FLAGS="-gencode arch=compute_75,code=sm_75" \
.
make -k -C build -j$(nproc)
- name: C++ tests
shell: bash
run: |
export GTEST_OUTPUT="xml:$(realpath .)/test-results/googletest/"
make -C build test
- name: Install Python extension
shell: bash
working-directory: build/faiss/python
run: |
$CONDA/bin/python setup.py install
- name: Python tests (CPU only)
if: inputs.gpu == 'OFF'
shell: bash
run: |
pytest --junitxml=test-results/pytest/results.xml tests/test_*.py
pytest --junitxml=test-results/pytest/results-torch.xml tests/torch_*.py
- name: Python tests (CPU + GPU)
if: inputs.gpu == 'ON'
shell: bash
run: |
pytest --junitxml=test-results/pytest/results.xml tests/test_*.py
pytest --junitxml=test-results/pytest/results-torch.xml tests/torch_*.py
cp tests/common_faiss_tests.py faiss/gpu/test
pytest --junitxml=test-results/pytest/results-gpu.xml faiss/gpu/test/test_*.py
pytest --junitxml=test-results/pytest/results-gpu-torch.xml faiss/gpu/test/torch_*.py
- name: Test avx2 loading
if: inputs.opt_level == 'avx2'
shell: bash
run: |
FAISS_DISABLE_CPU_FEATURES=AVX2 LD_DEBUG=libs $CONDA/bin/python -c "import faiss" 2>&1 | grep faiss.so
LD_DEBUG=libs $CONDA/bin/python -c "import faiss" 2>&1 | grep faiss_avx2.so
- name: Upload test results
uses: actions/upload-artifact@v4
with:
name: test-results-${{ inputs.opt_level }}-${{ inputs.gpu }}-${{ inputs.raft }}
path: test-results
96 changes: 96 additions & 0 deletions .github/actions/build_conda/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: Conda build
description: Builds FAISS inside a Conda environment and uploads to repository when label is provided.
inputs:
label:
description: "The label to be used for uploads to Conda."
default: ""
required: false
cuda:
description: "CUDA toolkit version to use."
default: ""
required: false
raft:
description: "Enable RAFT support."
default: ""
required: false
compiler_version:
description: "compiler_version"
default: "Compiler version for C/C++/CUDA."
required: false
runs:
using: composite
steps:
- name: Choose shell
shell: bash
id: choose_shell
run: |
# Use pwsh on Windows; bash everywhere else
if [ "${{ runner.os }}" != "Windows" ]; then
echo "shell=bash" >> "$GITHUB_OUTPUT"
else
echo "shell=pwsh" >> "$GITHUB_OUTPUT"
fi
- name: Setup miniconda
uses: conda-incubator/setup-miniconda@v3
with:
python-version: '3.11'
miniconda-version: latest
- name: Install conda build tools
shell: ${{ steps.choose_shell.outputs.shell }}
run: |
conda update -y -q conda
conda install -y -q conda-build
- name: Enable anaconda uploads
if: inputs.label != ''
shell: ${{ steps.choose_shell.outputs.shell }}
env:
PACKAGE_TYPE: ${{ inputs.label }}
run: |
conda install -y -q anaconda-client
conda config --set anaconda_upload yes
- name: Conda build (CPU)
if: inputs.label == '' && inputs.cuda == ''
shell: ${{ steps.choose_shell.outputs.shell }}
working-directory: conda
run: |
conda build faiss --python 3.11 -c pytorch
- name: Conda build (CPU) w/ anaconda upload
if: inputs.label != '' && inputs.cuda == ''
shell: ${{ steps.choose_shell.outputs.shell }}
working-directory: conda
env:
PACKAGE_TYPE: ${{ inputs.label }}
run: |
conda build faiss --user pytorch --label ${{ inputs.label }} -c pytorch
- name: Conda build (GPU)
if: inputs.label == '' && inputs.cuda != '' && inputs.raft == ''
shell: ${{ steps.choose_shell.outputs.shell }}
working-directory: conda
run: |
conda build faiss-gpu --variants '{ "cudatoolkit": "${{ inputs.cuda }}", "c_compiler_version": "${{ inputs.compiler_version }}", "cxx_compiler_version": "${{ inputs.compiler_version }}" }' \
-c pytorch -c nvidia/label/cuda-${{ inputs.cuda }} -c nvidia
- name: Conda build (GPU) w/ anaconda upload
if: inputs.label != '' && inputs.cuda != '' && inputs.raft == ''
shell: ${{ steps.choose_shell.outputs.shell }}
working-directory: conda
env:
PACKAGE_TYPE: ${{ inputs.label }}
run: |
conda build faiss-gpu --variants '{ "cudatoolkit": "${{ inputs.cuda }}", "c_compiler_version": "${{ inputs.compiler_version }}", "cxx_compiler_version": "${{ inputs.compiler_version }}" }' \
--user pytorch --label ${{ inputs.label }} -c pytorch -c nvidia/label/cuda-${{ inputs.cuda }} -c nvidia
- name: Conda build (GPU w/ RAFT)
if: inputs.label == '' && inputs.cuda != '' && inputs.raft != ''
shell: ${{ steps.choose_shell.outputs.shell }}
working-directory: conda
run: |
conda build faiss-gpu-raft --variants '{ "cudatoolkit": "${{ inputs.cuda }}", "c_compiler_version": "${{ inputs.compiler_version }}", "cxx_compiler_version": "${{ inputs.compiler_version }}" }' \
-c pytorch -c nvidia/label/cuda-${{ inputs.cuda }} -c nvidia -c rapidsai -c rapidsai-nightly -c conda-forge
- name: Conda build (GPU w/ RAFT) w/ anaconda upload
if: inputs.label != '' && inputs.cuda != '' && inputs.raft != ''
shell: ${{ steps.choose_shell.outputs.shell }}
working-directory: conda
env:
PACKAGE_TYPE: ${{ inputs.label }}
run: |
conda build faiss-gpu-raft --variants '{ "cudatoolkit": "${{ inputs.cuda }}", "c_compiler_version": "${{ inputs.compiler_version }}", "cxx_compiler_version": "${{ inputs.compiler_version }}" }' \
--user pytorch --label ${{ inputs.label }} -c pytorch -c nvidia/label/cuda-${{ inputs.cuda }} -c nvidia -c rapidsai -c rapidsai-nightly -c conda-forge
Loading