AlexeyAB / darknet

YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object Detection (Windows and Linux version of Darknet )
http://pjreddie.com/darknet/
Other
21.66k stars 7.96k forks source link

Compile error in Linux #7486

Open ANewAnonymous opened 3 years ago

ANewAnonymous commented 3 years ago

Video card: Tesla V100 CUDA version: 9.2

I configure makefile to:


GPU=1
CUDNN=1
CUDNN_HALF=1
OPENCV=1
AVX=1
OPENMP=1
LIBSO=1
ZED_CAMERA=0
ZED_CAMERA_v2_8=0
USE_CPP=0
DEBUG=0

ARCH= -gencode arch=compute_35,code=sm_35 \
      -gencode arch=compute_50,code=[sm_50,compute_50] \
      -gencode arch=compute_52,code=[sm_52,compute_52] \
            -gencode arch=compute_70,code=[sm_70,compute_70]

But I got the following mistakes:

./src/network_kernels.cu(364): warning: variable "l" was declared but never referenced
./src/network_kernels.cu(694): error: identifier "cudaGraphExec_t" is undefined
./src/network_kernels.cu(697): error: identifier "cudaGraph_t" is undefined
./src/network_kernels.cu(706): error: identifier "cudaStreamCaptureModeGlobal" is undefined
./src/network_kernels.cu(706): error: identifier "cudaStreamBeginCapture" is undefined
./src/network_kernels.cu(714): error: identifier "cudaStreamEndCapture" is undefined
./src/network_kernels.cu(715): error: identifier "cudaGraphInstantiate" is undefined
./src/network_kernels.cu(725): error: identifier "cudaGraphLaunch" is undefined

7 errors detected in the compilation of "/tmp/tmpxft_00003086_00000000-9_network_kernels.compute_70.cpp1.ii".
Makefile:185: recipe for target 'obj/network_kernels.o' failed
make: *** [obj/network_kernels.o] Error 1

How can I solve this problem, thank you very much for your help?

stephanecharette commented 3 years ago

CUDA graphs is a new feature that was recently added to Darknet. Is it possible that CUDA 9.2 doesn't support it?

@AlexeyAB ^

AlexeyAB commented 3 years ago

Yes, now Darknet requires CUDA 10.2 or higher. Preferably CUDA 11.2.

Or you can download 2 weeks old Dartnet, that works well with old CUDA 9.x https://github.com/AlexeyAB/darknet/archive/64efa721ede91cd8ccc18257f98eeba43b73a6af.zip

ANewAnonymous commented 3 years ago

Yes, now Darknet requires CUDA 10.2 or higher. Preferably CUDA 11.2.

Or you can download 2 weeks old Dartnet, that works well with old CUDA 9.x https://github.com/AlexeyAB/darknet/archive/64efa721ede91cd8ccc18257f98eeba43b73a6af.zip

Now I have downloaded 2 weeks old Dartnet as you said, but I encountered a new error when compiling as follows:

gcc: error trying to exec 'cc1plus': execvp: No such file or directory
Makefile:185: recipe for target 'obj/convolutional_kernels.o' failed
make: *** [obj/convolutional_kernels.o] Error 1

I checked my g++ and gcc versions. Is it because of version issues? dpkg -l | egrep "g\+\+|build-essential"

ii  build-essential        12.1ubuntu2                      amd64            Informational list of build-essential packages
ii  g++                    4:5.3.1-1ubuntu1                 amd64            GNU C++ compiler
ii  g++-5                  5.4.0-6ubuntu1~16.04.12          amd64            GNU C++ compiler
stephanecharette commented 3 years ago

I checked my g++ and gcc versions. Is it because of version issues? dpkg -l | egrep "g\+\+|build-essential"

ii  build-essential        12.1ubuntu2                      amd64            Informational list of build-essential packages
ii  g++                    4:5.3.1-1ubuntu1                 amd64            GNU C++ compiler
ii  g++-5                  5.4.0-6ubuntu1~16.04.12          amd64            GNU C++ compiler

You're now using this issue for a brand new problem.

But are you seriously attempting to use g++4? Is that v4.5? The current version is g++9. My Ubuntu has v9.3. The version you are using must be from ...2012? I don't know what kind of system you are on, but you'll most likely have to upgrade to something modern.