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

Shoud it need to set CUDA_NVCC_EXECUTABLE manually? #28

Closed
somisawa opened this issue Jan 17, 2022 · 2 comments
Closed

Shoud it need to set CUDA_NVCC_EXECUTABLE manually? #28

somisawa opened this issue Jan 17, 2022 · 2 comments

Comments

@somisawa
Copy link

Environment: Ubuntu 20.04
GPU: RTX 3090
CUDA: v11.6

When I ran the commandcmake . -B build -DCMAKE_CUDA_COMPILER=/usr/local/cuda-11.6/bin/nvcc, my GPU was not detected and it returns;

-- Automatic GPU detection failed. Building for common architectures.
-- Targeting GPU architectures: 30;35;50;52+PTX
CMake Warning at dependencies/tiny-cuda-nn/CMakeLists.txt:105 (message):
  Fully fused MLPs do not support GPU architectures of 70 or less.  Falling
  back to CUTLASS MLPs.  Remove GPU architectures 70 and lower to allow
  maximum performance

I fixed this by setting CUDA_NVCC_EXECUTABLE mannually like cmake . -B build -DCMAKE_CUDA_COMPILER=/usr/local/cuda-11.6/bin/nvcc -DCUDA_NVCC_EXECUTABLE=/usr/local/cuda-11.6/bin/nvcc
because in path/to/NVIDIA-OptiX-SDK-7.4.0-linux64-x86_64/SDK/CMake/FindCUDA/select_compute_arch.cmake,

execute_process(COMMAND "${CUDA_NVCC_EXECUTABLE}" "--run" "${cufile}"
                WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/CMakeFiles/"
                RESULT_VARIABLE nvcc_res OUTPUT_VARIABLE nvcc_out
                ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)

dont work due to CUDA_NVCC_EXECUTABLE is empty in my case. Unfortunately, there are few resources about CUDA_NVCC_EXECUTABLE on web and I'd like to know what you expected in ordinal case. Is it my own environmental problem around CUDA?

Thanks!

@somisawa
Copy link
Author

somisawa commented Jan 17, 2022

Plus, by also setting CUDA_VERSION mannually, repo finally works with RTX 3090!

I would think some environmental variables related to cuda, which is needed for this package, is not set in the ordinal installation way of cuda.

Next, I will try to make Dockerfile to accumulate my knowledge.

@plops
Copy link

plops commented Jan 18, 2022

I had this problem because the system gcc/g++ was version 11 but cuda requires version <=10.

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