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

MAKE_CUDA_ARCHITECTURES must be non-empty if set. #1142

Open
narviii opened this issue Dec 28, 2022 · 15 comments
Open

MAKE_CUDA_ARCHITECTURES must be non-empty if set. #1142

narviii opened this issue Dec 28, 2022 · 15 comments

Comments

@narviii
Copy link

narviii commented Dec 28, 2022

Getting this error when trying to compile it on Ubuntu. Cuda is installed ( v 11.3), did everything according to the readme. What might be wrong?

Full error text:

CMake Error at /usr/share/cmake-3.24/Modules/CMakeDetermineCUDACompiler.cmake:277 (message):
CMAKE_CUDA_ARCHITECTURES must be non-empty if set.
Call Stack (most recent call first):
CMakeLists.txt:11 (project)

-- Configuring incomplete, errors occurred!
See also "/home/narvi/apps/instant-ngp/build/CMakeFiles/CMakeOutput.log".
See also "/home/narvi/apps/instant-ngp/build/CMakeFiles/CMakeError.log".

@Tom94
Copy link
Collaborator

Tom94 commented Dec 30, 2022

Can you try again after updating to the latest commit?

git pull origin master
git submodule update --recursive

@narviii
Copy link
Author

narviii commented Dec 31, 2022

Same error:(

CMake Error at /usr/share/cmake-3.24/Modules/CMakeDetermineCUDACompiler.cmake:277 (message):
  CMAKE_CUDA_ARCHITECTURES must be non-empty if set.
Call Stack (most recent call first):
  CMakeLists.txt:11 (project)


-- Configuring incomplete, errors occurred!
See also "/home/narvi/apps/instant-ngp/build/CMakeFiles/CMakeOutput.log".
See also "/home/narvi/apps/instant-ngp/build/CMakeFiles/CMakeError.log".
(base) narvi@narviBUBUNTU:~/apps/instant-ngp$ 

@XinyueZ
Copy link

XinyueZ commented Jan 13, 2023

same

@tywenk
Copy link

tywenk commented Jan 29, 2023

Also have this same exact error after running make . -B build

I have all prereqs installed.

Ubuntu version:

Distributor ID:	Ubuntu
Description:	Ubuntu 22.10
Release:	22.10
Codename:	kinetic

gcc version:
gcc (Ubuntu 12.2.0-3ubuntu1) 12.2.0

cmake:
cmake version 3.24.2

nvidia-smi:

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.60.13    Driver Version: 525.60.13    CUDA Version: 12.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  On   | 00000000:09:00.0  On |                  N/A |
|  0%   47C    P5    22W / 240W |   1596MiB /  8192MiB |     29%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

@tom-bu
Copy link

tom-bu commented Feb 17, 2023

I had to delete the previous build, add the cuda paths in my bashrc, rebuild it and it worked.

@Luoyingfeng8
Copy link

I had to delete the previous build, add the cuda paths in my bashrc, rebuild it and it worked.

work, thk~

@ghost
Copy link

ghost commented Mar 5, 2023

@tom-bu Can you please say exactly what you added to .bashrc?

@difficulToName
Copy link

I have encountered this problem before when I was installing COLMAP.
To solve it:
rm -r /path/to/instant-ngp/build to delete previous build files
vim /path/to/instant-ngp/CMakeList.txt
add set(CMAKE_CUDA_ARCHITECTURES "native") under the project()code block
save txt and recompile
for more information

@Fernweh-yang
Copy link

Fernweh-yang commented Apr 30, 2023

two steps to solve the problem:

  1. delete the build folder
  2. run: cmake . -B build -DCMAKE_CUDA_COMPILER=/usr/local/cuda-12.1/bin/nvcc -DTCNN_CUDA_ARCHITECTURES=61

@xpmemeda
Copy link

xpmemeda commented Jul 11, 2023

@tom-bu Can you please say exactly what you added to .bashrc?

Add your nvcc executable to PATH. In my environment, it is export PATH=$PATH:/usr/local/cuda/bin.

@amughrabi
Copy link

Using Anaconda/Linux:

I solved my problem as below:

rm -rf build 

conda install -c nvidia cuda-toolkit

cmake . -B build -DCMAKE_CUDA_COMPILER=$(which nvcc)

@nocnestudio
Copy link

Using Anaconda/Linux:

I solved my problem as below:

rm -rf build 

conda install -c nvidia cuda-toolkit

cmake . -B build -DCMAKE_CUDA_COMPILER=$(which nvcc)

You are my HERO. You are the best. Thank You Thank You. I'm crying ;;;;;;((((( THX THX

@sundeco
Copy link

sundeco commented Dec 22, 2023

Sorry for the basic question, but when I run the cmake command it tells me I need a build directory and I need the CMakeList.txt file in it. Am I correct to assume that after deleting the build directory, I need to use mkdir again and then move CMakeList.txt into that directory?

@Nuclear6
Copy link

@tom-bu Can you please say exactly what you added to .bashrc?您能具体说明一下您添加到 .bashrc 中的内容吗?

export PATH="/usr/local/cuda/bin:$PATH"
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH

@shink
Copy link

shink commented Apr 30, 2024

I deleted the build directory, then it worked.

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

No branches or pull requests