faiss-wheels
faiss-wheels copied to clipboard
Segfault in macOS in the presence of other OpenMP dependent packages
Describe the bug
faiss may crash when there is another imported package that depends on libomp
.
To Reproduce
Import a package that depends on OpenMP on macOS, then import faiss-cpu
package. Use faiss as usual.
Expected behavior Should not segfault.
Desktop (please complete the following information):
- OS: macOS
- Architecture: arm64
- Python: any
- Version: v1.7.3
Additional context https://github.com/facebookresearch/faiss/issues/2463 https://github.com/benfred/implicit/issues/613#issuecomment-1242566564 https://github.com/dmlc/xgboost/issues/7039#issuecomment-860932242 https://bugs.llvm.org/show_bug.cgi?id=50579
https://github.com/pytorch/pytorch/issues/44282
A dangerous workaround is to set the following environment variable.
export KMP_DUPLICATE_LIB_OK=TRUE