# Cannot build with CUDA Tool: Verilog to DB Subcategory: Compiler version mismatch ## Conversation ### yathAg I am trying to build Openroad with cmake .. -DGPU=true and I get the following output ``` -- GPU is enabled -- CUDA is found -- The CUDA compiler identification is NVIDIA 10.1.243 -- Detecting CUDA compiler ABI info -- Detecting CUDA compiler ABI info - done -- Check for working CUDA compiler: /usr/bin/nvcc - skipped -- Detecting CUDA compile features -- Detecting CUDA compile features - done -- Found re2: /opt/or-tools/lib/cmake/re2/re2Config.cmake (found version "9.0.0") -- Found Clp: /opt/or-tools/lib/cmake/Clp/ClpConfig.cmake (found version "1.17.7") -- Found Cbc: /opt/or-tools/lib/cmake/Cbc/CbcConfig.cmake (found version "2.10.7") -- Found Eigen3: /usr/local/share/eigen3/cmake/Eigen3Config.cmake (found version "3.4.0") -- Found SCIP: /opt/or-tools/lib/cmake/scip/scip-config.cmake (found version "8.0.1") -- GUI is enabled -- Found Boost: /usr/local/lib/cmake/Boost-1.80.0/BoostConfig.cmake (found version "1.80.0") found components: serialization -- Found OpenMP_CXX: -fopenmp (found version "4.5") -- Found OpenMP: TRUE (found version "4.5") -- Could NOT find VTune (missing: VTune_LIBRARIES VTune_INCLUDE_DIRS) -- Found Boost: /usr/local/lib/cmake/Boost-1.80.0/BoostConfig.cmake (found suitable version "1.80.0", minimum required is "1.78") -- Found Boost: /usr/local/lib/cmake/Boost-1.80.0/BoostConfig.cmake (found version "1.80.0") found components: serialization system thread -- TCL readline enabled -- Tcl Extended disabled -- Python3 enabled -- Configuring done CMake Warning (dev) in src/gpl/CMakeLists.txt: Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC, empty CUDA_ARCHITECTURES not allowed. Run "cmake --help-policy CMP0104" for policy details. Use the cmake_policy command to set the policy and suppress this warning. CUDA_ARCHITECTURES is empty for target "gpl". This warning is for project developers. Use -Wno-dev to suppress it. CMake Error in src/gpl/CMakeLists.txt: Target "gpl" requires the language dialect "CUDA17" . But the current compiler "NVIDIA" does not support this, or CMake does not know the flags to enable it. -- Generating done CMake Generate step failed. Build files cannot be regenerated correctly. ``` I have Cuda installed and on `nvidia-smi` I get ``` +-----------------------------------------------------------------------------+ | NVIDIA-SMI 525.85.12 Driver Version: 525.85.12 CUDA Version: 12.0 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |===============================+======================+======================| | 0 NVIDIA GeForce ... On | 00000000:01:00.0 On | N/A | | N/A 51C P5 18W / 115W | 187MiB / 6144MiB | 19% Default | | | | N/A | +-------------------------------+----------------------+----------------------+ +-----------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=============================================================================| | 0 N/A N/A 1211 G /usr/lib/xorg/Xorg 52MiB | | 0 N/A N/A 1875 G /usr/lib/xorg/Xorg 133MiB | +-----------------------------------------------------------------------------+ ``` and on `nvcc -V` ``` nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2019 NVIDIA Corporation Built on Sun_Jul_28_19:07:16_PDT_2019 Cuda compilation tools, release 10.1, V10.1.243 ``` Any help on how to get the setup working is really appreciated and thanks in advanced. ### vvbandeira Please install a newer version of `nvcc` and try again. As per NVIDIA docs, you will require at least v11; see more [here](https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#c-17-language-features). ### maliberty If we bump to cmake 3.10 then https://cmake.org/cmake/help/latest/module/FindCUDA.html suggests we can use the usual VERSION keyword. FYI - the use of CUDA is quite minimal and probably not worth the bother at this point.