I have just installed Cuda 9.2 (apparently without problems), and then CUDA, and the MNIST test fails at compile time, as below - looks like an include file issue, but I don’t know where to begin…
igor@igor-Aurora-R4:~/cudnn_samples_v7/mnistCUDNN$ make clean && make
rm -rf *o
rm -rf mnistCUDNN
/usr/local/cuda/bin/nvcc -ccbin g++ -I/usr/local/cuda/include -IFreeImage/include -m64 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_53,code=sm_53 -gencode arch=compute_53,code=compute_53 -o fp16_dev.o -c fp16_dev.cu
g++ -I/usr/local/cuda/include -IFreeImage/include -o fp16_emu.o -c fp16_emu.cpp
g++ -I/usr/local/cuda/include -IFreeImage/include -o mnistCUDNN.o -c mnistCUDNN.cpp
In file included from /usr/local/cuda/include/channel_descriptor.h:62:0,
from /usr/local/cuda/include/cuda_runtime.h:90,
from /usr/include/cudnn.h:64,
from mnistCUDNN.cpp:30:
/usr/local/cuda/include/cuda_runtime_api.h:1699:101: error: use of enum ‘cudaDeviceP2PAttr’ without previous declaration
__ cudaError_t CUDARTAPI cudaDeviceGetP2PAttribute(int *value, enum cudaDeviceP
^
/usr/local/cuda/include/cuda_runtime_api.h:2947:102: error: use of enum ‘cudaFuncAttribute’ without previous declaration
_ cudaError_t CUDARTAPI cudaFuncSetAttribute(const void *func, enum cudaFuncAtt
^
In file included from /usr/local/cuda/include/channel_descriptor.h:62:0,
from /usr/local/cuda/include/cuda_runtime.h:90,
from /usr/include/cudnn.h:64,
from mnistCUDNN.cpp:30:
/usr/local/cuda/include/cuda_runtime_api.h:5816:92: error: use of enum ‘cudaMemoryAdvise’ without previous declaration
or_t CUDARTAPI cudaMemAdvise(const void *devPtr, size_t count, enum cudaMemoryA
^
/usr/local/cuda/include/cuda_runtime_api.h:5873:98: error: use of enum ‘cudaMemRangeAttribute’ without previous declaration
UDARTAPI cudaMemRangeGetAttribute(void *data, size_t dataSize, enum cudaMemRang
^
/usr/local/cuda/include/cuda_runtime_api.h:5910:102: error: use of enum ‘cudaMemRangeAttribute’ without previous declaration
TAPI cudaMemRangeGetAttributes(void **data, size_t *dataSizes, enum cudaMemRang
^
Makefile:200: recipe for target ‘mnistCUDNN.o’ failed
make: *** [mnistCUDNN.o] Error 1