instant-ngp
instant-ngp copied to clipboard
MAKE_CUDA_ARCHITECTURES must be non-empty if set.
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".
Can you try again after updating to the latest commit?
git pull origin master
git submodule update --recursive
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$
same
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 |
+-------------------------------+----------------------+----------------------+
I had to delete the previous build, add the cuda paths in my bashrc, rebuild it and it worked.
I had to delete the previous build, add the cuda paths in my bashrc, rebuild it and it worked.
work, thk~
@tom-bu Can you please say exactly what you added to .bashrc?
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
two steps to solve the problem:
- delete the build folder
- run:
cmake . -B build -DCMAKE_CUDA_COMPILER=/usr/local/cuda-12.1/bin/nvcc -DTCNN_CUDA_ARCHITECTURES=61
@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.
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)
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
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?
@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
I deleted the build
directory, then it worked.
I had to delete the previous build, add the cuda paths in my bashrc, rebuild it and it worked.
This works, thanks so much.
If you compile multiple libraries at the same time, you need to delete the build
inside onnxruntime directory. Because in my case, when I deleted build
out of onnxruntime directory, nothing changed.