Im use CMake to generate visual studio 2013 solution. Next im try to build it, but get follow error:
Building NVCC (Device) object modules/core/CMakeFiles/cuda_compile.dir/src/cuda/Debug/cuda_compile_generated_gpu_mat.cu.obj
nvcc fatal : Unsupported gpu architecture 'compute_11'
Im try version 2.10 and 3.0 with cuda 6.5 and 7.0. CUDA_ARCH_BIN set to : 1.1 1.2 1.3 2.0 2.1(2.0) 3.0 3.5
OpenCV GPU module is written using CUDA, therefore it benefits from the CUDA ecosystem. There is a large community, conferences, publications, many tools and libraries developed such as NVIDIA NPP, CUFFT, Thrust. The GPU module is designed as host API extension.
If OpenCV is compiled with CUDA capability, it will return non-zero for getCudaEnabledDeviceCount function (make sure you have CUDA installed). Another very simple way is to try using a GPU function in OpenCV and use try-catch. If an exception is thrown, you haven't compiled it with CUDA.
Starting from OpenCV version 4.2, the DNN module supports NVIDIA GPU usage, which means acceleration of CUDA and cuDNN when running deep learning networks on it.
I tried compiling OpenCV from source with added CUDA support with CMake, and while I'm building it, it says "CUDA: YES" but after it's done if I test it, it doesn't have CUDA support. Also it doesn't build python cv2.pyd file even if I set python paths and enabled python build. Hi, are you building with windows or linux, OpenCV version 3.4 or 4?
OpenCV with CUDA for Tegra This document is a basic guide to building the OpenCV libraries with CUDA support for use in the Tegra environment. It covers the basic elements of building the version 3.1.0 libraries from source code for three (3) different types of platforms:
Opencv with GPU access will improve the performance multiple times depending on the GPU’s capability. For this to work we have to compile the source code of Opencv with Nvidia GPU, CUDA, and cuDNN by using tools like CMake and Visual Studio which uses c++’s GCC compiler.
Steps. 1 1. Download and install Visual Studio 19. 2 2. Download and install CMake (my version 3.18.3) 3 3. Install CUDA and cuDNN according to your GPU. 4 4. Uninstall Anaconda and install python for all user. 5 5. Download and extract Opencv-4.4 from Github. More items
Another option. Ubuntu 14.04, GTX Titan X, opencv-2.4.10
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_TIFF=ON -D BUILD_EXAMPLES=ON -D CUDA_GENERATION=Auto -D BUILD_NEW_PYTHON_SUPPORT=ON ..
I also applied the patch,
but I'm not sure whether it ended up being needed. I had tried with and withoutCUDA_GENERATION=Maxwell
but Maxwell isn't detected. I did not try CUDA_GENERATION=Auto
prior to the patch, that's why I don't know for sure.
When using cmake to do configurations, set the option CUDA_GENERATION to specific your GPU architecture. I ran across the same error and tried this to work out the problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With