The CMake project reports an error: CUDA driver version is insufficient for CUDA runtime version

My device configuration: Ubuntu20.04 && Gefore RTX 3060;
My CUDA Driver version: NVIDIA-SMI 525.89.02 Driver Version: 525.89.02 CUDA Version: 12.0
My CUDA runtime version: Cuda compilation tools, **release 11.8, V11.8.89 **
Build cuda_11.8.r11.8/compiler.31833905_0

**My CMake Project: **

CUDA Dir’s CMakeLists.txt

set(cuda_include_dir /usr/local/cuda/include)
set(cuda_lib_dir /usr/local/cuda/lib64)
add_cuda_headers_and_sources (clickhouse_aggregate_functions_cuda .)
add_library (clickhouse_aggregate_functions_cuda SHARED ${clickhouse_aggregate_functions_cuda_sources})    # ${clickhouse_aggregate_functions_cuda_headers}
set_target_properties(clickhouse_aggregate_functions_cuda PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
set_target_properties(clickhouse_aggregate_functions_cuda PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_compile_features(clickhouse_aggregate_functions_cuda PUBLIC cuda_std_17)

target_include_directories(clickhouse_aggregate_functions_cuda PUBLIC ${cuda_include_dir})

target_link_libraries(clickhouse_aggregate_functions_cuda PUBLIC ${cuda_lib_dir}/

Outermost CMakeLists.txt

set(CMAKE_CUDA_COMPILER /usr/local/cuda/bin/nvcc)
project(ClickHouse LANGUAGES C CXX ASM CUDA)


But, When I call the CUDA runtime API in the .cu/.cuh/.h file, I get an error “CUDA driver version is insufficient for CUDA runtime version”. Why? Please!

Always, always, always, this error means you should update your GPU driver to the latest for your GPU.

The latest driver for RTX 3060 is newer than the 525.89.02 driver that you have installed. You can get a 530.xx driver here.

I won’t be able to tell you why, since you’ve not given a complete description of what you are doing. There is some aspect of your toolchain that is creating binaries that are “newer” than what is supported by your 525.89.02 driver. (Since CUDA 12.1 is out, and so are 530.xx drivers, presumably you have something that expects that.)

1 Like