@@ -16,10 +16,23 @@ inputs:
1616 description : ' Enable ROCm support.'
1717 required : false
1818 default : OFF
19+ svs :
20+ description : ' Enable SVS support.'
21+ required : false
22+ default : OFF
23+ setup_conda :
24+ description : ' Setup miniconda environment.'
25+ required : false
26+ default : ' true'
27+ upload_artifacts :
28+ description : ' Upload test artifacts. Prevents collisions when multiple jobs need to run build_cmake.'
29+ required : false
30+ default : ' true'
1931runs :
2032 using : composite
2133 steps :
2234 - name : Setup miniconda
35+ if : inputs.setup_conda == 'true'
2336 uses : conda-incubator/setup-miniconda@v3
2437 with :
2538 python-version : ' 3.11'
@@ -36,10 +49,10 @@ runs:
3649 conda config --set solver libmamba
3750 # Ensure starting packages are from conda-forge.
3851 conda list --show-channel-urls
39- conda update -y -q conda
52+ conda install -y -q " conda<=25.07"
4053 echo "$CONDA/bin" >> $GITHUB_PATH
4154
42- conda install -y -q python=3.11 cmake=3.30.4 make=4.2 swig=4.0 "numpy<2 " scipy=1.14 pytest=7.4 gflags=2.2
55+ conda install -y -q python=3.11 cmake=3.30.4 make=4.2 swig=4.0 "numpy>=2.0,<3.0 " scipy=1.16 pytest=7.4 gflags=2.2
4356
4457 # install base packages for ARM64
4558 if [ "${{ runner.arch }}" = "ARM64" ]; then
@@ -50,27 +63,33 @@ runs:
5063 if [ "${{ runner.arch }}" = "X64" ]; then
5164 # TODO: merge this with ARM64
5265 conda install -y -q -c conda-forge gxx_linux-64=14.2 sysroot_linux-64=2.17
53- conda install -y -q mkl=2022 .2.1 mkl-devel=2022 .2.1
66+ conda install -y -q mkl=2024 .2.2 mkl-devel=2024 .2.2
5467 fi
5568
5669 # no CUDA needed for ROCm so skip this
5770 if [ "${{ inputs.rocm }}" = "ON" ]; then
5871 :
5972 # regular CUDA for GPU builds
6073 elif [ "${{ inputs.gpu }}" = "ON" ] && [ "${{ inputs.cuvs }}" = "OFF" ]; then
61- conda install -y -q cuda-toolkit=12.4 -c "nvidia/label/cuda-12.4.0 "
74+ conda install -y -q cuda-toolkit=12.6 gxx_linux-64=12. 4 -c "nvidia/label/cuda-12.6 "
6275 # and CUDA from cuVS channel for cuVS builds
6376 elif [ "${{ inputs.cuvs }}" = "ON" ]; then
64- conda install -y -q libcuvs=25.08 'cuda-version>=12.0,<=12.5' cuda-toolkit=12.4.1 gxx_linux-64=12.4 -c rapidsai -c rapidsai-nightly -c conda-forge
77+ conda install -y -q libcuvs=25.10 'cuda-version=12.6' cuda-toolkit=12.6 gxx_linux-64=13.4.0 -c rapidsai -c rapidsai-nightly -c conda-forge
78+ fi
79+
80+ # install SVS runtime for SVS builds
81+ if [ "${{ inputs.svs }}" = "ON" ]; then
82+ conda install -y -q libsvs-runtime -c https://software.repos.intel.com/python/conda -c conda-forge
6583 fi
6684
6785 # install test packages
6886 if [ "${{ inputs.rocm }}" = "ON" ]; then
6987 : # skip torch install via conda, we need to install via pip to get
7088 # ROCm-enabled version until it's supported in conda by PyTorch
7189 elif [ "${{ inputs.gpu }}" = "ON" ]; then
72- conda install -y -q "pytorch<2.5" pytorch-cuda=12.4 -c pytorch -c "nvidia/label/cuda- 12.4.0 "
90+ conda install -y -q "pytorch>=2.7" " pytorch-gpu>=2.7" -c pytorch -c "nvidia/label/12.6 "
7391 else
92+ # TestLowLevelIVF.IVFRQ hangs on pytorch>=2.7, so left it as <2.5 for now.
7493 conda install -y -q "pytorch<2.5" -c pytorch
7594 fi
7695 - name : ROCm - Install dependencies
@@ -121,13 +140,15 @@ runs:
121140 run : |
122141 eval "$(conda shell.bash hook)"
123142 conda activate
143+ conda list --show-channel-urls
124144 cmake -B build \
125145 -DBUILD_TESTING=ON \
126146 -DBUILD_SHARED_LIBS=ON \
127147 -DFAISS_ENABLE_GPU=${{ inputs.gpu }} \
128148 -DFAISS_ENABLE_CUVS=${{ inputs.cuvs }} \
129149 -DFAISS_ENABLE_ROCM=${{ inputs.rocm }} \
130150 -DFAISS_OPT_LEVEL=${{ inputs.opt_level }} \
151+ -DFAISS_ENABLE_SVS=${{ inputs.svs }} \
131152 -DFAISS_ENABLE_C_API=ON \
132153 -DPYTHON_EXECUTABLE=$CONDA/bin/python \
133154 -DCMAKE_BUILD_TYPE=Release \
@@ -138,33 +159,39 @@ runs:
138159 - name : C++ tests
139160 shell : bash
140161 run : |
162+ conda list --show-channel-urls
141163 export GTEST_OUTPUT="xml:$(realpath .)/test-results/googletest/"
142164 make -C build test
143165 - name : C++ perf benchmarks
144166 shell : bash
145167 if : inputs.rocm == 'OFF'
146168 run : |
169+ conda list --show-channel-urls
147170 find ./build/perf_tests/ -executable -type f -name "bench*" -exec '{}' -v \;
148171 - name : Install Python extension
149172 shell : bash
150173 working-directory : build/faiss/python
151174 run : |
175+ conda list --show-channel-urls
152176 $CONDA/bin/python setup.py install
153177 - name : ROCm - install ROCm-enabled torch via pip
154178 if : inputs.rocm == 'ON'
155179 shell : bash
156180 run : |
181+ conda list --show-channel-urls
157182 pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm6.1
158183 - name : Python tests (CPU only)
159184 if : inputs.gpu == 'OFF'
160185 shell : bash
161186 run : |
187+ conda list --show-channel-urls
162188 pytest --junitxml=test-results/pytest/results.xml tests/test_*.py
163189 pytest --junitxml=test-results/pytest/results-torch.xml tests/torch_*.py
164190 - name : Python tests (CPU + GPU)
165191 if : inputs.gpu == 'ON'
166192 shell : bash
167193 run : |
194+ conda list --show-channel-urls
168195 pytest --junitxml=test-results/pytest/results.xml tests/test_*.py
169196 pytest --junitxml=test-results/pytest/results-torch.xml tests/torch_*.py
170197 cp tests/common_faiss_tests.py faiss/gpu/test
@@ -174,13 +201,14 @@ runs:
174201 if : inputs.opt_level == 'avx2'
175202 shell : bash
176203 run : |
204+ conda list --show-channel-urls
177205 FAISS_DISABLE_CPU_FEATURES=AVX2 LD_DEBUG=libs $CONDA/bin/python -c "import faiss" 2>&1 | grep faiss.so
178206 LD_DEBUG=libs $CONDA/bin/python -c "import faiss" 2>&1 | grep faiss_avx2.so
179207 - name : Upload test results
180- if : always()
208+ if : inputs.upload_artifacts == 'true'
181209 uses : actions/upload-artifact@v4
182210 with :
183- name : test-results-arch=${{ runner.arch }}-opt=${{ inputs.opt_level }}-gpu=${{ inputs.gpu }}-cuvs=${{ inputs.cuvs }}-rocm=${{ inputs.rocm }}
211+ name : test-results-arch=${{ runner.arch }}-opt=${{ inputs.opt_level }}-gpu=${{ inputs.gpu }}-cuvs=${{ inputs.cuvs }}-rocm=${{ inputs.rocm }}-svs=${{ inputs.svs }}
184212 path : test-results
185213 - name : Check installed packages channel
186214 shell : bash
0 commit comments