• Yashas Samaga B L's avatar
    Merge pull request #14660 from YashasSamaga:dnn-cuda-build · ae279966
    Yashas Samaga B L authored
    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
    ae279966
test.cu 523 Bytes
// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.

// this file is a stub and will be removed once actual code is added

#include "../precomp.hpp"

#include <cuda_runtime.h>

#ifndef HAVE_CUDA
#   error "CUDA files should not be compiled if CUDA was not enabled"
#endif

__global__ void cuda4dnn_build_test_kernel(float* addr) {
    int idx = threadIdx.x;
    addr[idx] = 0.0;
}