pjreddie / darknet

Convolutional Neural Networks
http://pjreddie.com/darknet/
Other
25.78k stars 21.33k forks source link

when make the Makefile,there is this error #2315

Open henbucuoshanghai opened 3 years ago

henbucuoshanghai commented 3 years ago

libdarknet.a(dropout_layer_kernels.o): In function forward_dropout_layer_gpu': tmpxft_00001801_00000000-5_dropout_layer_kernels.compute_61.cudafe1.cpp:(.text+0x1da): undefined reference tocudaPushCallConfiguration' libdarknet.a(dropout_layer_kernels.o): In function backward_dropout_layer_gpu': tmpxft_00001801_00000000-5_dropout_layer_kernels.compute_61.cudafe1.cpp:(.text+0x287): undefined reference tocudaPushCallConfiguration' libdarknet.a(maxpool_layer_kernels.o): In function `device_stubZ28forward_maxpool_layer_kerneliiiiiiiPfS_Pi(int, int, int, int, int, int, int, float, float, int)': tmpxft_00001855_00000000-5_maxpool_layer_kernels.compute_61.cudafe1.cpp:(.text+0x16a): undefined reference to __cudaPopCallConfiguration' libdarknet.a(maxpool_layer_kernels.o): In functionforward_maxpool_layer_gpu': tmpxft_00001855_00000000-5_maxpool_layer_kernels.compute_61.cudafe1.cpp:(.text+0x24c): undefined reference to __cudaPushCallConfiguration' libdarknet.a(maxpool_layer_kernels.o): In function__device_stub__Z29backward_maxpool_layer_kerneliiiiiiiPfS_Pi(int, int, int, int, int, int, int, float, float, int)': tmpxft_00001855_00000000-5_maxpool_layer_kernels.compute_61.cudafe1.cpp:(.text+0x40a): undefined reference to __cudaPopCallConfiguration' libdarknet.a(maxpool_layer_kernels.o): In functionbackward_maxpool_layer_gpu': tmpxft_00001855_00000000-5_maxpool_layer_kernels.compute_61.cudafe1.cpp:(.text+0x4f8): undefined reference to `__cudaPushCallConfiguration' collect2: error: ld returned 1 exit status Makefile:83: recipe for target 'darknet' failed make: *** [darknet] Error 1

henbucuoshanghai commented 3 years ago

ubuntu18.04,cuda10.0,nvidia418

patrickjdarrow commented 1 year ago

Facing the same make issue using Conda.

Ubuntu 18.04.6 LTS

cudatoolkit 11.3.1 cudatoolkit-dev 11.7.0
cudnn 8.2.1

Python 3.8.13

The command which leads to this error:

g++ -std=c++11 -std=c++11 -Iinclude/ -I3rdparty/stb/include -DGPU -I/usr/local/cuda/include/ -DCUDNN -DCUDNN_HALF -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -rdynamic -Ofast -DGPU -DCUDNN -I/usr/local/cudnn/include -DCUDNN_HALF obj/image_opencv.o obj/http_stream.o obj/gemm.o obj/utils.o obj/dark_cuda.o obj/convolutional_layer.o obj/list.o obj/image.o obj/activations.o obj/im2col.o obj/col2im.o obj/blas.o obj/crop_layer.o obj/dropout_layer.o obj/maxpool_layer.o obj/softmax_layer.o obj/data.o obj/matrix.o obj/network.o obj/connected_layer.o obj/cost_layer.o obj/parser.o obj/option_list.o obj/darknet.o obj/detection_layer.o obj/captcha.o obj/route_layer.o obj/writing.o obj/box.o obj/nightmare.o obj/normalization_layer.o obj/avgpool_layer.o obj/coco.o obj/dice.o obj/yolo.o obj/detector.o obj/layer.o obj/compare.o obj/classifier.o obj/local_layer.o obj/swag.o obj/shortcut_layer.o obj/representation_layer.o obj/activation_layer.o obj/rnn_layer.o obj/gru_layer.o obj/rnn.o obj/rnn_vid.o obj/crnn_layer.o obj/demo.o obj/tag.o obj/cifar.o obj/go.o obj/batchnorm_layer.o obj/art.o obj/region_layer.o obj/reorg_layer.o obj/reorg_old_layer.o obj/super.o obj/voxel.o obj/tree.o obj/yolo_layer.o obj/gaussian_yolo_layer.o obj/upsample_layer.o obj/lstm_layer.o obj/conv_lstm_layer.o obj/scale_channels_layer.o obj/sam_layer.o obj/convolutional_kernels.o obj/activation_kernels.o obj/im2col_kernels.o obj/col2im_kernels.o obj/blas_kernels.o obj/crop_layer_kernels.o obj/dropout_layer_kernels.o obj/maxpool_layer_kernels.o obj/network_kernels.o obj/avgpool_layer_kernels.o -o darknet -lm -pthread -L/usr/local/cuda/lib64 -lcuda -lcudart -lcublas -lcurand -L/usr/local/cudnn/lib64 -lcudnn -lstdc++

Makefile:

GPU=1 CUDNN=1 CUDNN_HALF=1 OPENCV=0 . . .

Output from nvcc -V

nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2022 NVIDIA Corporation Built on Tue_May__3_18:49:52_PDT_2022 Cuda compilation tools, release 11.7, V11.7.64 Build cuda_11.7.r11.7/compiler.31294372_0

GPU:

TITAN X (Pascal) (12GB)

Interestingly, this exact Conda environment works flawlessly on another machine where the only noticeable differences are:

Ubuntu 20.04.5 LTS Tesla T4 (16GB)