BeagleBone AI YOLOv4 Darknet OpenCL Running issue

Hello everyone, I’m a student from Russia and have a project connected with traffic sign recognition with embedded systems. I use BeagleBone AI based on Sitara AM5729 CPU.

I built Darknet framework with OpenCL support according to the following guide : https://iblog.isowa.io/2020/04/29/darknet-in-opencl-on-beagleboard-ai/ . Then I tried to run it with my own custom dataset from the CCL with ./darknet detector test… and it does not work and shows the following issue respond:

  1. TIOCL WARNING: Opening Linux shared memory: No such file or Directory.
  2. TIOCL FATAL: The TI Multicore Tools daemon (/usr/bin/ti-mctd) is not running. To start daemon, rm /dev/shm/HeapManager (if exists); ti-mctd. Re-run application. Refer User Guide for details. Aborted

I do not understand how to fix this problem, really need help to solve it. Tried to find information in the Internet, however failed. I have Debian 10 custom, Linux kernel 4.14.108-ti-r135 armv7l . Use SD card to have more memory and used gparted to expand memory.

No any suggestions at all?

Suppose that no one ever in this world ever faced the same issue…how that can be that no one can answer or help me, not on beaglebone forum, not on texas instruments forum, not on stack overflow lol

Grab the any of the tidl images and try to replicate the guide…

https://rcn-ee.net/rootfs/bb.org/testing/2021-05-28/

Shared memory: this requires: ti-cmem
ti-mctd: this another TI userspace tool that needs to be running…

Regards,

1 Like

Do you know if it is important to install OS on SD card or on eMMC, because I recently moved OS from SD card to eMMC and issue still exists, right now I have this : https://rcn-ee.net/rootfs/bb.org/testing/2020-06-01/buster-lxqt-tidl/am57xx-debian-10.4-lxqt-tidl-armhf-2020-06-01-6gb.img.xz
Thank you for your answer, I will try one of these OS

It shouldn’t matter, microSD vs eMMC…

1 Like

Ok, thank you. I visited Dispatch from multiple Linux processes — TI OpenCL User's Guide and found out that I do not have ti-mct-daemon.service which should be /lib/systemd/system/ti-mct-daemon.service . Does it mean that OpenCL just doesn’t work and I should create such a file? Then what should be inside it. Also I do not understand how to kill ti-mctd process and then restart it because when I write ./ti-mctd systems responds that file does not exist.

Add the ti-ipc-dra7xx package from the beagleboard apt repo…

Regards,

1 Like

Tried to add with sudo apt-get install ti-ipc-dra7xx . Computer told that there is already the newest version (3.50.04.08-git20191028.0-0rcnee0~buster+20200324. ti-c6000-cgt-v8.3

Considering i pushed those change back in March of last year:

What image are you even starting with?

TI’s OpenCl/TIDL/DSP is a combination of 12 userspace and firmware tools…

Regards,

1 Like

Now I have an image that I’ve downloaded from link, I use [am57xx-eMMC-flasher-debian-10.9-lxqt-tidl-armhf-2021-05-28-6gb.img.xz] . Actually, I downloaded it today and installed darknet by this guide without OpenCL GitHub - stephanecharette/DarkHelp: C++ wrapper library for Darknet . And it worked, then I tried to install darknet with OpenCL support by this guide https://iblog.isowa.io/2020/04/29/darknet-in-opencl-on-beagleboard-ai/ and I faced with the same issue

  1. TIOCL WARNING: Opening Linux shared memory: No such file or Directory.
  2. TIOCL FATAL: The TI Multicore Tools daemon (/usr/bin/ti-mctd) is not running. To start daemon, rm /dev/shm/HeapManager (if exists); ti-mctd. Re-run application. Refer User Guide for details. Aborted

I suppose that the key is that beaglebone ai has everything necessary for OpenCL support because after I install extra packages:
1)apt install ocl-icd-opencl-dev
2)apt install opencl-headers
3)apt install libclblas-dev

Some files are deleted automatically and one of them is ti-mct-daemon.service what may actually cause the issue that I initially faced with. Tomorrow I’m going to check whether darknet will work if I try to install it by whis guide from isowa, however without extra packages that I mentioned above. Hope everything is going to work)

Oh, don’t install those, use the ti-opencl meta package:

Yocto vs Debian makes things fun… While TI can blow away OpenCL/Mesa in Yocto, in Debian we have to share the OpenCL library… To make this work, we renamed, TI’s libOpenCl as libTIOpenCL and used the vendor ti.icd flag so mesa/OpenCL would correctly load libTIOpenCL when calling libOpenCL:

So by installing ti-opencl, all the normal development libraries should be included:

Package: ti-opencl
Depends: ${shlibs:Depends},
         ${misc:Depends},
         libtiopencl1 (= ${binary:Version}),
         mesa-common-dev,
         ti-c6000-cgt-v8.3

If we are missing any please, let me know, and i’ll update the meta-package.

Regards,

1 Like

We build against this: ti-opencl/control at 5c3e0f5aedcb2b4764c756f3df3cb013a967964c · rcn-ee/ti-opencl · GitHub

mesa-common-dev: should contain this: ti-opencl/control at 5c3e0f5aedcb2b4764c756f3df3cb013a967964c · rcn-ee/ti-opencl · GitHub

that should have installed… Debian -- Details of source package clblas in sid

Regards,

1 Like

Do you mean that I just need to use sudo apt install ti-opencl ?

Sure, it’s what is already installed on the tidl images…

Regards,

Actually, I made a build by isowa, however without extra packages, wrote #define CL_TARGET_OPENCL_VERSION 120 instead of 220 in src/opencl.h and changed there NVIDIA=1 to ARM=1. Build succeded, however I have a new issue : opencl_init: Could not get device IDs.

Strange thing is that I didn’t find anything similar issues connected with opencl_init:could not get device IDs on the Internet

Probably best to ping TI on their e2e forum. Just because we got some of the TI OpenCl demos to work, doesn’t mean we understand the layers. :wink:

Regards,

cannot post there because smth is wrong, however already made 2 posts on their forum.