Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Build error: nvcc fatal: A single input file is required for a non-link phase when an outputfile is specified #39

Closed
yjdqk opened this issue Jan 18, 2022 · 10 comments

Comments

@yjdqk
Copy link

yjdqk commented Jan 18, 2022

nvcc fatal:unKnown option 'fPIC'

@leslie-ds
Copy link

did you solve it

@markisus
Copy link

markisus commented Jan 18, 2022

I had problems with nvcc too. They went away when I upgraded to the latest version (11.6). Check your version with nvcc --version
image

@mQvQ
Copy link

mQvQ commented Jan 20, 2022

I had the problem too. Add ' -XCompiler' can solve it.
https://www.coder.work/article/3276225

@99991
Copy link

99991 commented Jan 20, 2022

I also had the error message nvcc fatal : Unknown option 'fPIC -Xcompiler' which could be solved by adding a space before -fPIC in CMakeLists.txt

After that, I got the error nvcc fatal : Unknown option '-extended-lambda' which could again be solved by adding a space before that option in this file and also in dependencies/tiny-cuda-nn/CMakeLists.txt.

Now I am stuck at nvcc fatal : Unsupported gpu architecture 'compute_75+PTX'. I have an RTX 3060, so it should be supported according to the README, but maybe the nvcc version which NVIDIA ships by default on Ubuntu 20.04 is too old. I am reluctant to upgrade since I tried that a few times in the past and it never went well.

EDIT: I upgraded nvcc to 11.6 and for the first time in history, it did not fry my entire system.
EDIT2: I spoke too early. First reboot worked, but after a second reboot this morning, the screen stayed black. Surprisingly, it came back on after a third reboot, but after a while, the process nvidia-powered appeared, which is running at 100% CPU utilization.
EDIT3: The system now randomly fails to boot.
EDIT4: The installation page for older cuda versions has incorrect instructions for deb (network). It will install the latest (broken) version instead.

New issues so far:

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

Next, I got:

CMake Error in instant-ngp/build/CMakeFiles/CMakeTmp/CMakeLists.txt:
  CUDA_ARCHITECTURES is empty for target "cmTC_97a7d".

This could be fixed by defining CMAKE_CUDA_COMPILER as descriped in #25

cmake . -B build -DCMAKE_CUDA_COMPILER=/usr/local/cuda-11.6/bin/nvcc

After compiling for maybe 15 minutes, I get the next error:

/usr/bin/ld: libngp.a(testbed_image.cu.o): in function `void tcnn::CudaGraph::capture_and_execute<tcnn::Trainer<float, __half, __half>::training_step(CUstream_st*, tcnn::GPUMatrix<float, (tcnn::MatrixLayout)1> const&, tcnn::GPUMatrix<float, (tcnn::MatrixLayout)1> const&, float*, tcnn::GPUMatrix<float, (tcnn::MatrixLayout)1> const*)::{lambda()#1}>(CUstream_st*, bool, tcnn::Trainer<float, __half, __half>::training_step(CUstream_st*, tcnn::GPUMatrix<float, (tcnn::MatrixLayout)1> const&, tcnn::GPUMatrix<float, (tcnn::MatrixLayout)1> const&, float*, tcnn::GPUMatrix<float, (tcnn::MatrixLayout)1> const*)::{lambda()#1})':
tmpxft_00001340_00000000-6_testbed_image.cudafe1.cpp:(.text._ZN4tcnn9CudaGraph19capture_and_executeIZNS_7TrainerIf6__halfS3_E13training_stepEP11CUstream_stRKNS_9GPUMatrixIfLNS_12MatrixLayoutE1EEESB_PfPSA_EUlvE_EEvS6_bT_[_ZN4tcnn9CudaGraph19capture_and_executeIZNS_7TrainerIf6__halfS3_E13training_stepEP11CUstream_stRKNS_9GPUMatrixIfLNS_12MatrixLayoutE1EEESB_PfPSA_EUlvE_EEvS6_bT_]+0x406): undefined reference to `cudaGraphExecUpdate'
/usr/bin/ld: dependencies/tiny-cuda-nn/src/libtiny-cuda-nn.a(optimizer.cu.o): in function `tcnn::ShampooOptimizer<float>::step(CUstream_st*, float, float*, float*, float const*)::{lambda()#1}::operator()() const':
tmpxft_00001087_00000000-6_optimizer.cudafe1.cpp:(.text._ZZN4tcnn16ShampooOptimizerIfE4stepEP11CUstream_stfPfS4_PKfENKUlvE_clEv[_ZZN4tcnn16ShampooOptimizerIfE4stepEP11CUstream_stfPfS4_PKfENKUlvE_clEv]+0xacf): undefined reference to `cublasSetWorkspace_v2'
/usr/bin/ld: tmpxft_00001087_00000000-6_optimizer.cudafe1.cpp:(.text._ZZN4tcnn16ShampooOptimizerIfE4stepEP11CUstream_stfPfS4_PKfENKUlvE_clEv[_ZZN4tcnn16ShampooOptimizerIfE4stepEP11CUstream_stfPfS4_PKfENKUlvE_clEv]+0xebb): undefined reference to `cublasSetWorkspace_v2'
/usr/bin/ld: tmpxft_00001087_00000000-6_optimizer.cudafe1.cpp:(.text._ZZN4tcnn16ShampooOptimizerIfE4stepEP11CUstream_stfPfS4_PKfENKUlvE_clEv[_ZZN4tcnn16ShampooOptimizerIfE4stepEP11CUstream_stfPfS4_PKfENKUlvE_clEv]+0x12c1): undefined reference to `cublasSetWorkspace_v2'
/usr/bin/ld: dependencies/tiny-cuda-nn/src/libtiny-cuda-nn.a(optimizer.cu.o): in function `tcnn::ShampooOptimizer<__half>::step(CUstream_st*, float, float*, __half*, __half const*)::{lambda()#1}::operator()() const':
tmpxft_00001087_00000000-6_optimizer.cudafe1.cpp:(.text._ZZN4tcnn16ShampooOptimizerI6__halfE4stepEP11CUstream_stfPfPS1_PKS1_ENKUlvE_clEv[_ZZN4tcnn16ShampooOptimizerI6__halfE4stepEP11CUstream_stfPfPS1_PKS1_ENKUlvE_clEv]+0xaec): undefined reference to `cublasSetWorkspace_v2'
/usr/bin/ld: tmpxft_00001087_00000000-6_optimizer.cudafe1.cpp:(.text._ZZN4tcnn16ShampooOptimizerI6__halfE4stepEP11CUstream_stfPfPS1_PKS1_ENKUlvE_clEv[_ZZN4tcnn16ShampooOptimizerI6__halfE4stepEP11CUstream_stfPfPS1_PKS1_ENKUlvE_clEv]+0xed8): undefined reference to `cublasSetWorkspace_v2'
/usr/bin/ld: dependencies/tiny-cuda-nn/src/libtiny-cuda-nn.a(optimizer.cu.o):tmpxft_00001087_00000000-6_optimizer.cudafe1.cpp:(.text._ZZN4tcnn16ShampooOptimizerI6__halfE4stepEP11CUstream_stfPfPS1_PKS1_ENKUlvE_clEv[_ZZN4tcnn16ShampooOptimizerI6__halfE4stepEP11CUstream_stfPfPS1_PKS1_ENKUlvE_clEv]+0x12de): more undefined references to `cublasSetWorkspace_v2' follow
/usr/bin/ld: dependencies/tiny-cuda-nn/src/libtiny-cuda-nn.a(optimizer.cu.o): in function `void tcnn::CudaGraph::capture_and_execute<tcnn::ShampooOptimizer<float>::step(CUstream_st*, float, float*, float*, float const*)::{lambda()#1}>(CUstream_st*, bool, tcnn::ShampooOptimizer<float>::step(CUstream_st*, float, float*, float*, float const*)::{lambda()#1})':
tmpxft_00001087_00000000-6_optimizer.cudafe1.cpp:(.text._ZN4tcnn9CudaGraph19capture_and_executeIZNS_16ShampooOptimizerIfE4stepEP11CUstream_stfPfS6_PKfEUlvE_EEvS5_bT_[_ZN4tcnn9CudaGraph19capture_and_executeIZNS_16ShampooOptimizerIfE4stepEP11CUstream_stfPfS6_PKfEUlvE_EEvS5_bT_]+0x406): undefined reference to `cudaGraphExecUpdate'
/usr/bin/ld: dependencies/tiny-cuda-nn/src/libtiny-cuda-nn.a(optimizer.cu.o): in function `void tcnn::CudaGraph::capture_and_execute<tcnn::ShampooOptimizer<float>::inverse_pth_root_batched<float>(CUstream_st*, unsigned int, float*, tcnn::GPUMemory<float>&, unsigned int, unsigned int)::{lambda()#1}>(CUstream_st*, bool, tcnn::ShampooOptimizer<float>::inverse_pth_root_batched<float>(CUstream_st*, unsigned int, float*, tcnn::GPUMemory<float>&, unsigned int, unsigned int)::{lambda()#1})':
tmpxft_00001087_00000000-6_optimizer.cudafe1.cpp:(.text._ZN4tcnn9CudaGraph19capture_and_executeIZNS_16ShampooOptimizerIfE24inverse_pth_root_batchedIfEEvP11CUstream_stjPfRNS_9GPUMemoryIT_EEjjEUlvE_EEvS6_bS9_[_ZN4tcnn9CudaGraph19capture_and_executeIZNS_16ShampooOptimizerIfE24inverse_pth_root_batchedIfEEvP11CUstream_stjPfRNS_9GPUMemoryIT_EEjjEUlvE_EEvS6_bS9_]+0x406): undefined reference to `cudaGraphExecUpdate'
/usr/bin/ld: dependencies/tiny-cuda-nn/src/libtiny-cuda-nn.a(optimizer.cu.o): in function `void tcnn::CudaGraph::capture_and_execute<tcnn::ShampooOptimizer<float>::inverse_pth_root_batched<float>(CUstream_st*, unsigned int, float*, tcnn::GPUMemory<float>&, unsigned int, unsigned int)::{lambda()#2}>(CUstream_st*, bool, tcnn::ShampooOptimizer<float>::inverse_pth_root_batched<float>(CUstream_st*, unsigned int, float*, tcnn::GPUMemory<float>&, unsigned int, unsigned int)::{lambda()#2})':
tmpxft_00001087_00000000-6_optimizer.cudafe1.cpp:(.text._ZN4tcnn9CudaGraph19capture_and_executeIZNS_16ShampooOptimizerIfE24inverse_pth_root_batchedIfEEvP11CUstream_stjPfRNS_9GPUMemoryIT_EEjjEUlvE0_EEvS6_bS9_[_ZN4tcnn9CudaGraph19capture_and_executeIZNS_16ShampooOptimizerIfE24inverse_pth_root_batchedIfEEvP11CUstream_stjPfRNS_9GPUMemoryIT_EEjjEUlvE0_EEvS6_bS9_]+0x406): undefined reference to `cudaGraphExecUpdate'
/usr/bin/ld: dependencies/tiny-cuda-nn/src/libtiny-cuda-nn.a(optimizer.cu.o): in function `void tcnn::CudaGraph::capture_and_execute<tcnn::ShampooOptimizer<__half>::step(CUstream_st*, float, float*, __half*, __half const*)::{lambda()#1}>(CUstream_st*, bool, tcnn::ShampooOptimizer<__half>::step(CUstream_st*, float, float*, __half*, __half const*)::{lambda()#1})':
tmpxft_00001087_00000000-6_optimizer.cudafe1.cpp:(.text._ZN4tcnn9CudaGraph19capture_and_executeIZNS_16ShampooOptimizerI6__halfE4stepEP11CUstream_stfPfPS3_PKS3_EUlvE_EEvS6_bT_[_ZN4tcnn9CudaGraph19capture_and_executeIZNS_16ShampooOptimizerI6__halfE4stepEP11CUstream_stfPfPS3_PKS3_EUlvE_EEvS6_bT_]+0x406): undefined reference to `cudaGraphExecUpdate'
/usr/bin/ld: dependencies/tiny-cuda-nn/src/libtiny-cuda-nn.a(optimizer.cu.o): in function `void tcnn::CudaGraph::capture_and_execute<tcnn::ShampooOptimizer<__half>::inverse_pth_root_batched<float>(CUstream_st*, unsigned int, float*, tcnn::GPUMemory<float>&, unsigned int, unsigned int)::{lambda()#1}>(CUstream_st*, bool, tcnn::ShampooOptimizer<__half>::inverse_pth_root_batched<float>(CUstream_st*, unsigned int, float*, tcnn::GPUMemory<float>&, unsigned int, unsigned int)::{lambda()#1})':
tmpxft_00001087_00000000-6_optimizer.cudafe1.cpp:(.text._ZN4tcnn9CudaGraph19capture_and_executeIZNS_16ShampooOptimizerI6__halfE24inverse_pth_root_batchedIfEEvP11CUstream_stjPfRNS_9GPUMemoryIT_EEjjEUlvE_EEvS7_bSA_[_ZN4tcnn9CudaGraph19capture_and_executeIZNS_16ShampooOptimizerI6__halfE24inverse_pth_root_batchedIfEEvP11CUstream_stjPfRNS_9GPUMemoryIT_EEjjEUlvE_EEvS7_bSA_]+0x406): undefined reference to `cudaGraphExecUpdate'
/usr/bin/ld: dependencies/tiny-cuda-nn/src/libtiny-cuda-nn.a(optimizer.cu.o):tmpxft_00001087_00000000-6_optimizer.cudafe1.cpp:(.text._ZN4tcnn9CudaGraph19capture_and_executeIZNS_16ShampooOptimizerI6__halfE24inverse_pth_root_batchedIfEEvP11CUstream_stjPfRNS_9GPUMemoryIT_EEjjEUlvE0_EEvS7_bSA_[_ZN4tcnn9CudaGraph19capture_and_executeIZNS_16ShampooOptimizerI6__halfE24inverse_pth_root_batchedIfEEvP11CUstream_stjPfRNS_9GPUMemoryIT_EEjjEUlvE0_EEvS7_bSA_]+0x406): more undefined references to `cudaGraphExecUpdate' follow
collect2: error: ld returned 1 exit status

Another issue mentions that a similar error could be fixed by defining CMAKE_CUDA_COMPILER, which I already do, so I am stuck again.

@yjdqk
Copy link
Author

yjdqk commented Jan 21, 2022

I also had the error message nvcc fatal : Unknown option 'fPIC -Xcompiler' which could be solved by adding a space before -fPIC in CMakeLists.txt

After that, I got the error nvcc fatal : Unknown option '-extended-lambda' which could again be solved by adding a space before that option in this file and also in dependencies/tiny-cuda-nn/CMakeLists.txt.

Now I am stuck at nvcc fatal : Unsupported gpu architecture 'compute_75+PTX'. I have an RTX 3060, so it should be supported according to the README, but maybe the nvcc version which NVIDIA ships by default on Ubuntu 20.04 is too old. I am reluctant to upgrade since I tried that a few times in the past and it never went well.

EDIT: I upgraded nvcc to 11.6 and for the first time in history, it did not fry my entire system.

New issues so far:

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

Next, I got:

CMake Error in instant-ngp/build/CMakeFiles/CMakeTmp/CMakeLists.txt:
  CUDA_ARCHITECTURES is empty for target "cmTC_97a7d".

This could be fixed by defining CMAKE_CUDA_COMPILER as descriped in #25

cmake . -B build -DCMAKE_CUDA_COMPILER=/usr/local/cuda-11.6/bin/nvcc

After compiling for maybe 15 minutes, I get the next error:

/usr/bin/ld: libngp.a(testbed_image.cu.o): in function `void tcnn::CudaGraph::capture_and_execute<tcnn::Trainer<float, __half, __half>::training_step(CUstream_st*, tcnn::GPUMatrix<float, (tcnn::MatrixLayout)1> const&, tcnn::GPUMatrix<float, (tcnn::MatrixLayout)1> const&, float*, tcnn::GPUMatrix<float, (tcnn::MatrixLayout)1> const*)::{lambda()#1}>(CUstream_st*, bool, tcnn::Trainer<float, __half, __half>::training_step(CUstream_st*, tcnn::GPUMatrix<float, (tcnn::MatrixLayout)1> const&, tcnn::GPUMatrix<float, (tcnn::MatrixLayout)1> const&, float*, tcnn::GPUMatrix<float, (tcnn::MatrixLayout)1> const*)::{lambda()#1})':
tmpxft_00001340_00000000-6_testbed_image.cudafe1.cpp:(.text._ZN4tcnn9CudaGraph19capture_and_executeIZNS_7TrainerIf6__halfS3_E13training_stepEP11CUstream_stRKNS_9GPUMatrixIfLNS_12MatrixLayoutE1EEESB_PfPSA_EUlvE_EEvS6_bT_[_ZN4tcnn9CudaGraph19capture_and_executeIZNS_7TrainerIf6__halfS3_E13training_stepEP11CUstream_stRKNS_9GPUMatrixIfLNS_12MatrixLayoutE1EEESB_PfPSA_EUlvE_EEvS6_bT_]+0x406): undefined reference to `cudaGraphExecUpdate'
/usr/bin/ld: dependencies/tiny-cuda-nn/src/libtiny-cuda-nn.a(optimizer.cu.o): in function `tcnn::ShampooOptimizer<float>::step(CUstream_st*, float, float*, float*, float const*)::{lambda()#1}::operator()() const':
tmpxft_00001087_00000000-6_optimizer.cudafe1.cpp:(.text._ZZN4tcnn16ShampooOptimizerIfE4stepEP11CUstream_stfPfS4_PKfENKUlvE_clEv[_ZZN4tcnn16ShampooOptimizerIfE4stepEP11CUstream_stfPfS4_PKfENKUlvE_clEv]+0xacf): undefined reference to `cublasSetWorkspace_v2'
/usr/bin/ld: tmpxft_00001087_00000000-6_optimizer.cudafe1.cpp:(.text._ZZN4tcnn16ShampooOptimizerIfE4stepEP11CUstream_stfPfS4_PKfENKUlvE_clEv[_ZZN4tcnn16ShampooOptimizerIfE4stepEP11CUstream_stfPfS4_PKfENKUlvE_clEv]+0xebb): undefined reference to `cublasSetWorkspace_v2'
/usr/bin/ld: tmpxft_00001087_00000000-6_optimizer.cudafe1.cpp:(.text._ZZN4tcnn16ShampooOptimizerIfE4stepEP11CUstream_stfPfS4_PKfENKUlvE_clEv[_ZZN4tcnn16ShampooOptimizerIfE4stepEP11CUstream_stfPfS4_PKfENKUlvE_clEv]+0x12c1): undefined reference to `cublasSetWorkspace_v2'
/usr/bin/ld: dependencies/tiny-cuda-nn/src/libtiny-cuda-nn.a(optimizer.cu.o): in function `tcnn::ShampooOptimizer<__half>::step(CUstream_st*, float, float*, __half*, __half const*)::{lambda()#1}::operator()() const':
tmpxft_00001087_00000000-6_optimizer.cudafe1.cpp:(.text._ZZN4tcnn16ShampooOptimizerI6__halfE4stepEP11CUstream_stfPfPS1_PKS1_ENKUlvE_clEv[_ZZN4tcnn16ShampooOptimizerI6__halfE4stepEP11CUstream_stfPfPS1_PKS1_ENKUlvE_clEv]+0xaec): undefined reference to `cublasSetWorkspace_v2'
/usr/bin/ld: tmpxft_00001087_00000000-6_optimizer.cudafe1.cpp:(.text._ZZN4tcnn16ShampooOptimizerI6__halfE4stepEP11CUstream_stfPfPS1_PKS1_ENKUlvE_clEv[_ZZN4tcnn16ShampooOptimizerI6__halfE4stepEP11CUstream_stfPfPS1_PKS1_ENKUlvE_clEv]+0xed8): undefined reference to `cublasSetWorkspace_v2'
/usr/bin/ld: dependencies/tiny-cuda-nn/src/libtiny-cuda-nn.a(optimizer.cu.o):tmpxft_00001087_00000000-6_optimizer.cudafe1.cpp:(.text._ZZN4tcnn16ShampooOptimizerI6__halfE4stepEP11CUstream_stfPfPS1_PKS1_ENKUlvE_clEv[_ZZN4tcnn16ShampooOptimizerI6__halfE4stepEP11CUstream_stfPfPS1_PKS1_ENKUlvE_clEv]+0x12de): more undefined references to `cublasSetWorkspace_v2' follow
/usr/bin/ld: dependencies/tiny-cuda-nn/src/libtiny-cuda-nn.a(optimizer.cu.o): in function `void tcnn::CudaGraph::capture_and_execute<tcnn::ShampooOptimizer<float>::step(CUstream_st*, float, float*, float*, float const*)::{lambda()#1}>(CUstream_st*, bool, tcnn::ShampooOptimizer<float>::step(CUstream_st*, float, float*, float*, float const*)::{lambda()#1})':
tmpxft_00001087_00000000-6_optimizer.cudafe1.cpp:(.text._ZN4tcnn9CudaGraph19capture_and_executeIZNS_16ShampooOptimizerIfE4stepEP11CUstream_stfPfS6_PKfEUlvE_EEvS5_bT_[_ZN4tcnn9CudaGraph19capture_and_executeIZNS_16ShampooOptimizerIfE4stepEP11CUstream_stfPfS6_PKfEUlvE_EEvS5_bT_]+0x406): undefined reference to `cudaGraphExecUpdate'
/usr/bin/ld: dependencies/tiny-cuda-nn/src/libtiny-cuda-nn.a(optimizer.cu.o): in function `void tcnn::CudaGraph::capture_and_execute<tcnn::ShampooOptimizer<float>::inverse_pth_root_batched<float>(CUstream_st*, unsigned int, float*, tcnn::GPUMemory<float>&, unsigned int, unsigned int)::{lambda()#1}>(CUstream_st*, bool, tcnn::ShampooOptimizer<float>::inverse_pth_root_batched<float>(CUstream_st*, unsigned int, float*, tcnn::GPUMemory<float>&, unsigned int, unsigned int)::{lambda()#1})':
tmpxft_00001087_00000000-6_optimizer.cudafe1.cpp:(.text._ZN4tcnn9CudaGraph19capture_and_executeIZNS_16ShampooOptimizerIfE24inverse_pth_root_batchedIfEEvP11CUstream_stjPfRNS_9GPUMemoryIT_EEjjEUlvE_EEvS6_bS9_[_ZN4tcnn9CudaGraph19capture_and_executeIZNS_16ShampooOptimizerIfE24inverse_pth_root_batchedIfEEvP11CUstream_stjPfRNS_9GPUMemoryIT_EEjjEUlvE_EEvS6_bS9_]+0x406): undefined reference to `cudaGraphExecUpdate'
/usr/bin/ld: dependencies/tiny-cuda-nn/src/libtiny-cuda-nn.a(optimizer.cu.o): in function `void tcnn::CudaGraph::capture_and_execute<tcnn::ShampooOptimizer<float>::inverse_pth_root_batched<float>(CUstream_st*, unsigned int, float*, tcnn::GPUMemory<float>&, unsigned int, unsigned int)::{lambda()#2}>(CUstream_st*, bool, tcnn::ShampooOptimizer<float>::inverse_pth_root_batched<float>(CUstream_st*, unsigned int, float*, tcnn::GPUMemory<float>&, unsigned int, unsigned int)::{lambda()#2})':
tmpxft_00001087_00000000-6_optimizer.cudafe1.cpp:(.text._ZN4tcnn9CudaGraph19capture_and_executeIZNS_16ShampooOptimizerIfE24inverse_pth_root_batchedIfEEvP11CUstream_stjPfRNS_9GPUMemoryIT_EEjjEUlvE0_EEvS6_bS9_[_ZN4tcnn9CudaGraph19capture_and_executeIZNS_16ShampooOptimizerIfE24inverse_pth_root_batchedIfEEvP11CUstream_stjPfRNS_9GPUMemoryIT_EEjjEUlvE0_EEvS6_bS9_]+0x406): undefined reference to `cudaGraphExecUpdate'
/usr/bin/ld: dependencies/tiny-cuda-nn/src/libtiny-cuda-nn.a(optimizer.cu.o): in function `void tcnn::CudaGraph::capture_and_execute<tcnn::ShampooOptimizer<__half>::step(CUstream_st*, float, float*, __half*, __half const*)::{lambda()#1}>(CUstream_st*, bool, tcnn::ShampooOptimizer<__half>::step(CUstream_st*, float, float*, __half*, __half const*)::{lambda()#1})':
tmpxft_00001087_00000000-6_optimizer.cudafe1.cpp:(.text._ZN4tcnn9CudaGraph19capture_and_executeIZNS_16ShampooOptimizerI6__halfE4stepEP11CUstream_stfPfPS3_PKS3_EUlvE_EEvS6_bT_[_ZN4tcnn9CudaGraph19capture_and_executeIZNS_16ShampooOptimizerI6__halfE4stepEP11CUstream_stfPfPS3_PKS3_EUlvE_EEvS6_bT_]+0x406): undefined reference to `cudaGraphExecUpdate'
/usr/bin/ld: dependencies/tiny-cuda-nn/src/libtiny-cuda-nn.a(optimizer.cu.o): in function `void tcnn::CudaGraph::capture_and_execute<tcnn::ShampooOptimizer<__half>::inverse_pth_root_batched<float>(CUstream_st*, unsigned int, float*, tcnn::GPUMemory<float>&, unsigned int, unsigned int)::{lambda()#1}>(CUstream_st*, bool, tcnn::ShampooOptimizer<__half>::inverse_pth_root_batched<float>(CUstream_st*, unsigned int, float*, tcnn::GPUMemory<float>&, unsigned int, unsigned int)::{lambda()#1})':
tmpxft_00001087_00000000-6_optimizer.cudafe1.cpp:(.text._ZN4tcnn9CudaGraph19capture_and_executeIZNS_16ShampooOptimizerI6__halfE24inverse_pth_root_batchedIfEEvP11CUstream_stjPfRNS_9GPUMemoryIT_EEjjEUlvE_EEvS7_bSA_[_ZN4tcnn9CudaGraph19capture_and_executeIZNS_16ShampooOptimizerI6__halfE24inverse_pth_root_batchedIfEEvP11CUstream_stjPfRNS_9GPUMemoryIT_EEjjEUlvE_EEvS7_bSA_]+0x406): undefined reference to `cudaGraphExecUpdate'
/usr/bin/ld: dependencies/tiny-cuda-nn/src/libtiny-cuda-nn.a(optimizer.cu.o):tmpxft_00001087_00000000-6_optimizer.cudafe1.cpp:(.text._ZN4tcnn9CudaGraph19capture_and_executeIZNS_16ShampooOptimizerI6__halfE24inverse_pth_root_batchedIfEEvP11CUstream_stjPfRNS_9GPUMemoryIT_EEjjEUlvE0_EEvS7_bSA_[_ZN4tcnn9CudaGraph19capture_and_executeIZNS_16ShampooOptimizerI6__halfE24inverse_pth_root_batchedIfEEvP11CUstream_stjPfRNS_9GPUMemoryIT_EEjjEUlvE0_EEvS7_bSA_]+0x406): more undefined references to `cudaGraphExecUpdate' follow
collect2: error: ld returned 1 exit status

Another issue mentions that a similar error could be fixed by defining CMAKE_CUDA_COMPILER, which I already do, so I am stuck again.

my new issue is: nvcc fatal: A single input file is required for a non-link phase when an outputfile is specified

@99991
Copy link

99991 commented Jan 21, 2022

I give up. My computer is broken now because of driver update. Of course no offense to the authors. It is not their fault that NVIDIA drivers are trash.

Best luck to all of you.

@kdotdot
Copy link

kdotdot commented Jan 30, 2022

my new issue is: nvcc fatal: A single input file is required for a non-link phase when an outputfile is specified

Hi, has anyone been able to solve this issue?

@Tom94 Tom94 changed the title I got a problem with run "cmake --build build --config RelWithDebInfo -j 16" Build error: nvcc fatal: A single input file is required for a non-link phase when an outputfile is specified Feb 3, 2022
@SaschaHornauer
Copy link

SaschaHornauer commented Feb 8, 2022

By adding a -v to cmake, it will show you the line it is trying to execute. For me, I followed the advice to add a space but that will actually change the parameters which are generated. Where before, the parameters would be

nvcc ... -fPIC ...

now it was

nvcc ... " -fPIC" ...

and nvcc does not seem to understand that. So after updating my cmake I removed all spaces in both CMakeLists files again and this time it finishes compiling. You can check what your cmake command produces with:

cmake . -B build -DCMAKE_CUDA_COMPILER=/usr/local/cuda-11.6/bin/nvcc -v

Depending on your cuda version, for me it's 11.6. I think the culprit here could be cmake which changes how it adds these command line parameters between versions but I don't know for sure.

@NcMasters
Copy link

NcMasters commented Feb 18, 2022

you cant have file path with spaces. that solved my problem

@Tom94
Copy link
Collaborator

Tom94 commented Feb 20, 2022

See also #198

@Tom94 Tom94 closed this as completed Feb 20, 2022
@NVlabs NVlabs locked and limited conversation to collaborators Feb 20, 2022
@Tom94 Tom94 converted this issue into discussion #199 Feb 20, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants