CMake variables error when installing faiss-gpu: "Failed to detect a default CUDA architecture"

I’m order to install faiss-gpu, I first needed to install cmake and did it by cloning the cmake repo from and running

./bootstrap && make && make install

Then to install faiss-gpu I cloned the following repo Once cloned I changed directory into that folder and ran the following:

cmake -B build . && make -C -j faiss

But I get multiple errors related to environment variables not set such as:

CMake Error at /usr/local/share/cmake-3.27/Modules/CMakeDetermineCUDACompiler.cmake:603 (message): Failed to detect a default CUDA architecture. Compiler output: Call Stack (most recent call first): CMakeLists.txt:62 (enable_language) -- Configuring incomplete, errors occurred! 

After doing some research I found this as a possible solution, so I did the following:

cmake . -DCMAKE_CUDA_ARCHITECTURES=52 61 -DTARGET_NAME=tgt 

Then the next error is that there is a missing variable: _CMAKE_CUDA_WHOLE_FLAG

Read above as described in detail.

2

Related questions 3 What this CMake Error means? My variables are set to NOTFOUND 0 Cmake with WSL and VS2019 1 Error while using cmake Related questions 3 What this CMake Error means? My variables are set to NOTFOUND 0 Cmake with WSL and VS2019 1 Error while using cmake 1 CMake error when compiling out of tree model in gnu radio 5 CMake toolchain includes multiple files 2 cmake error:Error in configuration files. Project Files may be invalid Load 3 more related questions Show fewer related questions

Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like