prabindh / darknet

Convolutional Neural Networks
http://pjreddie.com/darknet/
Other
122 stars 46 forks source link

Error compiling cuda 8.0 #45

Closed Bardo91 closed 7 years ago

Bardo91 commented 7 years ago

I am getting the following error while compiling with cuda 8.0 and CUDNN 7.0. How can I fix it?

./src/convolutional_layer.c:133:5: error: too few arguments to function ‘cudnnSetConvolution2dDescriptor’
     cudnnSetConvolution2dDescriptor(l->convDesc, l->pad, l->pad, l->stride, l->stride, 1, 1, CUDNN_CROSS_CORRELATION);
prabindh commented 7 years ago

A change like in this would fix it.

Note - LSTM and latest changes in mainline, are not in main branch, but in the branch "merge_lstm_gru_jun17".

DanLiu0623 commented 7 years ago

@prabindh I am sorry, It occurs an error when I open the link, so could you tell me how to fix the problem directly?

prabindh commented 7 years ago

I am able to access the gist, but here it is below: https://gist.github.com/prabindh/6e63fd67816fe63991595d25b931ab04

in convolutional_layer.c

if CUDNN_MAJOR >= 6

cudnnSetConvolution2dDescriptor(l->convDesc, l->pad, l->pad, l->stride, l->stride, 1, 1, CUDNN_CROSS_CORRELATION, CUDNN_DATA_FLOAT);

else

cudnnSetConvolution2dDescriptor(l->convDesc, l->pad, l->pad, l->stride, l->stride, 1, 1, CUDNN_CROSS_CORRELATION);

endif

ThomasLengeling commented 7 years ago

great this works, thank you