Opencl cannot find devices
-
I'm trying to use transparent API on opencv to to enable hardware acceleration, but there is no GPU utilization. Both from opencv and from clinfo, it informs me that there are no devices available.
Am I missing a driver, or is this not available yet? -
Hi Daniel, OpenCL should definitely be there. voxl-tflite-server uses GPU acceleration with TensorFlow Lite. We will have to look into an example to enable this. I did double check that /usr/lib/libOpenCL.so is present, so you should be able to make progress.
Here is a simple test to check for OpenCL. I don't have a VOXL 2 nearby but this might help with the basics
-
Hi Chad, I have confirmed that OpenCL is present and that the code compiles on emulator and natively, and runs on our voxl2.
The voxl-cross docker image does not contain /usr/lib/libOpenCL.so, and our opencv application, which is based on voxl-cross-template. We have tried to build it in the emulator, or on target, but we are unable to apt install dependencies like voxl-opencv in the emulator, and natively their .so files are reported as the wrong file format by cmake.
Are there plans to include OpenCL in the voxl-cross image, or would it be better for us to rebuild the application/libraries to work with the emulator?
-
That's good feedback. We will add including the OpenCL libs to voxl-cross to our TO DO list.
In the meantime, can you just copy the opencl libs into your voxl-cross workspace? (which is what we would do for the next rev of voxl-cross)
-
I tried adding the .so file to the hellocl example, and got the following error:
/usr/lib/gcc-cross/aarch64-linux-gnu/7/../../../../aarch64-linux-gnu/bin/ld: warning: libcutils.so.0, needed by /usr/lib/../lib/libOpenCL.so, not found (try using -rpath or -rpath-link) /usr/lib/../lib/libOpenCL.so: undefined reference to `property_get'and when adding it to our OpenCV application, OpenCV still cannot find any OpenCL devices. I suspect OpenCV needs to be recompiled with the .so file in the docker image.
This issue is not immediately pressing, so if you intend to update the voxl-cross image I can wait for that instead of trying to create a fix.
Reading along? Create a free ModalAI Forum account to join in.
With an account you can reply, ask your own question, get an email when a ModalAI engineer answers, and mark the reply that solved it. Your place in each thread is saved between visits.
Questions about VOXL, Flight Core, ESCs and ModalAI drones are answered here by the engineers who build them.
Register Login