philipperemy / yolo-9000

YOLO9000: Better, Faster, Stronger - Real-Time Object Detection. 9000 classes!
Apache License 2.0
1.18k stars 309 forks source link

What version of cuda does this work on? #48

Closed ghost closed 3 years ago

ghost commented 3 years ago

I get the following error with cuda 11.2:

gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/convolutional_layer.c -o obj/convolutional_layer.o
./src/convolutional_layer.c: In function ‘cudnn_convolutional_setup’:
./src/convolutional_layer.c:148:5: warning: implicit declaration of function ‘cudnnGetConvolutionForwardAlgorithm’; did you mean ‘cudnnGetConvolutionForwardAlgorithm_v7’? [-Wimplicit-function-declaration]
     cudnnGetConvolutionForwardAlgorithm(cudnn_handle(),
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     cudnnGetConvolutionForwardAlgorithm_v7
./src/convolutional_layer.c:153:13: error: ‘CUDNN_CONVOLUTION_FWD_SPECIFY_WORKSPACE_LIMIT’ undeclared (first use in this function); did you mean ‘CUDNN_CONVOLUTION_FWD_ALGO_DIRECT’?
             CUDNN_CONVOLUTION_FWD_SPECIFY_WORKSPACE_LIMIT,
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
             CUDNN_CONVOLUTION_FWD_ALGO_DIRECT
compilation terminated due to -Wfatal-errors.
make: *** [Makefile:89: obj/convolutional_layer.o] Error 1
philipperemy commented 3 years ago

Try to open an issue there:

ghost commented 3 years ago

@philipperemy what version of cuda did you use for this?

ghost commented 3 years ago

I solved the problem by making the following changes to the Makefile in the darknet folder:

NVCC=/usr/local/cuda-10.0/bin/nvcc COMMON+= -DGPU -I/usr/local/cuda-10.0/include/ LDFLAGS+= -L/usr/local/cuda-10.0/lib64 -lcuda -lcudart -lcublas -lcurand

philipperemy commented 3 years ago

@iAmJuan550 happy to hear that. I was running on multiple versions: CUDA 9.0, 9.1, 10 and 10.1.