Home > front end >  Compilation of OpenCV v4.5.1 using CMake on NVIDIA GTX 1660 Super / Windows10
Compilation of OpenCV v4.5.1 using CMake on NVIDIA GTX 1660 Super / Windows10

Time:01-19

I'm trying to use CMake to compile OpenCV v4.5.1 for my 1660 Super. I have installed CUDA Toolkit v12.0 and CUDNN v8.7.0.84 as per the instructions on NVIDIA's site. For the record, I'm following these instructions.

I'm using my own Anaconda Python3.10 interpreter and am encountering the following error when using the Configuration tool of CMake.

CMake Error at modules/dnn/CMakeLists.txt:39 (message):
  DNN: CUDA backend requires cuDNN.  Please resolve dependency or disable
  OPENCV_DNN_CUDA=OFF


Registering hook 'INIT_MODULE_SOURCES_opencv_dnn': C:/Users/testbench/ocv/opencv/modules/dnn/cmake/hooks/INIT_MODULE_SOURCES_opencv_dnn.cmake
opencv_dnn: filter out cuda4dnn source code
rgbd: CERES support is disabled. Ceres Solver is Required for Posegraph optimization
CMake Warning at cmake/OpenCVGenSetupVars.cmake:54 (message):
  CONFIGURATION IS NOT SUPPORTED: validate setupvars script in install
  directory
Call Stack (most recent call first):
  CMakeLists.txt:985 (include)

Please let me know if there is any more information that I can provide to assist in debugging.

CodePudding user response:

After some troubleshooting, this seems to be the solution:

  1. The official NVIDIA instructions asked me to copy the lib, bin and include folders of the CUDNN files into C:\Program Files\NVIDIA\CUDNN\v8.7\.
  2. I have now copied the respective lib, bin and include folders to where CUDA was installed, at C:\Program Files\NVIDIA Computing Toolkit\CUDA\v12.0.

From this, I get the following line in the CMake GUI:

Found CUDNN: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.0/lib/x64/cudnn.lib
  • Related