1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 00:03:03 +04:00

Merge pull request #14660 from YashasSamaga:dnn-cuda-build

add cuDNN dependency and setup build for cuda4dnn (#14660)

* update cmake for cuda4dnn

- Adds FindCUDNN
- Adds new options:
   * WITH_CUDA
   * OPENCV_DNN_CUDA
- Adds CUDA4DNN preprocessor symbol for the DNN module

* FIX: append EXCLUDE_CUDA instead of overwrite

* remove cuDNN dependency for user apps

* fix unused variable warning
This commit is contained in:
Yashas Samaga B L
2019-06-02 11:47:15 +00:00
committed by Alexander Alekhin
parent 3ccb1d67c2
commit ae279966c2
13 changed files with 228 additions and 11 deletions
+13 -1
View File
@@ -53,10 +53,22 @@
#else
#undef HAVE_OPENCL
#endif
#ifndef CV_CUDA4DNN
#define CV_CUDA4DNN 0
#endif
#if CV_CUDA4DNN
#ifndef HAVE_CUDA
#error "Configuration error: re-run CMake from clean build directory"
#endif
#else
#undef HAVE_CUDA
#endif
#include <opencv2/core/ocl.hpp>
#include <opencv2/core/opencl/ocl_defs.hpp>
#include <opencv2/core/utils/trace.hpp>
#include <opencv2/dnn.hpp>
#include <opencv2/dnn/all_layers.hpp>