|
| 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 18 |
| 21 | + sudo apt-get install -y git-core clang-format-18 |
| 22 | + - name: Verify clang-format |
| 23 | + run: | |
| 24 | + git ls-files | grep -E '\.(cpp|h|cu|cuh)$' | xargs clang-format-18 -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-GPU-cmake: |
| 64 | + name: Linux x86_64 GPU (cmake) |
| 65 | + needs: linux-x86_64-cmake |
| 66 | + runs-on: 4-core-ubuntu-gpu-t4 |
| 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 | + gpu: ON |
| 74 | + linux-x86_64-GPU-w-CUVS-cmake: |
| 75 | + name: Linux x86_64 GPU w/ cuVS (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 | + cuvs: ON |
| 86 | + linux-x86_64-GPU-w-ROCm-cmake: |
| 87 | + name: Linux x86_64 GPU w/ ROCm (cmake) |
| 88 | + needs: linux-x86_64-cmake |
| 89 | + runs-on: faiss-amd-MI200 |
| 90 | + container: |
| 91 | + image: ubuntu:22.04 |
| 92 | + options: --device=/dev/kfd --device=/dev/dri --ipc=host --shm-size 16G --group-add video --cap-add=SYS_PTRACE --cap-add=SYS_ADMIN |
| 93 | + steps: |
| 94 | + - name: Container setup |
| 95 | + run: | |
| 96 | + if [ -f /.dockerenv ]; then |
| 97 | + apt-get update && apt-get install -y sudo && apt-get install -y git |
| 98 | + git config --global --add safe.directory '*' |
| 99 | + else |
| 100 | + echo 'Skipping. Current job is not running inside a container.' |
| 101 | + fi |
| 102 | + - name: Checkout |
| 103 | + uses: actions/checkout@v4 |
| 104 | + - name: Build and Test (cmake) |
| 105 | + uses: ./.github/actions/build_cmake |
| 106 | + with: |
| 107 | + gpu: ON |
| 108 | + rocm: ON |
| 109 | + linux-arm64-SVE-cmake: |
| 110 | + name: Linux arm64 SVE (cmake) |
| 111 | + needs: linux-x86_64-cmake |
| 112 | + runs-on: faiss-aws-r8g.large |
| 113 | + steps: |
| 114 | + - name: Checkout |
| 115 | + uses: actions/checkout@v4 |
| 116 | + - name: Build and Test (cmake) |
| 117 | + uses: ./.github/actions/build_cmake |
| 118 | + with: |
| 119 | + opt_level: sve |
| 120 | + env: |
| 121 | + # Context: https://github.com/facebookresearch/faiss/wiki/Troubleshooting#surprising-faiss-openmp-and-openblas-interaction |
| 122 | + OPENBLAS_NUM_THREADS: '1' |
| 123 | + linux-x86_64-conda: |
| 124 | + name: Linux x86_64 (conda) |
| 125 | + needs: linux-x86_64-cmake |
| 126 | + runs-on: ubuntu-latest |
| 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 | + windows-x86_64-conda: |
| 136 | + name: Windows x86_64 (conda) |
| 137 | + needs: linux-x86_64-cmake |
| 138 | + runs-on: windows-2019 |
| 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-arm64-conda: |
| 148 | + name: Linux arm64 (conda) |
| 149 | + needs: linux-x86_64-cmake |
| 150 | + runs-on: 2-core-ubuntu-arm |
| 151 | + steps: |
| 152 | + - name: Checkout |
| 153 | + uses: actions/checkout@v4 |
| 154 | + with: |
| 155 | + fetch-depth: 0 |
| 156 | + fetch-tags: true |
| 157 | + - name: Build and Package (conda) |
| 158 | + uses: ./.github/actions/build_conda |
0 commit comments