OS:
Faiss version:
Faiss compilation options:
Running on:
Interface:
The Faiss code will need some adaptation to run on a non-x64 platform, see #529.
If you want to give it a try, we will welcome PRs for a non-intel version of Faiss.
Here is a patch that makes it possible to compile on non x64 machines: https://gist.github.com/mdouze/a384a01d0e205bee6d39d52170fb3588
it disables or replaces with scalar code all x64-specific code.
Apparently arm also has SIMD instructions, it would be interesting to use those to speed up Faiss.
I have enabled for PowerPC by disabling Intel specific instructions. HNSW is not enabled.
Forked version here - https://github.com/msharmavikram/faiss
It should work for ARM too. (as PowerPC specific are guarded). Let me know if you see an issue.
Updated the patch
https://gist.github.com/mdouze/a384a01d0e205bee6d39d52170fb3588
to support IndexHNSW. All test pass on an ARM machine.
@mdouze How about the function of arm64 if compared with x86 ? Are they the same, or not ? Which part of source code has been modified if they not ? Thanks a lot !
In this patch, all the occurrences of SSE intrinsics are replaced with normal C code.
How to compile this project on arm64 ? : ] @mdouze
Please adjust the makefile.inc manually to remove x86-specific flags and it will compile. The next Faiss release will include some ARM optimized routines.
Compilation for arm is supported in 1.4.0
I met the same issue in 1.4.0. on tx2
g++ -std=c++11 -DFINTEGER=int -fPIC -fopenmp -m64 -Wno-sign-compare -g -O3 -Wall -Wextra -msse4 -mpopcnt -c IndexFlat.cpp -o IndexFlat.o
g++: error: unrecognized command line option '-m64'
g++: error: unrecognized command line option '-msse4'
g++: error: unrecognized command line option '-mpopcnt'
Makefile:27: recipe for target 'IndexFlat.o' failed
Please remove those 3 flags from makefile.inc. There is no specific flag needed to get the ARM NEON instructions.
Most helpful comment
I met the same issue in 1.4.0. on tx2
g++ -std=c++11 -DFINTEGER=int -fPIC -fopenmp -m64 -Wno-sign-compare -g -O3 -Wall -Wextra -msse4 -mpopcnt -c IndexFlat.cpp -o IndexFlat.o
g++: error: unrecognized command line option '-m64'
g++: error: unrecognized command line option '-msse4'
g++: error: unrecognized command line option '-mpopcnt'
Makefile:27: recipe for target 'IndexFlat.o' failed