28
28
conda update -y -q conda
29
29
echo "$CONDA/bin" >> $GITHUB_PATH
30
30
31
- # install base packages
32
- conda install -y -q -c conda-forge gxx_linux-64=11.2 sysroot_linux-64=2.28
33
- conda install -y -q python=3.11 cmake make swig mkl=2023 mkl-devel=2023 numpy scipy pytest
31
+ conda install -y -q python=3.11 cmake make swig numpy scipy pytest
32
+
33
+ # install base packages for ARM64
34
+ if [ "${{ runner.arch }}" = "ARM64" ]; then
35
+ conda install -y -q -c conda-forge openblas gxx_linux-aarch64 sysroot_linux-aarch64
36
+ fi
37
+
38
+ # install base packages for X86_64
39
+ if [ "${{ runner.arch }}" = "X64" ]; then
40
+ # TODO: unpin versions for gxx_linux-64 and sysroot_linux-64 and merge it with ARM64 below
41
+ conda install -y -q -c conda-forge gxx_linux-64=11.2 sysroot_linux-64=2.28
42
+ conda install -y -q mkl=2023 mkl-devel=2023
43
+ fi
44
+
34
45
35
46
# install CUDA packages
36
47
if [ "${{ inputs.gpu }}" = "ON" ] && [ "${{ inputs.raft }}" = "OFF" ]; then
@@ -54,18 +65,35 @@ runs:
54
65
run : |
55
66
eval "$(conda shell.bash hook)"
56
67
conda activate
57
- cmake -B build \
58
- -DBUILD_TESTING=ON \
59
- -DBUILD_SHARED_LIBS=ON \
60
- -DFAISS_ENABLE_GPU=${{ inputs.gpu }} \
61
- -DFAISS_ENABLE_RAFT=${{ inputs.raft }} \
62
- -DFAISS_OPT_LEVEL=${{ inputs.opt_level }} \
63
- -DFAISS_ENABLE_C_API=ON \
64
- -DPYTHON_EXECUTABLE=$CONDA/bin/python \
65
- -DCMAKE_BUILD_TYPE=Release \
66
- -DBLA_VENDOR=Intel10_64_dyn \
67
- -DCMAKE_CUDA_FLAGS="-gencode arch=compute_75,code=sm_75" \
68
- .
68
+
69
+ if [ "${{ runner.arch }}" = "X64" ]; then
70
+ cmake -B build \
71
+ -DBUILD_TESTING=ON \
72
+ -DBUILD_SHARED_LIBS=ON \
73
+ -DFAISS_ENABLE_GPU=${{ inputs.gpu }} \
74
+ -DFAISS_ENABLE_RAFT=${{ inputs.raft }} \
75
+ -DFAISS_OPT_LEVEL=${{ inputs.opt_level }} \
76
+ -DFAISS_ENABLE_C_API=ON \
77
+ -DPYTHON_EXECUTABLE=$CONDA/bin/python \
78
+ -DCMAKE_BUILD_TYPE=Release \
79
+ -DBLA_VENDOR=Intel10_64_dyn \
80
+ -DCMAKE_CUDA_FLAGS="-gencode arch=compute_75,code=sm_75" \
81
+ .
82
+ elif [ "${{ runner.arch }}" = "ARM64" ]; then
83
+ cmake -B build \
84
+ -DBUILD_TESTING=ON \
85
+ -DBUILD_SHARED_LIBS=ON \
86
+ -DFAISS_ENABLE_GPU=${{ inputs.gpu }} \
87
+ -DFAISS_ENABLE_RAFT=${{ inputs.raft }} \
88
+ -DFAISS_OPT_LEVEL=${{ inputs.opt_level }} \
89
+ -DFAISS_ENABLE_C_API=ON \
90
+ -DPYTHON_EXECUTABLE=$CONDA/bin/python \
91
+ -DCMAKE_BUILD_TYPE=Release \
92
+ .
93
+ else
94
+ echo "Encountered unexpected platform ${{ runner.arch }}"
95
+ exit 1
96
+ fi
69
97
make -k -C build -j$(nproc)
70
98
- name : C++ tests
71
99
shell : bash
@@ -101,5 +129,5 @@ runs:
101
129
- name : Upload test results
102
130
uses : actions/upload-artifact@v4
103
131
with :
104
- name : test-results-${{ inputs.opt_level }}-${{ inputs.gpu }}-${{ inputs.raft }}
132
+ name : test-results-${{ runner.arch }}-${{ inputs.opt_level }}-${{ inputs.gpu }}-${{ inputs.raft }}
105
133
path : test-results
0 commit comments