Skip to content

Shoud it need to set CUDA_NVCC_EXECUTABLE manually? #28

Closed
@somisawa

Description

@somisawa

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions