Repository: erikbern/ann-benchmarks
Issue: fail to build diskann
Root cause: Architectural Constraint

```
In file included from /home/app/diskann/include/percentile_stats.h:16:0,
                 from /home/app/diskann/include/pq_flash_index.h:16,
                 from /home/app/diskann/src/pq_flash_index.cpp:5:
/home/app/diskann/include/distance.h: In member function 'virtual float diskann::AVX512DistanceL2Float::compare(const float*, const float*, unsigned int) const':
/home/app/diskann/include/distance.h:193:38: warning: AVX512F vector return without AVX512F enabled changes the ABI [-Wpsabi]
       __m512 sum = _mm512_setzero_ps();
                                      ^
In file included from /usr/lib/gcc/x86_64-linux-gnu/7/include/immintrin.h:45:0,
                 from /home/app/diskann/include/distance.h:11,
                 from /home/app/diskann/include/percentile_stats.h:16,
                 from /home/app/diskann/include/pq_flash_index.h:16,
                 from /home/app/diskann/src/pq_flash_index.cpp:5:
/usr/lib/gcc/x86_64-linux-gnu/7/include/avx512fintrin.h:260:1: error: inlining failed in call to always_inline '__m512 _mm512_setzero_ps()': target specific option mismatch
 _mm512_setzero_ps (void)
 ^~~~~~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
In file included from /home/app/diskann/include/percentile_stats.h:16:0,
                 from /home/app/diskann/include/pq_flash_index.h:16,
                 from /home/app/diskann/src/pq_flash_index.cpp:5:
/home/app/diskann/include/distance.h: In member function 'virtual float diskann::AVX512DistanceL2Float::compare(const float*, const float*, unsigned int) const':
/home/app/diskann/include/distance.h:193:38: warning: AVX512F vector return without AVX512F enabled changes the ABI [-Wpsabi]
       __m512 sum = _mm512_setzero_ps();
                                      ^
src/CMakeFiles/diskann.dir/build.make:230: recipe for target 'src/CMakeFiles/diskann.dir/pq_flash_index.cpp.o' failed
make[2]: *** [src/CMakeFiles/diskann.dir/pq_flash_index.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /usr/lib/gcc/x86_64-linux-gnu/7/include/immintrin.h:45:0,
                 from /home/app/diskann/include/distance.h:11,
                 from /home/app/diskann/include/percentile_stats.h:16,
                 from /home/app/diskann/include/pq_flash_index.h:16,
                 from /home/app/diskann/src/pq_flash_index.cpp:5:
/usr/lib/gcc/x86_64-linux-gnu/7/include/avx512fintrin.h:260:1: error: inlining failed in call to always_inline '__m512 _mm512_setzero_ps()': target specific option mismatch
 _mm512_setzero_ps (void)
 ^~~~~~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
In file included from /home/app/diskann/include/index.h:14:0,
                 from /home/app/diskann/src/index.cpp:30:
/home/app/diskann/include/distance.h: In member function 'virtual float diskann::AVX512DistanceL2Float::compare(const float*, const float*, unsigned int) const':
/home/app/diskann/include/distance.h:193:38: warning: AVX512F vector return without AVX512F enabled changes the ABI [-Wpsabi]
       __m512 sum = _mm512_setzero_ps();
                                      ^
make[2]: *** [src/CMakeFiles/diskann_s.dir/pq_flash_index.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
src/CMakeFiles/diskann_s.dir/build.make:230: recipe for target 'src/CMakeFiles/diskann_s.dir/pq_flash_index.cpp.o' failed
In file included from /home/app/diskann/include/index.h:14:0,
                 from /home/app/diskann/src/index.cpp:30:
/home/app/diskann/include/distance.h: In member function 'virtual float diskann::AVX512DistanceL2Float::compare(const float*, const float*, unsigned int) const':
/home/app/diskann/include/distance.h:193:38: warning: AVX512F vector return without AVX512F enabled changes the ABI [-Wpsabi]
       __m512 sum = _mm512_setzero_ps();
                                      ^
In file included from /usr/lib/gcc/x86_64-linux-gnu/7/include/immintrin.h:45:0,
                 from /home/app/diskann/include/distance.h:11,
                 from /home/app/diskann/include/index.h:14,
                 from /home/app/diskann/src/index.cpp:30:
/usr/lib/gcc/x86_64-linux-gnu/7/include/avx512fintrin.h:260:1: error: inlining failed in call to always_inline '__m512 _mm512_setzero_ps()': target specific option mismatch
 _mm512_setzero_ps (void)
 ^~~~~~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
make[2]: *** [src/CMakeFiles/diskann_s.dir/index.cpp.o] Error 1
src/CMakeFiles/diskann_s.dir/build.make:110: recipe for target 'src/CMakeFiles/diskann_s.dir/index.cpp.o' failed
In file included from /usr/lib/gcc/x86_64-linux-gnu/7/include/immintrin.h:45:0,
                 from /home/app/diskann/include/distance.h:11,
                 from /home/app/diskann/include/index.h:14,
                 from /home/app/diskann/src/index.cpp:30:
/usr/lib/gcc/x86_64-linux-gnu/7/include/avx512fintrin.h:260:1: error: inlining failed in call to always_inline '__m512 _mm512_setzero_ps()': target specific option mismatch
 _mm512_setzero_ps (void)
 ^~~~~~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
make[2]: *** [src/CMakeFiles/diskann.dir/index.cpp.o] Error 1
src/CMakeFiles/diskann.dir/build.make:110: recipe for target 'src/CMakeFiles/diskann.dir/index.cpp.o' failed
CMakeFiles/Makefile2:87: recipe for target 'src/CMakeFiles/diskann.dir/all' failed
make[1]: *** [src/CMakeFiles/diskann.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:124: recipe for target 'src/CMakeFiles/diskann_s.dir/all' failed
make[1]: *** [src/CMakeFiles/diskann_s.dir/all] Error 2
make: *** [all] Error 2
Makefile:83: recipe for target 'all' failed
The command '/bin/sh -c cd diskann/build && make -j' returned a non-zero code: 2


Install Status:
{'diskann': 'fail'}
```

Thanks, any thoughts @ShikharJ?

@maumueller This is because the current code is slightly hard-coded to run only on systems which have AVX-512 support (2017 or later CPUs). For running on non-AVX512 systems, a few changes would be needed. 

I see. It seems not useful to run diskann in CI in that case? Are you planning to add support for other platforms anywhere in the near future?

Umm, actually I think the CI servers are making use of AVX-512 compatible processors. I don't see any of the builds failing. As for support for other platforms, it's just a  matter of time before system checking is automated in the code itself, so that this issue goes away.

It actually seems that they don't for github actions. (https://github.com/actions/runner/issues/1069)

Ah, I didn't realise the repository had shifted from Travis. I'll look into this then.