AMB82-mini Darknet cmake failed

Purpose: To train a pothole detection model for AMB82-mini
Example: yolov4-pothole-detection using (Darknet)
Error: cmake failure

[ 94%] Building CUDA object CMakeFiles/darknet.dir/src/dropout_layer_kernels.cu.o
[ 94%] Building CUDA object CMakeFiles/darknet.dir/src/im2col_kernels.cu.o
[ 95%] Building CUDA object CMakeFiles/darknet.dir/src/maxpool_layer_kernels.cu.o
[ 96%] Building CUDA object CMakeFiles/darknet.dir/src/network_kernels.cu.o
[ 97%] Linking CUDA device code CMakeFiles/dark.dir/cmake_device_link.o
[ 98%] Linking CXX shared library libdarknet.so
/usr/bin/ld: cannot find -lcuda: No such file or directory
collect2: error: ld returned 1 exit status
gmake[2]: *** [CMakeFiles/dark.dir/build.make:1684: libdarknet.so] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:89: CMakeFiles/dark.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs…
[ 98%] Linking CXX executable darknet
/usr/bin/ld: cannot find -lcuda: No such file or directory
collect2: error: ld returned 1 exit status
gmake[2]: *** [CMakeFiles/darknet.dir/build.make:1446: darknet] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:141: CMakeFiles/darknet.dir/all] Error 2
gmake: *** [Makefile:156: all] Error 2

Hi @rkuo2000,

Can I double confirm on your computer specifications, as well as your set up environment?

Eg. OS, what version of dependencies have you installed etc, hardware specifications (as detailed as possible to help to replicate this issue)

Since this error is about CUDA, could you let me know which version of CUDA are you using?

Have you done the post installation steps for CUDA as well?

Thank you.

It’s a Kaggle machine with T4x2 GPU,
OS is Ubuntu 22.04.3 LTS,
CUDA is shown 11.4 by nvidia-smi
but /usr/local/cuda link to /usr/local/cuda-11.8

$echo $LD_LIBRARY_PATH
/usr/local/cuda/lib64:/usr/local/cuda/lib:/usr/local/lib/x86_64-linux-gnu:/usr/local/nvidia/lib:/usr/local/nvidia/lib64:/usr/local/nvidia/lib:/usr/local/nvidia/lib64:/opt/conda/lib

I have updated the error message above,
it seems beging able to find CUDA for compilation up,
but fail after 98% done ?!

I did try to add link /usr/lib/cuda, but it didnt work.

You can easily to replicate this problem by login to Kaggle.com
and click yolov4-pothole-detection to Copy & Edit the project, then Run-All.

Hi @rkuo2000,

I am not able to access the page which i click that link yolov4-pothole-detection.

Thanks!

I forgot to set to Sharing to Public,
please try again.

Kelvin Huang via Realtek Ameba IOT Developers Forum (AMB82 RTL8722 RTL8195 RTL8710 RTL8720 BW16 Development board) - IOT / MCU Solutions 瑞昱開發者論壇 開發板 开發者论坛 开發板 <notifications@ameba.discoursemail.com> 於 2023年12月21日 週四 下午4:40寫道:

Hi @rkuo2000,

I have found somebody who has built yolov4 darknet on kaggle using the make method.

Build_darknet_yolo4 | Kaggle.

He has additionally imported the libcuda library and modified some makefile parameters to build it successfully.

Can you give this a try? I ran his notebook and found that there is no error. Can you adapt his to your notebook?

Thank you.

I finish Darknet make in my local machine (lots of setup)
and successfully bring pothole detection up and running on AMB82-mini
but it is 86% code size due to 16bit, do you know where to set to INT8 for training ?