Skip to content

Commit 9f58c4f

Browse files
Michael Norrisfacebook-github-bot
authored andcommitted
Index serialization backward compatibility test (#4706)
Summary: Test backwards compatibility by checking the conda build of the a Faiss release vs current code (built by cmake). This will run as a Github Action. Differential Revision: D88085793
1 parent 338a5fb commit 9f58c4f

File tree

9 files changed

+992
-107
lines changed

9 files changed

+992
-107
lines changed

.github/actions/build_cmake/action.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,19 @@ inputs:
1616
description: 'Enable ROCm support.'
1717
required: false
1818
default: OFF
19+
setup_conda:
20+
description: 'Setup miniconda environment.'
21+
required: false
22+
default: 'true'
23+
upload_artifacts:
24+
description: 'Upload test artifacts. Prevents collisions when multiple jobs need to run build_cmake.'
25+
required: false
26+
default: 'true'
1927
runs:
2028
using: composite
2129
steps:
2230
- name: Setup miniconda
31+
if: inputs.setup_conda == 'true'
2332
uses: conda-incubator/setup-miniconda@v3
2433
with:
2534
python-version: '3.11'
@@ -186,7 +195,7 @@ runs:
186195
FAISS_DISABLE_CPU_FEATURES=AVX2 LD_DEBUG=libs $CONDA/bin/python -c "import faiss" 2>&1 | grep faiss.so
187196
LD_DEBUG=libs $CONDA/bin/python -c "import faiss" 2>&1 | grep faiss_avx2.so
188197
- name: Upload test results
189-
if: always()
198+
if: inputs.upload_artifacts == 'true'
190199
uses: actions/upload-artifact@v4
191200
with:
192201
name: test-results-arch=${{ runner.arch }}-opt=${{ inputs.opt_level }}-gpu=${{ inputs.gpu }}-cuvs=${{ inputs.cuvs }}-rocm=${{ inputs.rocm }}

.github/workflows/build-pull-request.yml

Lines changed: 109 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -38,109 +38,112 @@ jobs:
3838
uses: actions/checkout@v4
3939
- name: Build and Test (cmake)
4040
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
41+
index-io-backward-compatibility:
42+
name: Index serialization backward compatibility
43+
uses: ./.github/workflows/index-io-backward-compatibility.yml
44+
# linux-x86_64-AVX2-cmake:
45+
# name: Linux x86_64 AVX2 (cmake)
46+
# needs: linux-x86_64-cmake
47+
# runs-on: ubuntu-latest
48+
# steps:
49+
# - name: Checkout
50+
# uses: actions/checkout@v4
51+
# - name: Build and Test (cmake)
52+
# uses: ./.github/actions/build_cmake
53+
# with:
54+
# opt_level: avx2
55+
# linux-x86_64-AVX512-cmake:
56+
# name: Linux x86_64 AVX512 (cmake)
57+
# needs: linux-x86_64-cmake
58+
# runs-on: faiss-aws-m7i.large
59+
# steps:
60+
# - name: Checkout
61+
# uses: actions/checkout@v4
62+
# - name: Build and Test (cmake)
63+
# uses: ./.github/actions/build_cmake
64+
# with:
65+
# opt_level: avx512
66+
# linux-x86_64-AVX512_SPR-cmake:
67+
# name: Linux x86_64 AVX512_SPR (cmake)
68+
# needs: linux-x86_64-cmake
69+
# runs-on: faiss-aws-m7i.large
70+
# steps:
71+
# - name: Checkout
72+
# uses: actions/checkout@v4
73+
# - name: Build and Test (cmake)
74+
# uses: ./.github/actions/build_cmake
75+
# with:
76+
# opt_level: avx512_spr
77+
# linux-x86_64-GPU-cmake:
78+
# name: Linux x86_64 GPU (cmake)
79+
# needs: linux-x86_64-cmake
80+
# runs-on: 4-core-ubuntu-gpu-t4
81+
# steps:
82+
# - name: Checkout
83+
# uses: actions/checkout@v4
84+
# - name: Build and Test (cmake)
85+
# uses: ./.github/actions/build_cmake
86+
# with:
87+
# gpu: ON
88+
# linux-x86_64-GPU-w-CUVS-cmake:
89+
# name: Linux x86_64 GPU w/ cuVS (cmake)
90+
# needs: linux-x86_64-cmake
91+
# runs-on: 4-core-ubuntu-gpu-t4
92+
# steps:
93+
# - name: Checkout
94+
# uses: actions/checkout@v4
95+
# - name: Build and Test (cmake)
96+
# uses: ./.github/actions/build_cmake
97+
# with:
98+
# gpu: ON
99+
# cuvs: ON
100+
# linux-arm64-SVE-cmake:
101+
# name: Linux arm64 SVE (cmake)
102+
# needs: linux-x86_64-cmake
103+
# runs-on: faiss-aws-r8g.large
104+
# steps:
105+
# - name: Checkout
106+
# uses: actions/checkout@v4
107+
# - name: Build and Test (cmake)
108+
# uses: ./.github/actions/build_cmake
109+
# with:
110+
# opt_level: sve
111+
# env:
112+
# # Context: https://github.com/facebookresearch/faiss/wiki/Troubleshooting#surprising-faiss-openmp-and-openblas-interaction
113+
# OPENBLAS_NUM_THREADS: '1'
114+
# linux-x86_64-conda:
115+
# name: Linux x86_64 (conda)
116+
# needs: linux-x86_64-cmake
117+
# runs-on: ubuntu-latest
118+
# steps:
119+
# - name: Checkout
120+
# uses: actions/checkout@v4
121+
# with:
122+
# fetch-depth: 0
123+
# fetch-tags: true
124+
# - name: Build and Package (conda)
125+
# uses: ./.github/actions/build_conda
126+
# windows-x86_64-conda:
127+
# name: Windows x86_64 (conda)
128+
# needs: linux-x86_64-cmake
129+
# runs-on: windows-2022
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+
# linux-arm64-conda:
139+
# name: Linux arm64 (conda)
140+
# needs: linux-x86_64-cmake
141+
# runs-on: 2-core-ubuntu-arm
142+
# steps:
143+
# - name: Checkout
144+
# uses: actions/checkout@v4
145+
# with:
146+
# fetch-depth: 0
147+
# fetch-tags: true
148+
# - name: Build and Package (conda)
149+
# uses: ./.github/actions/build_conda

0 commit comments

Comments
 (0)