Git Product home page Git Product logo

Comments (7)

Bardo91 avatar Bardo91 commented on September 14, 2024 1

That is what I understood from the documentation, The custom OpenCL library that is installed by default in the beaglebone OS should handle the GPU resources automatically. In the official documentation (https://github.com/beagleboard/beaglebone-ai/wiki/System-Reference-Manual), it says that all the devices are supported and handle through OpenCL interface. The quickest thing you can do is to give a try and compile it. You should be able to see easily if it is using OpenCL if it compiles and runs at a high speed.

If you want to debug it a bit, another quick&easy thing to check is if the system is able to detect "cl" compatible "gpu" devices in this line

cl_set_device(gpu_index);
. If gpu_index is not -1, then it means that it is handling the devices underneath.

Unfortunatelly, I don't have experiende with EVEs, nor beaglebones in general, but with myriads by intel. And in that case, OpenCL and OpenVINO does it automatically.

I hope it helps.

from darknet-on-opencl.

Bardo91 avatar Bardo91 commented on September 14, 2024

Oh... I am sorry. I followed the code in test_detector and missed the initialization of the gpu device...

Just adding cl_set_device(0); fixed the problem.

from darknet-on-opencl.

pra-dan avatar pra-dan commented on September 14, 2024

@Bardo91 Hi, could you help me use this port by sharing your knowledge and experience ?
I am new to OpenCL and would like to use it with ARM devices without GPUs... Can you give me some info which may have worked for you ?

from darknet-on-opencl.

Bardo91 avatar Bardo91 commented on September 14, 2024

Hi @PrashantDandriyal , if it does not have GPU, then you cannot use OpenCL. The ARM needs to have any kind of embedded GPU at least (well, it is possible just with CPU but then... use the original darknet repo, because it will be the same and will be more updated). If that is your case, just compile it using the cmake flag "-DBUILDLIB=ON" and the shared_lib will be produced, so you can reuse it in other projects. What is do you need exactly?

from darknet-on-opencl.

pra-dan avatar pra-dan commented on September 14, 2024

@Bardo91 Let me explain:

Actually I need to run the models on either the Beaglebone AI or the Beaglebone x15. Both the boards are almost with same resources. The issue is that they lack any good GPU as the on board sgx is not very powerful. Instead, they have 2 DSPs and 4 EVEs both are co processors running at 700MHz and 1.2 GHz respectively. So, I am compelled yo use them for good performance.

By good performance I mean the FPS of 30 or more on frames of 320x240 (can vary a bit).

Using these co-processors as alternative to the GPGPUs, requires either using the API developed by Texas Instruments (called TIDL), or manually configuring them using OPENCL. But TIDL is poorly tested and somewhat unreliable and I am new to OpenCL and NNPACK. Although I am ready to learn them once I have a plan !
I hope I made sense. what you think.

from darknet-on-opencl.

Bardo91 avatar Bardo91 commented on September 14, 2024

It looks reasonable. It seems that BeagleBone AI has OpenCL preinstalled (https://beagleboard.org/ai), so the CMakeLists, should find automatically OpenCL and compile the project using the embedded GPU. Have you tried just compiling the project as cloned? GPU is enable by default, so it will generate the "darknet" executable for you automatically. If it does, try downloading some weights wget https://pjreddie.com/media/files/yolov3.weights and run the software ./darknet detect cfg/yolov3.cfg yolov3.weights data/dog.jpg .It will generate an image with the result. If it works as you expect, then what you need is to embed the software in your application.

from darknet-on-opencl.

pra-dan avatar pra-dan commented on September 14, 2024

But this means, the GPU leveraging will be done automatically by the OpenCL backend. Right ?
Also, what about the devices with no GPUs. Although the other co-processors (the DSPs + EVEs) also use the OpenCL backend, but piplining the workload uses the dedicated API : TIDL for it.
I feel that this port can't help me much in this case :(

from darknet-on-opencl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.