Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FAISS on Raspberry Pi #1071

Closed
2 of 4 tasks
sharma-n opened this issue Dec 30, 2019 · 9 comments
Closed
2 of 4 tasks

FAISS on Raspberry Pi #1071

sharma-n opened this issue Dec 30, 2019 · 9 comments
Labels

Comments

@sharma-n
Copy link

Summary

Installing FAISS for python (from source) on raspberry pi throws an error:
Makefile:22: recipe for target 'swigfaiss.o' failed
The above error is thrown after a long list of errors, the first of which is:
swigfaiss.cpp:3348:3: error: #error "SWIG wrapped code invalid in 32 bit architecture, regenerate code using -DSWIGWORDSIZE32"
I have also attached the complete log.txt.

Any help would be appreciated.

Platform

Raspberry Pi 3B+

OS: Raspbian

Running on:

  • CPU
  • GPU

Interface:

  • C++
  • Python

Reproduction instructions

  1. Configured FAISS by ./configure --without-cuda (configuration file successfully recognizes python)
  2. Compiled and installed using: make -j4 & make install (Successfully compiles and installs)
  3. Try to install python wrapper using: make -C python (throws error)
@mdouze
Copy link
Contributor

mdouze commented Dec 31, 2019

I am quite pessimistic about the possibility to compile with a 32 bit arch. Can you compile with -m64 ?

@sharma-n
Copy link
Author

sharma-n commented Jan 2, 2020

Trying to do make -C python -m 64 end up giving make: *** No rule to make target '64'. Stop.

Any idea of what kind of changes I would need to do to make it work with 32 bit arch? What does the regenerate code using -DSWIGWORDSIZE32 refer to?

@mdouze
Copy link
Contributor

mdouze commented Jan 2, 2020

SWIGWORDSIZE32 is probably a flag needed for SWIG.

My point is that it might be easier to set up a compile chain in 64 bits than to port Faiss to 32 bits.

@JinHai-CN
Copy link
Contributor

We compiled successfully on 64-bit Linux on Raspberry Pi.

@mdouze
Copy link
Contributor

mdouze commented Jan 20, 2020

If you feel like it, please share as much info as possible here on how to compile for Raspberry Pi.

@lucmos
Copy link

lucmos commented Feb 5, 2020

I'm hitting the same error when trying to install faiss on a raspberry pi, with armv7l
Do you have any news on this?

@JinHai-CN
Copy link
Contributor

We compiled FAISS successfully on Raspberry Pi 4B and integrated it into Milvus: https://github.com/milvus-io/milvus/tree/aarch64

Platform information:
CPU: Cortex-A72(armv8).
OS: Ubuntu 18.04

Main change is about compiling option.

Detailed change please refer to: milvus-io/milvus@651b122
FAISS located under directory: core/src/index/thirdparty/faiss

@mdouze
Copy link
Contributor

mdouze commented Feb 20, 2020

Excellent! Thanks.
Closing issue.

@mdouze mdouze closed this as completed Feb 20, 2020
@openhisilicon
Copy link

Hi, Can't Faiss run on 32-bit ARMV7?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants