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

Issue While building faiss. #2009

Closed
2 tasks
AdityaWasnik91 opened this issue Aug 11, 2021 · 2 comments
Closed
2 tasks

Issue While building faiss. #2009

AdityaWasnik91 opened this issue Aug 11, 2021 · 2 comments

Comments

@AdityaWasnik91
Copy link

OS: Ubuntu 18.04

Installed from: compiled by Myself

Faiss compilation options: sudo cmake -B build . -DFAISS_ENABLE_GPU=OFF -DFAISS_ENABLE_PYTHON=OFF -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=ON

Running on:

  • [o] CPU
  • GPU

Interface:

  • [0] C++
  • Python

Reproduction instructions

1)Step One:- sudo cmake -B build . -DFAISS_ENABLE_GPU=OFF -DFAISS_ENABLE_PYTHON=OFF -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=ON
2)Step Two:- make -C build -j4 faiss
3)Step three:- make -C build install

../faiss/libfaiss.so: undefined reference to vaddq_u16(__Uint16x8_t, __Uint16x8_t)' ../faiss/libfaiss.so: undefined reference to vandq_u8(__Uint8x16_t, __Uint8x16_t)'
../faiss/libfaiss.so: undefined reference to vcleq_u16(__Uint16x8_t, __Uint16x8_t)' ../faiss/libfaiss.so: undefined reference to vminq_u16(__Uint16x8_t, __Uint16x8_t)'
../faiss/libfaiss.so: undefined reference to vsubq_u16(__Uint16x8_t, __Uint16x8_t)' ../faiss/libfaiss.so: undefined reference to vmaxq_u16(__Uint16x8_t, __Uint16x8_t)'
../faiss/libfaiss.so: undefined reference to vpaddq_f32(__Float32x4_t, __Float32x4_t)' ../faiss/libfaiss.so: undefined reference to vcgeq_u16(__Uint16x8_t, __Uint16x8_t)'
../faiss/libfaiss.so: undefined reference to vsubq_f32(__Float32x4_t, __Float32x4_t)' ../faiss/libfaiss.so: undefined reference to vdupq_n_u16(unsigned int)'
../faiss/libfaiss.so: undefined reference to vqtbl1q_u8(__Uint8x16_t, __Uint8x16_t)' ../faiss/libfaiss.so: undefined reference to vmulq_f32(__Float32x4_t, __Float32x4_t)'
collect2: error: ld returned 1 exit status
tests/CMakeFiles/faiss_test.dir/build.make:309: recipe for target 'tests/faiss_test' failed
make[2]: *** [tests/faiss_test] Error 1
make[2]: Leaving directory '/home/nano/faiss/build'
CMakeFiles/Makefile2:1291: recipe for target 'tests/CMakeFiles/faiss_test.dir/all' failed
make[1]: *** [tests/CMakeFiles/faiss_test.dir/all] Error 2
make[1]: Leaving directory '/home/nano/faiss/build'
Makefile:145: recipe for target 'all' failed
make: *** [all] Error 2
make: Leaving directory '/home/nano/faiss/build'

@vorj
Copy link
Contributor

vorj commented Aug 24, 2021

@beauby
Copy link
Contributor

beauby commented Jan 18, 2022

Could you try -DCMAKE_BUILD_TYPE=Release?

@mdouze mdouze closed this as completed Jan 19, 2022
@mdouze mdouze reopened this Jan 19, 2022
facebook-github-bot pushed a commit that referenced this issue Mar 23, 2023
Summary:
related: #1916, #1979, #2009, #2013, #2195, #2210

After my PR #1815 had been merged `-DCMAKE_BUILD_TYPE=Debug` has been invalid on aarch64, and many people have been hit the problem. (sorry to inconvenience...)
This PR fixes this.

### Details:

Using the function pointers of intrinsics on run-time context causes the link errors.
`-DCMAKE_BUILD_TYPE=Release` has been available because compiler optimizer can propagate and collapse the function pointers as constant.
However, when the pointers doesn't collapsed the link errors occurred, so `-DCMAKE_BUILD_TYPE=Debug` has been unavailable.
To prevent the link errors, I've replaced the function pointers of intrinsics on run-time context to on compile-time context explicitly.

Pull Request resolved: #2768

Reviewed By: mdouze

Differential Revision: D44296147

Pulled By: alexanderguzhva

fbshipit-source-id: 81fa013c5e05a486b6b82cb85d76eeefdefca891
mdouze added a commit that referenced this issue Mar 23, 2023
* fix windows test (#2775)

Summary: Pull Request resolved: #2775

Reviewed By: algoriddle

Differential Revision: D44210010

fbshipit-source-id: b9b620a4b0a874e09ee2f6082ff0f9463716fdf4

* faiss/utils/simdlib_avx2.h: avoid C++20 ambiguous overloaded operator (#2772)

Summary:
Pull Request resolved: #2772

Resolves errors from overloaded ambiguous operators:
```
faiss/utils/partitioning.cpp:283:34: error: ISO C++20 considers use of overloaded operator '==' (with operand types 'faiss::simd16uint16' and 'faiss::simd16uint16') to be ambiguous despite there being a unique best viable function [-Werror,-Wambiguous-reversed-operator]
```

Reviewed By: alexanderguzhva, meyering

Differential Revision: D44186458

fbshipit-source-id: 0257fa0aaa4fe74c056bef751591f5f7e5357c9d

* Fix Debug Build on aarch64 (#2768)

Summary:
related: #1916, #1979, #2009, #2013, #2195, #2210

After my PR #1815 had been merged `-DCMAKE_BUILD_TYPE=Debug` has been invalid on aarch64, and many people have been hit the problem. (sorry to inconvenience...)
This PR fixes this.

### Details:

Using the function pointers of intrinsics on run-time context causes the link errors.
`-DCMAKE_BUILD_TYPE=Release` has been available because compiler optimizer can propagate and collapse the function pointers as constant.
However, when the pointers doesn't collapsed the link errors occurred, so `-DCMAKE_BUILD_TYPE=Debug` has been unavailable.
To prevent the link errors, I've replaced the function pointers of intrinsics on run-time context to on compile-time context explicitly.

Pull Request resolved: #2768

Reviewed By: mdouze

Differential Revision: D44296147

Pulled By: alexanderguzhva

fbshipit-source-id: 81fa013c5e05a486b6b82cb85d76eeefdefca891

---------

Co-authored-by: Matthijs Douze <[email protected]>
Co-authored-by: Jeff Palm <[email protected]>
Co-authored-by: Y.Imaizumi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants