Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
60 changes: 44 additions & 16 deletions .github/actions/build_cmake/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,20 @@ runs:
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
conda install -y -q python=3.11 cmake make swig numpy scipy pytest

# install base packages for ARM64
if [ "${{ runner.arch }}" = "ARM64" ]; then
conda install -y -q -c conda-forge openblas gxx_linux-aarch64 sysroot_linux-aarch64
fi

# install base packages for X86_64
if [ "${{ runner.arch }}" = "X64" ]; then
# TODO: unpin versions for gxx_linux-64 and sysroot_linux-64 and merge it with ARM64 below
conda install -y -q -c conda-forge gxx_linux-64=11.2 sysroot_linux-64=2.28
conda install -y -q mkl=2023 mkl-devel=2023
fi


# install CUDA packages
if [ "${{ inputs.gpu }}" = "ON" ] && [ "${{ inputs.raft }}" = "OFF" ]; then
Expand All @@ -54,18 +65,35 @@ runs:
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" \
.

if [ "${{ runner.arch }}" = "X64" ]; then
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" \
.
elif [ "${{ runner.arch }}" = "ARM64" ]; then
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 \
.
else
echo "Encountered unexpected platform ${{ runner.arch }}"
exit 1
fi
make -k -C build -j$(nproc)
- name: C++ tests
shell: bash
Expand Down Expand Up @@ -101,5 +129,5 @@ runs:
- name: Upload test results
uses: actions/upload-artifact@v4
with:
name: test-results-${{ inputs.opt_level }}-${{ inputs.gpu }}-${{ inputs.raft }}
name: test-results-${{ runner.arch }}-${{ inputs.opt_level }}-${{ inputs.gpu }}-${{ inputs.raft }}
path: test-results
13 changes: 13 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,19 @@ jobs:
with:
gpu: ON
raft: ON
linux-arm64-SVE-cmake:
name: Linux arm64 SVE (cmake)
runs-on: faiss-aws-r8g.large
continue-on-error: true # non-blocking mode for now
steps:
- name: Checkout
continue-on-error: true # non-blocking mode for now
uses: actions/checkout@v4
- uses: ./.github/actions/build_cmake
continue-on-error: true # non-blocking mode for now
# TODO(T197096427): uncomment this once SVE PR is merged
# with:
# opt_level: sve
linux-x86_64-conda:
name: Linux x86_64 (conda)
needs: linux-x86_64-cmake
Expand Down