Issue
I build OpenCV 3.4. with Cuda 10.0 support in "/usr"local/opencv_custom" like this:
cmake -D CMAKE_BUILD_TYPE=RELEASE
-D CMAKE_INSTALL_PREFIX=/usr/local/opencv_custom
-D OPENCV_GENERATE_PKGCONFIG=ON
-D OPENCV_DNN_CUDA=ON
-D INSTALL_C_EXAMPLES=ON
-D INSTALL_PYTHON_EXAMPLES=ON
-D OPENCV_EXTRA_MODULES_PATH=/home/ohmnibot/opencv_contrib/modules
-D BUILD_EXAMPLES=ON
-D BUILD_opencv_python2=OFF
-D WITH_FFMPEG=1
-D WITH_CUDA=ON
-D WITH_OPENGL=ON
-D ENABLE_FAST_MATH=1
-D CUDA_FAST_MATH=1
-D WITH_CUBLAS=0
-D WITH_LAPACK=OFF
-D BUILD_opencv_cudacodec=OFF
-D CUDA_VERSION=10.0 ..
All is fine but when I try to include this opencv version in my CMakeList like this
set(OpenCV_DIR "/usr/local/opencv_custom")
find_package(OpenCV REQUIRED)
I get this error:
Could NOT find CUDA: Found unsuitable version "10.2", but required is exact
version "10.0" (found /usr/local/cuda-10.0)
Now I had cuda 10.2 installed but I removed every possible trace of it and only cuda 10.0 exists on my system (as far as I know). Also I just don´t get this message.... cuda 10.0 has been found but its unsuitable because its the wrong version even though... well its the right one?
I don´t know this just confuses the hell out of me... any help is deeply appreciated.
I´m working with catkin on a Ubuntu 18.04 system with a GTX 1650.
Old cuda versions have been removed with
sudo apt-get --purge remove "*cublas*" "cuda*" "nsight*"
sudo rm -rf /usr/local/cuda*
nvcc -V output:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Sat_Aug_25_21:08:01_CDT_2018
Cuda compilation tools, release 10.0, V10.0.130
nvidia-smi output:
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 450.66 Driver Version: 450.66 CUDA Version: 11.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 GeForce GTX 1650 Off | 00000000:07:00.0 On | N/A |
| 35% 29C P8 8W / 75W | 447MiB / 3908MiB | 3% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
Solution
Just in case someone every manages to run into a similar error:
- delete all the build files
- rebuild
- enjoy
Answered By - ItsMeTheBee