New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
not support lastest cuda 9.0 and cudnn7 #278
Comments
Well...you complained about it too in Caffe area... |
I ran into the same problem. I had a successful, new network running using darknet with gnu support using cuda 8.0 and cudnn 6, but moving this same network and code to a cuda 9.0 / cudnn 7 environment did not work. The problem seems to be related to more forward and backward convolutional methods being added in cuda 9.0 / cudnn 7, some of which return workspace size of '0'. To account for these cases, checking for zero size workspace and processing the CPU fixed the problem for me. The changes I made where in convolutional_kernels.cu and where as follows: in forward_convolutional_layer_gpu function:
Also in function backward_convolutional_layer_gpu
New code
I hope this helps and please let me know if there are any other insights into this issue or other cuda 9 / cudnn 7 conversion issues |
This problem is probably due to multiple versions of CUDA installed on your computer, especially if you use autoupdates for CUDA (which you shouldn't). But I would recommend to remove the old cuda version and do a clean install with the new cuda. Please also remember to update cudnn, because it depends on the CUDA version, so you have to be carefull which version you select... |
@encore2020 |
You are welcome to write your own code base and spend years to do so. Don't
be stupid.
…On Thu, Mar 8, 2018 at 3:54 PM, waschbaer00 ***@***.***> wrote:
I just want to say f***....Just install CUDA 9.1, cuDNN 7.1, OpenCV3.4.1,
and it seems like none of them compatible to darknet. Why not wirte clear
what are the compatible version for darknet, I waste two days.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#278 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAA9cz_yjCzoZkEsKhoo2kCQKIG9thngks5tcX5ogaJpZM4QM_V9>
.
--
Regards,
*Luiz Vitor Martinez Cardoso*
"The only limits are the ones you place upon yourself"
|
YOu are right.. controlling my anger.. |
LOL, I don't think it's possible to find a deep learning framework with fewer dependencies. This one has exactly 1 required dependency. I think the "mapping of buffer object" error is due to running out of GPU memory. Try increasing your subdivisions up to the same value as "batch". If that works, then decrease by powers of 2 to find the lowest value for which it will not crash. To clarify, the subdivisions is a setting in the cfg file. |
@waschbaer00 There is bug in C API in the OpenCV 3.4.1: opencv/opencv#10963 |
Dear @TanFluent when I make it, the following error has occurred: I compiled it many times, every time I have the same error, I really don't know how to modify it. |
The following fix worked for me. ifeq ($(CUDNN), 1) |
installed cuda9.0 and cudnn7(cuda 9.0)
if I select cudnn =1, that will be compile error:
/examples/go.c:641:13: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%s", type);
^
gcc -Iinclude/ -Isrc/ -DOPENCV
pkg-config --cflags opencv
-DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -c ./examples/rnn.c -o obj/rnn.o./examples/rnn.c: In function ‘get_seq2seq_data’:
./examples/rnn.c:104:13: warning: unused variable ‘dlen’ [-Wunused-variable]
int dlen = strlen(dest[index]);
^
./examples/rnn.c:103:13: warning: unused variable ‘slen’ [-Wunused-variable]
int slen = strlen(source[index]);
^
gcc -Iinclude/ -Isrc/ -DOPENCV
pkg-config --cflags opencv
-DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -c ./examples/segmenter.c -o obj/segmenter.ogcc -Iinclude/ -Isrc/ -DOPENCV
pkg-config --cflags opencv
-DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -c ./examples/regressor.c -o obj/regressor.ogcc -Iinclude/ -Isrc/ -DOPENCV
pkg-config --cflags opencv
-DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -c ./examples/classifier.c -o obj/classifier.ogcc -Iinclude/ -Isrc/ -DOPENCV
pkg-config --cflags opencv
-DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -c ./examples/coco.c -o obj/coco.ogcc -Iinclude/ -Isrc/ -DOPENCV
pkg-config --cflags opencv
-DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -c ./examples/yolo.c -o obj/yolo.ogcc -Iinclude/ -Isrc/ -DOPENCV
pkg-config --cflags opencv
-DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -c ./examples/detector.c -o obj/detector.ogcc -Iinclude/ -Isrc/ -DOPENCV
pkg-config --cflags opencv
-DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -c ./examples/nightmare.c -o obj/nightmare.ogcc -Iinclude/ -Isrc/ -DOPENCV
pkg-config --cflags opencv
-DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -c ./examples/attention.c -o obj/attention.ogcc -Iinclude/ -Isrc/ -DOPENCV
pkg-config --cflags opencv
-DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -c ./examples/darknet.c -o obj/darknet.ogcc -Iinclude/ -Isrc/ -DOPENCV
pkg-config --cflags opencv
-DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DOPENCV -DGPU -DCUDNN obj/captcha.o obj/lsd.o obj/super.o obj/art.o obj/tag.o obj/cifar.o obj/go.o obj/rnn.o obj/segmenter.o obj/regressor.o obj/classifier.o obj/coco.o obj/yolo.o obj/detector.o obj/nightmare.o obj/attention.o obj/darknet.o libdarknet.a -o darknet -lm -pthreadpkg-config --libs opencv
-L/usr/local/cuda/lib64 -lcuda -lcudart -lcublas -lcurand -lcudnn -lstdc++ libdarknet.alibdarknet.a(convolutional_layer.o): In function
cudnn_convolutional_setup': convolutional_layer.c:(.text+0xcbc): undefined reference to
cudnnSetConvolutionGroupCount'collect2: error: ld returned 1 exit status
Makefile:76: recipe for target 'darknet' failed
make: *** [darknet] Error 1
ubuntu@ubuntu-Z270N-WIFI:~/darknet$
------------- my opencv is lastest version 3.3
if I select cudnn=0, gpu = 1, compile is ok,
after run the command,
sudo ./darknet detector train cfg/voc.data cfg/tiny-yolo.cfg darknet.conv.weights
tiny-yolo
layer filters size input output
0 conv 16 3 x 3 / 1 416 x 416 x 3 -> 416 x 416 x 16
1 max 2 x 2 / 2 416 x 416 x 16 -> 208 x 208 x 16
2 conv 32 3 x 3 / 1 208 x 208 x 16 -> 208 x 208 x 32
3 max 2 x 2 / 2 208 x 208 x 32 -> 104 x 104 x 32
4 conv 64 3 x 3 / 1 104 x 104 x 32 -> 104 x 104 x 64
5 max 2 x 2 / 2 104 x 104 x 64 -> 52 x 52 x 64
6 conv 128 3 x 3 / 1 52 x 52 x 64 -> 52 x 52 x 128
7 max 2 x 2 / 2 52 x 52 x 128 -> 26 x 26 x 128
8 conv 256 3 x 3 / 1 26 x 26 x 128 -> 26 x 26 x 256
9 max 2 x 2 / 2 26 x 26 x 256 -> 13 x 13 x 256
10 conv 512 3 x 3 / 1 13 x 13 x 256 -> 13 x 13 x 512
11 max 2 x 2 / 1 13 x 13 x 512 -> 13 x 13 x 512
12 conv 1024 3 x 3 / 1 13 x 13 x 512 -> 13 x 13 x1024
13 conv 512 3 x 3 / 1 13 x 13 x1024 -> 13 x 13 x 512
14 conv 425 1 x 1 / 1 13 x 13 x 512 -> 13 x 13 x 425
15 detection
mask_scale: Using default '1.000000'
Loading weights from darknet.conv.weights...Done!
Learning Rate: 0.001, Momentum: 0.9, Decay: 0.0005
Resizing
384
Loaded: 0.017535 seconds
Region Avg IOU: 0.073414, Class: 0.005123, Obj: 0.433099, No Obj: 0.503481, Avg Recall: 0.000000, count: 3
CUDA Error: mapping of buffer object failed
darknet: ./src/cuda.c:36: check_error: Assertion `0' failed.
Aborted (core dumped)
if I select, gpu =0, only run cpu,
compile and running is both ok
The text was updated successfully, but these errors were encountered: