| 1 |
on: |
| 2 |
workflow_call: |
| 3 |
env: |
| 4 |
OMP_NUM_THREADS: '10' |
| 5 |
MKL_THREADING_LAYER: GNU |
| 6 |
jobs: |
| 7 |
format: |
| 8 |
name: Format |
| 9 |
runs-on: ubuntu-latest |
| 10 |
steps: |
| 11 |
- name: Checkout |
| 12 |
uses: actions/checkout@v4 |
| 13 |
- name: Install clang-format |
| 14 |
run: | |
| 15 |
sudo apt-get update -y |
| 16 |
sudo apt-get install -y wget |
| 17 |
sudo apt install -y lsb-release wget software-properties-common gnupg |
| 18 |
wget https://apt.llvm.org/llvm.sh |
| 19 |
chmod u+x llvm.sh |
| 20 |
sudo ./llvm.sh 21 |
| 21 |
sudo apt-get install -y git-core clang-format-21 |
| 22 |
- name: Verify clang-format |
| 23 |
run: | |
| 24 |
git ls-files | grep -E '\.(cpp|h|cu|cuh)$' | xargs clang-format-21 -i |
| 25 |
if git diff --quiet; then |
| 26 |
echo "Formatting OK!" |
| 27 |
else |
| 28 |
echo "Formatting not OK!" |
| 29 |
echo "------------------" |
| 30 |
git --no-pager diff --color |
| 31 |
exit 1 |
| 32 |
fi |
| 33 |
linux-x86_64-cmake: |
| 34 |
name: Linux x86_64 (cmake) |
| 35 |
runs-on: ubuntu-latest |
| 36 |
steps: |
| 37 |
- name: Checkout |
| 38 |
uses: actions/checkout@v4 |
| 39 |
- name: Build and Test (cmake) |
| 40 |
uses: ./.github/actions/build_cmake |
| 41 |
linux-x86_64-AVX2-cmake: |
| 42 |
name: Linux x86_64 AVX2 (cmake) |
| 43 |
needs: linux-x86_64-cmake |
| 44 |
runs-on: ubuntu-latest |
| 45 |
steps: |
| 46 |
- name: Checkout |
| 47 |
uses: actions/checkout@v4 |
| 48 |
- name: Build and Test (cmake) |
| 49 |
uses: ./.github/actions/build_cmake |
| 50 |
with: |
| 51 |
opt_level: avx2 |
| 52 |
linux-x86_64-AVX512-cmake: |
| 53 |
name: Linux x86_64 AVX512 (cmake) |
| 54 |
needs: linux-x86_64-cmake |
| 55 |
runs-on: faiss-aws-m7i.large |
| 56 |
steps: |
| 57 |
- name: Checkout |
| 58 |
uses: actions/checkout@v4 |
| 59 |
- name: Build and Test (cmake) |
| 60 |
uses: ./.github/actions/build_cmake |
| 61 |
with: |
| 62 |
opt_level: avx512 |
| 63 |
linux-x86_64-AVX512_SPR-cmake: |
| 64 |
name: Linux x86_64 AVX512_SPR (cmake) |
| 65 |
needs: linux-x86_64-cmake |
| 66 |
runs-on: faiss-aws-m7i.large |
| 67 |
steps: |
| 68 |
- name: Checkout |
| 69 |
uses: actions/checkout@v4 |
| 70 |
- name: Build and Test (cmake) |
| 71 |
uses: ./.github/actions/build_cmake |
| 72 |
with: |
| 73 |
opt_level: avx512_spr |
| 74 |
linux-x86_64-GPU-cmake: |
| 75 |
name: Linux x86_64 GPU (cmake) |
| 76 |
needs: linux-x86_64-cmake |
| 77 |
runs-on: 4-core-ubuntu-gpu-t4 |
| 78 |
steps: |
| 79 |
- name: Checkout |
| 80 |
uses: actions/checkout@v4 |
| 81 |
- name: Build and Test (cmake) |
| 82 |
uses: ./.github/actions/build_cmake |
| 83 |
with: |
| 84 |
gpu: ON |
| 85 |
linux-x86_64-GPU-w-CUVS-cmake: |
| 86 |
name: Linux x86_64 GPU w/ cuVS (cmake) |
| 87 |
needs: linux-x86_64-cmake |
| 88 |
runs-on: 4-core-ubuntu-gpu-t4 |
| 89 |
steps: |
| 90 |
- name: Checkout |
| 91 |
uses: actions/checkout@v4 |
| 92 |
- name: Build and Test (cmake) |
| 93 |
uses: ./.github/actions/build_cmake |
| 94 |
with: |
| 95 |
gpu: ON |
| 96 |
cuvs: ON |
| 97 |
linux-arm64-SVE-cmake: |
| 98 |
name: Linux arm64 SVE (cmake) |
| 99 |
needs: linux-x86_64-cmake |
| 100 |
runs-on: faiss-aws-r8g.large |
| 101 |
steps: |
| 102 |
- name: Checkout |
| 103 |
uses: actions/checkout@v4 |
| 104 |
- name: Build and Test (cmake) |
| 105 |
uses: ./.github/actions/build_cmake |
| 106 |
with: |
| 107 |
opt_level: sve |
| 108 |
env: |
| 109 |
# Context: https://github.com/facebookresearch/faiss/wiki/Troubleshooting#surprising-faiss-openmp-and-openblas-interaction |
| 110 |
OPENBLAS_NUM_THREADS: '1' |
| 111 |
linux-x86_64-conda: |
| 112 |
name: Linux x86_64 (conda) |
| 113 |
needs: linux-x86_64-cmake |
| 114 |
runs-on: ubuntu-latest |
| 115 |
steps: |
| 116 |
- name: Checkout |
| 117 |
uses: actions/checkout@v4 |
| 118 |
with: |
| 119 |
fetch-depth: 0 |
| 120 |
fetch-tags: true |
| 121 |
- name: Build and Package (conda) |
| 122 |
uses: ./.github/actions/build_conda |
| 123 |
windows-x86_64-conda: |
| 124 |
name: Windows x86_64 (conda) |
| 125 |
needs: linux-x86_64-cmake |
| 126 |
runs-on: windows-2022 |
| 127 |
steps: |
| 128 |
- name: Checkout |
| 129 |
uses: actions/checkout@v4 |
| 130 |
with: |
| 131 |
fetch-depth: 0 |
| 132 |
fetch-tags: true |
| 133 |
- name: Build and Package (conda) |
| 134 |
uses: ./.github/actions/build_conda |
| 135 |
linux-arm64-conda: |
| 136 |
name: Linux arm64 (conda) |
| 137 |
needs: linux-x86_64-cmake |
| 138 |
runs-on: 2-core-ubuntu-arm |
| 139 |
steps: |
| 140 |
- name: Checkout |
| 141 |
uses: actions/checkout@v4 |
| 142 |
with: |
| 143 |
fetch-depth: 0 |
| 144 |
fetch-tags: true |
| 145 |
- name: Build and Package (conda) |
| 146 |
uses: ./.github/actions/build_conda |
| 147 |
linux-x86_64-svs: |
| 148 |
name: Linux x86_64 w/ SVS (cmake) |
| 149 |
needs: linux-x86_64-cmake |
| 150 |
runs-on: ubuntu-latest |
| 151 |
steps: |
| 152 |
- name: Checkout |
| 153 |
uses: actions/checkout@v4 |
| 154 |
- name: Build and Test (cmake) |
| 155 |
uses: ./.github/actions/build_cmake |
| 156 |
with: |
| 157 |
svs: ON |
| 158 |
index-io-backward-compatibility: |
| 159 |
needs: linux-x86_64-cmake |
| 160 |
name: Index serialization backward compatibility |
| 161 |
uses: ./.github/workflows/index-io-backward-compatibility.yml |