Skip to content

Commit 0d568bc

Browse files
junjieqifacebook-github-bot
authored andcommitted
separare the github build into two conditions (#4066)
Summary: Pull Request resolved: #4066 Reviewed By: asadoughi Differential Revision: D66853917 Pulled By: junjieqi fbshipit-source-id: 800b2f9f797bf19fa262f04f53e32cc2bef27db8
1 parent 9bb6948 commit 0d568bc

File tree

3 files changed

+303
-297
lines changed

3 files changed

+303
-297
lines changed
+158
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
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

.github/workflows/build-release.yml

+141
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
on:
2+
workflow_call:
3+
env:
4+
OMP_NUM_THREADS: '10'
5+
MKL_THREADING_LAYER: GNU
6+
jobs:
7+
linux-x86_64-packages:
8+
name: Linux x86_64 packages
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
with:
14+
fetch-depth: 0
15+
fetch-tags: true
16+
- name: Build and Package (conda)
17+
uses: ./.github/actions/build_conda
18+
env:
19+
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
20+
with:
21+
label: main
22+
linux-x86_64-GPU-packages-CUDA-11-4-4:
23+
name: Linux x86_64 GPU packages (CUDA 11.4.4)
24+
runs-on: 4-core-ubuntu-gpu-t4
25+
env:
26+
CUDA_ARCHS: "60-real;61-real;62-real;70-real;72-real;75-real;80;86-real"
27+
FAISS_FLATTEN_CONDA_INCLUDES: "1"
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v4
31+
with:
32+
fetch-depth: 0
33+
fetch-tags: true
34+
- name: Build and Package (conda)
35+
uses: ./.github/actions/build_conda
36+
env:
37+
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
38+
with:
39+
label: main
40+
cuda: "11.4.4"
41+
linux-x86_64-GPU-CUVS-packages-CUDA11-8-0:
42+
name: Linux x86_64 GPU w/ cuVS packages (CUDA 11.8.0)
43+
runs-on: 4-core-ubuntu-gpu-t4
44+
env:
45+
CUDA_ARCHS: "70-real;72-real;75-real;80;86-real"
46+
steps:
47+
- name: Checkout
48+
uses: actions/checkout@v4
49+
with:
50+
fetch-depth: 0
51+
fetch-tags: true
52+
- name: Build and Package (conda)
53+
uses: ./.github/actions/build_conda
54+
env:
55+
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
56+
with:
57+
label: main
58+
cuvs: "ON"
59+
cuda: "11.8.0"
60+
linux-x86_64-GPU-packages-CUDA-12-1-1:
61+
name: Linux x86_64 GPU packages (CUDA 12.1.1)
62+
runs-on: 4-core-ubuntu-gpu-t4
63+
env:
64+
CUDA_ARCHS: "70-real;72-real;75-real;80;86-real"
65+
steps:
66+
- name: Checkout
67+
uses: actions/checkout@v4
68+
with:
69+
fetch-depth: 0
70+
fetch-tags: true
71+
- name: Build and Package (conda)
72+
uses: ./.github/actions/build_conda
73+
env:
74+
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
75+
with:
76+
label: main
77+
cuda: "12.1.1"
78+
linux-x86_64-GPU-CUVS-packages-CUDA12-4-0:
79+
name: Linux x86_64 GPU w/ cuVS packages (CUDA 12.4.0)
80+
runs-on: 4-core-ubuntu-gpu-t4
81+
env:
82+
CUDA_ARCHS: "70-real;72-real;75-real;80;86-real"
83+
steps:
84+
- name: Checkout
85+
uses: actions/checkout@v4
86+
with:
87+
fetch-depth: 0
88+
fetch-tags: true
89+
- name: Build and Package (conda)
90+
uses: ./.github/actions/build_conda
91+
env:
92+
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
93+
with:
94+
label: main
95+
cuvs: "ON"
96+
cuda: "12.4.0"
97+
windows-x86_64-packages:
98+
name: Windows x86_64 packages
99+
runs-on: windows-2019
100+
steps:
101+
- name: Checkout
102+
uses: actions/checkout@v4
103+
with:
104+
fetch-depth: 0
105+
fetch-tags: true
106+
- name: Build and Package (conda)
107+
uses: ./.github/actions/build_conda
108+
env:
109+
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
110+
with:
111+
label: main
112+
osx-arm64-packages:
113+
name: OSX arm64 packages
114+
runs-on: macos-14
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+
env:
124+
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
125+
with:
126+
label: main
127+
linux-arm64-packages:
128+
name: Linux arm64 packages
129+
runs-on: 2-core-ubuntu-arm
130+
steps:
131+
- name: Checkout
132+
uses: actions/checkout@v4
133+
with:
134+
fetch-depth: 0
135+
fetch-tags: true
136+
- name: Build and Package (conda)
137+
uses: ./.github/actions/build_conda
138+
env:
139+
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
140+
with:
141+
label: main

0 commit comments

Comments
 (0)