mirror of
https://github.com/facebookresearch/faiss.git
synced 2026-10-12 02:13:36 +00:00
Fix cuVS nightly (#5273)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/5273 Compilation time is huge because we target a bunch of arches. Reduce number of arches and try libmamba solver. Had to skip a few new hanging tests. Reviewed By: junjieqi Differential Revision: D107388234 fbshipit-source-id: 052f80d215a9da95f5867eb70fc361867f2657a8
This commit is contained in:
committed by
meta-codesync[bot]
parent
17cc967d71
commit
15bd823837
@@ -54,7 +54,7 @@ runs:
|
||||
conda list --show-channel-urls
|
||||
echo "$CONDA/bin" >> $GITHUB_PATH
|
||||
|
||||
conda install -y -q python=3.12 cmake=3.30.4 make=4.2 swig=4.0 "numpy>=2.0,<3.0" scipy=1.16 pytest=7.4 gflags=2.2 setuptools
|
||||
conda install -y -q python=3.12 cmake=3.30.4 make=4.2 swig=4.0 "numpy>=2.0,<3.0" scipy=1.16 pytest=7.4 pytest-timeout gflags=2.2 setuptools
|
||||
|
||||
# install base packages for ARM64
|
||||
if [ "${{ runner.arch }}" = "ARM64" ]; then
|
||||
@@ -73,13 +73,21 @@ runs:
|
||||
:
|
||||
# CUDA install for GPU builds
|
||||
elif [ "${{ inputs.gpu }}" = "ON" ]; then
|
||||
conda install -y -q cuda-libraries-dev=13.2 cuda-nvcc=13.2 cuda-nvtx=13.2 cuda-cupti=13.2 cuda-cudart-dev=13.2 gxx_linux-64=14.2 -c "nvidia/label/cuda-13.2"
|
||||
if [ "${{ inputs.cuvs }}" = "ON" ]; then
|
||||
conda install -y -q libcuvs=26.06 'cuda-version=13.2' sysroot_linux-64=2.34 -c rapidsai -c rapidsai-nightly -c conda-forge
|
||||
# Clean index cache to prevent sqlite3 "database is locked" errors
|
||||
# from conda-libmamba-solver's shards cache between consecutive installs.
|
||||
# See: https://github.com/conda/conda-libmamba-solver/issues/667
|
||||
# Use CUDA 12.9 for cuVS cmake builds: pytorch-gpu on
|
||||
# conda-forge only has CUDA 12 builds, 12.8+ supports GCC 14,
|
||||
# and libcuvs needs libnvjitlink >=12.9.86. Skip the
|
||||
# cuda-libraries-dev metapackage to avoid pinning libnvjitlink.
|
||||
conda install -y -q \
|
||||
cuda-nvcc=12.9 cuda-nvtx=12.9 cuda-cupti=12.9 cuda-cudart-dev=12.9 \
|
||||
libcublas-dev libcusolver-dev libcusparse-dev \
|
||||
gxx_linux-64=14.2 \
|
||||
libcuvs=26.06 'cuda-version>=12,<13' sysroot_linux-64=2.34 \
|
||||
'pytorch-gpu>=2.7' \
|
||||
-c rapidsai -c rapidsai-nightly -c conda-forge -c nvidia
|
||||
conda clean --index-cache 2>/dev/null || true
|
||||
else
|
||||
conda install -y -q cuda-libraries-dev=13.2 cuda-nvcc=13.2 cuda-nvtx=13.2 cuda-cupti=13.2 cuda-cudart-dev=13.2 gxx_linux-64=14.2 -c "nvidia/label/cuda-13.2"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -93,10 +101,13 @@ runs:
|
||||
: # skip torch install via conda, we need to install via pip to get
|
||||
# ROCm-enabled version until it's supported in conda by PyTorch
|
||||
elif [ "${{ inputs.gpu }}" = "ON" ]; then
|
||||
# PyTorch deprecated its official Anaconda channel (pytorch/pytorch#138506),
|
||||
# so we install via pip for CUDA builds. --break-system-packages is needed
|
||||
# because the CI runner's Python is PEP 668 externally-managed.
|
||||
pip install "torch>=2.7" --break-system-packages --index-url https://download.pytorch.org/whl/cu132
|
||||
if [ "${{ inputs.cuvs }}" != "ON" ]; then
|
||||
# PyTorch deprecated its official Anaconda channel (pytorch/pytorch#138506),
|
||||
# so we install via pip for CUDA builds. --break-system-packages is needed
|
||||
# because the CI runner's Python is PEP 668 externally-managed.
|
||||
pip install "torch>=2.7" --break-system-packages --index-url https://download.pytorch.org/whl/cu132
|
||||
fi
|
||||
# cuVS builds get pytorch-gpu from conda (installed above).
|
||||
else
|
||||
# TestLowLevelIVF.IVFRQ hangs on pytorch>=2.7, so left it as <2.5 for now.
|
||||
conda install -y -q "pytorch<2.5" -c pytorch
|
||||
@@ -305,7 +316,10 @@ runs:
|
||||
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
|
||||
# --timeout guards against a hung GPU test burning the full 6h CI
|
||||
# budget (see the binary-CAGRA IDMap deadlock skipped in
|
||||
# test_binary_cagra.py) instead of failing fast.
|
||||
pytest --timeout=600 --timeout-method=thread --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'
|
||||
|
||||
@@ -45,6 +45,7 @@ runs:
|
||||
# Ensure starting packages are from conda-forge.
|
||||
conda list --show-channel-urls
|
||||
conda install -y -q "conda!=24.11.0,<25.7"
|
||||
conda config --set solver libmamba
|
||||
conda install -y -q "conda-build=25.3.1" "liblief=0.14.1"
|
||||
- name: Enable anaconda uploads
|
||||
if: inputs.label != ''
|
||||
|
||||
@@ -44,7 +44,7 @@ jobs:
|
||||
name: Linux x86_64 GPU w/ cuVS packages (CUDA 13.2)
|
||||
runs-on: 4-core-ubuntu-gpu-t4
|
||||
env:
|
||||
CUDA_ARCHS: "75-real;80;86-real;90;100;120"
|
||||
CUDA_ARCHS: "75-real;80;90;100;120"
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
@@ -41,7 +41,7 @@ jobs:
|
||||
name: Linux x86_64 GPU w/ cuVS nightlies (CUDA 13.2)
|
||||
runs-on: 4-core-ubuntu-gpu-t4
|
||||
env:
|
||||
CUDA_ARCHS: "75-real;80;86-real;90;100;120"
|
||||
CUDA_ARCHS: "75-real;80;90;100;120"
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
Reference in New Issue
Block a user