My Makery is below.
I do not think the initialization for cuda is working correctly given the failure is in the “create”
aurobindotripathy@Aurobindos-MBP:~/NVIDIA_cu_DNN/cudnn-sample-v2$ cat Makefile
CUDA_PATH=/usr/local/cuda
CUDNN_PATH=$(CUDA_PATH)/cudnn
CC=g++
CFLAGS=-I. -I…/cudnn-6.5-osx-v2 -I$(CUDA_PATH)/include -I$(CUDNN_PATH) -IFreeImage/include -IUtilNPP
LIBS=-lcudart -lnppi -lnppc -lcublas -lcudnn -lfreeimage-3.17.0 -lm -lstdc++
#LFLAGS=-L…/cudnn-6.5-osx-v2 -L$(CUDA_PATH)/lib -L./FreeImage/lib/linux/x86_64 $(LIBS)
LFLAGS=-L…/cudnn-6.5-osx-v2 -L$(CUDA_PATH)/lib -L./FreeImage/lib/darwin $(LIBS)
OBJ = mnistCUDNN.o
%.o: %.cpp $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)
mnistCUDNN: $(OBJ)
gcc -o $@ $^ $(LFLAGS)
clean:
rm *.o ./mnistCUDNN
aurobindotripathy@Aurobindos-MBP:~/NVIDIA_cu_DNN/cudnn-sample-v2$ ./mnistCUDNN
CUDNN failure: 1
mnistCUDNN.cpp:168
Aborting…