NVlabs / tiny-cuda-nn

Lightning fast C++/CUDA neural network framework
Other
3.65k stars 449 forks source link

The CUDA compiler identification is unknown #293

Open xu-jiayou opened 1 year ago

xu-jiayou commented 1 year ago

The log tell me that ": fatal error: /usr/local/cuda/bin/../targets/x86_64-linux/include/stdc-predef.h: permission denied." `sudo cmake . -B build -DCMAKE_CUDA_COMPILER=/usr/local/cuda-11.3/bin/nvcc [sudo] ycf 的密码: -- The CUDA compiler identification is unknown -- Check for working CUDA compiler: /usr/local/cuda-11.3/bin/nvcc CMake Error in /home/ycf/tiny-cuda-nn/build/CMakeFiles/CMakeTmp/CMakeLists.txt: CUDA_ARCHITECTURES is empty for target "cmTC_069f6".

CMake Error in /home/ycf/tiny-cuda-nn/build/CMakeFiles/CMakeTmp/CMakeLists.txt: CUDA_ARCHITECTURES is empty for target "cmTC_069f6".

CMake Error at /usr/local/share/cmake-3.21/Modules/CMakeTestCUDACompiler.cmake:43 (try_compile): Failed to generate test project build system. Call Stack (most recent call first): CMakeLists.txt:25 (project)

-- Configuring incomplete, errors occurred! See also "/home/ycf/tiny-cuda-nn/build/CMakeFiles/CMakeOutput.log". See also "/home/ycf/tiny-cuda-nn/build/CMakeFiles/CMakeError.log". ` Can you help me? Thank you very much.

ljjTYJR commented 1 year ago

Did you add --recursive flag when cloning the repo?

luoyun7123 commented 1 year ago

Hello! I have encountered exactly the same problem. May I ask how you resolved it in the end

rexainn commented 7 months ago

Did you add --recursive flag when cloning the repo?

Have you solved?

rexainn commented 7 months ago

Hello! I have encountered exactly the same problem. May I ask how you resolved it in the end

Have you solved?

hbb1 commented 5 months ago

This works for me.

cmake . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo -D CMAKE_CUDA_COMPILER='/usr/local/cuda/bin/nvcc"