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

build failing #3

Closed
rathken opened this issue Oct 31, 2021 · 10 comments
Closed

build failing #3

rathken opened this issue Oct 31, 2021 · 10 comments

Comments

@rathken
Copy link

rathken commented Oct 31, 2021

Build is failing

[ 5%] Building CUDA object src/CMakeFiles/tiny-cuda-nn.dir/common.cu.o
nvcc fatal : A single input file is required for a non-link phase when an outputfile is specified
make[2]: *** [src/CMakeFiles/tiny-cuda-nn.dir/build.make:76: src/CMakeFiles/tiny-cuda-nn.dir/common.cu.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:134: src/CMakeFiles/tiny-cuda-nn.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

@Tom94
Copy link
Collaborator

Tom94 commented Oct 31, 2021

Hi there, more information about your system would be helpful:

  1. Which OS are you running? And on which version?
  2. Which GPUs are installed in the system?
  3. Which version of CUDA and which version of the NVIDIA driver is installed?

@Tom94
Copy link
Collaborator

Tom94 commented Oct 31, 2021

Another one that might be helpful, actually: which version of CMake are you running? (This is useful, because CMake has recently changed a lot about their CUDA support.)

@rathken
Copy link
Author

rathken commented Nov 1, 2021

Ah yes sorry... That would have been smart of me.

Ubuntu 20.04
RTX 3090
RTX 4000
CUDA 11.5 + 495.44
cmake version 3.21.0-rc3

I note that if I role back to commit cdb419d it builds and runs as expected.

@Tom94
Copy link
Collaborator

Tom94 commented Nov 1, 2021

That's really useful information, thank you!

I have a very similar setup here with the main difference being that I only have a single RTX 3090. This leads me to believe that the automatic GPU architecture detection/treatment in the CMake project file is problematic when multiple GPUs with different architectures are present.

To verify, could you try the following two steps?

  1. Could you try building with make VERBOSE=1 and paste the full log here?
  2. Please try replacing the block
include(FindCUDA/select_compute_arch)
cuda_select_nvcc_arch_flags(ARCH_FLAGS)
list(APPEND CUDA_NVCC_FLAGS ${ARCH_FLAGS})

set(CMAKE_CUDA_ARCHITECTURES off)

with the single line

set(CMAKE_CUDA_ARCHITECTURES 86)

in CMakeLists.txt and see if that fixes the problem on your end.

Thank you!

@rathken
Copy link
Author

rathken commented Nov 1, 2021

Replacing the block of code did fix the issue..... Thanks for this great bit of code!

@Tom94
Copy link
Collaborator

Tom94 commented Dec 4, 2021

Hi @rathken . Could you try compiling again with the latest version of this repository? I've tried to fix the multi-GPU issue and would like to make sure. Thanks!

@rathken
Copy link
Author

rathken commented Dec 6, 2021

Will do today.

@rathken
Copy link
Author

rathken commented Dec 6, 2021

It took a while to build, but it built without any issues....

@Tom94
Copy link
Collaborator

Tom94 commented Dec 6, 2021

Amazing, thank you very much for testing!

@jdiazram
Copy link

Hi everyone.
I have a similar problem,

gmake[2]: *** [dependencies/tiny-cuda-nn/CMakeFiles/tiny-cuda-nn.dir/build.make:216: dependencies/tiny-cuda-nn/CMakeFiles/tiny-cuda-nn.dir/src/fully_fused_mlp.cu.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:288: dependencies/tiny-cuda-nn/CMakeFiles/tiny-cuda-nn.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2

but a don't find the block of code that your comment in CMakelist.txt:

include(FindCUDA/select_compute_arch)
cuda_select_nvcc_arch_flags(ARCH_FLAGS)
list(APPEND CUDA_NVCC_FLAGS ${ARCH_FLAGS})

set(CMAKE_CUDA_ARCHITECTURES off)

Only I find the:
set(CMAKE_CUDA_ARCHITECTURES ${TCNN_CUDA_ARCHITECTURES})

and replace for:
set(CMAKE_CUDA_ARCHITECTURES 86)

And the new error is similar to the first one:

gmake[2]: *** [dependencies/tiny-cuda-nn/CMakeFiles/tiny-cuda-nn.dir/build.make:216: dependencies/tiny-cuda-nn/CMakeFiles/tiny-cuda-nn.dir/src/fully_fused_mlp.cu.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:288: dependencies/tiny-cuda-nn/CMakeFiles/tiny-cuda-nn.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2

I have:
Ubuntu 22.04 LTS
RTX 3080 ti mobile
NVIDIA-SMI 515.48.07
Driver Version: 515.48.07
CUDA Version: 11.7
CMake version 3.22.1

Thx for your advice

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

3 participants