Darknet on OpenCL on Windows 11 x64

Hi, there are many challenges on Windows 11 x64 with AMD Radeon RX 6900 XT. For the last few months, from time to time, I started to try to build on Windows 10 x64 first and later I updated to Windows 11 x64. There are the following open issues I faced:

1) Time spent on detection is a bit longer than on GNU/Linux or macOS.
2) Detections seem fine when I try to use OpenCL, for example, on YOLOv4.

3) I do not know how to properly build clBLAS. I improved on Windows 11 x64, trying but failed on this one.

There are many more that I am unsure about or have not yet found out. Now, you are probably wondering what the build procedure is? See below step by step essentials guide. You may copy and use it. Happy C hacking! ;-).

Build on Windows 10 or 11 x64
Make all the artifacts by yourself and figure out more!!

First got from the Internet:
01) Clone recursive by command: git clone --recursive https://github.com/sowson/darknet

02) Install MSVC++ from: https://aka.ms/vs/16/release/vc_redist.x64.exe

03) Install Windows 10 or 11 SDK from: https://developer.microsoft.com/en-us/windows/downloads/sdk-archive

04) Install Visual Studio 2019 with C/C++ support (optional but useful)

If you want to rebuild things from 3rdparty folder on your own:

06) Clone / Download and Build from: https://github.com/BrianGladman/pthreads

07) Clone / Download and Build from: https://github.com/robinrowe/libunistd

08) Clone / Download and Use from: https://github.com/nothings/stb

This is an open issue. I do not know how to build this one:

09) Clone / Download and Build clBLAS from: https://github.com/sowson/clBLAS

Needed by some build scripts as an interpreter for scripts:

10) Install Python from: https://www.python.org/downloads/windows

11) Install CMake for Windows from: https://cmake.org/download

12) Edit the 3rdparty/amdocl.reg to ensure it has correct paths and add it to the registry! 

The build process on Windows 10 can be done in CLion or Visual Studio 2019

Please do not blame me... it is still experimental on Windows 10 x64 ;-)

To build an example in the darknet directory in the Git Command Line:

mkdir build
cd build
cmake -S ../ -B ./
cmake --build ./ --config Release --target darknet
cp Release/darknet.exe ../darknet.exe
cp ../3rdparty/clBLAS/clBLAS.dll ..
cp ../3rdparty/pthreads/pthreads.dll ..
cd ..

Than try:
./darknet.exe # ;-).

p ;-).

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.