ModalAI Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Opencl cannot find devices

    VOXL 2
    2
    5
    388
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      DanielHviid
      last edited by

      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?

      1 Reply Last reply Reply Quote 0
      • Chad SweetC
        Chad Sweet ModalAI Team
        last edited by

        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

        1 Reply Last reply Reply Quote 0
        • D
          DanielHviid
          last edited by

          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?

          1 Reply Last reply Reply Quote 0
          • Chad SweetC
            Chad Sweet ModalAI Team
            last edited by

            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)

            1 Reply Last reply Reply Quote 0
            • D
              DanielHviid
              last edited by

              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.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Powered by NodeBB | Contributors