I am a beginner at Cuda and Cudnn programming, and in the following simple code (on my TX2 platform)
#include <iostream>
#include <cuda_runtime_api.h>
#include <cudnn.h>
int main(int argc, char** argv) {
cudaStream_t stream;
cudnnHandle_t dnn;
cudnnSetStream(dnn, stream);
// some DNN code //
return 0;
}
i am facing this linking error
undefined reference to `cudnnSetStream’
This is my CMakeLists.txt :
cmake_minimum_required(VERSION 2.6)
project(testing)
find_package(CUDA 8.0 REQUIRED)
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS}; -O3;
-gencode arch=compute_62,code=sm_62;
-x cu)
include_directories(${CUDA_INCLUDE_DIRS})
cuda_add_executable(testing code.cu)
target_link_libraries(testing ${CUDA_LIBRARIES})
Cudnn libraries are installed properly, as they are being used in Caffe framework without any problem
However in my project I am yet unable to find a resolution to this issue