This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Running openCV 3 with transparent API on Mali GPUs

OpenCV 3 RC1 has been released. It has transparent api to run on CPU or GPU.

to make openCV transparent, it uses OpenCL kernels. To run OpenCV on GPU, the GPU should have openCL 1.2 support.

My questions are:

1- Since Mali T6xxx support OpenCL 1.1, is there any documentation on how to adjust OpenCV to work with it?

2- Is there any documentation on how to optimize openCV to work better on Mali GPUs?

3- Does OpenCV works properly on T7xxx which has OpenCL 1.2 support?

4- Is there any other image processing library out there which is optimized for Mail GPUs?

Parents
  • Hi mans,

    We haven't tried this particular release but have successfully built OpenCV for Android from Itseez's "master" git branch a couple of weeks ago without requiring any modification.

    It ran successfully on T604 based devices and even though we haven't checked I don't see any reason for it not to work on any other Midgard GPU.

    To build the libraries and the native tests you just need to do:

    ANDROID_NDK=<path_to_android_ndk> ./platforms/scripts/cmake_android_arm.sh

    cd platforms/build_android_arm/

    cmake-gui .

    Tick NEON / OpenCL

    Press "configure"

    Press "generate"

    Close cmake-gui

    make -j8

    The way OpenCV is designed means there are a lot of memory copies required before any job is dispatched to the GPU which is perfectly fine for prototyping but if you're interested in performance I would recommend extracting the features you need from the library and create your own application.

    Then you can start optimizing for Mali the OpenCL kernels (I don't think it makes sense to do it before you create your own application as it will be hard to mask the overhead of copies, etc.), I don't think there is anything special about optimizing for computer vision algorithms, you will just have to follow the usual rules: vectorisation, avoid barriers and local memory if they're not needed, etc. ( ARM Mali-T600 Series GPU OpenCL Developer Guide )

    I'm happy to give more feedback if you need advice on that.

    Unfortunately at the moment nothing else is available for Mali GPUs

Reply
  • Hi mans,

    We haven't tried this particular release but have successfully built OpenCV for Android from Itseez's "master" git branch a couple of weeks ago without requiring any modification.

    It ran successfully on T604 based devices and even though we haven't checked I don't see any reason for it not to work on any other Midgard GPU.

    To build the libraries and the native tests you just need to do:

    ANDROID_NDK=<path_to_android_ndk> ./platforms/scripts/cmake_android_arm.sh

    cd platforms/build_android_arm/

    cmake-gui .

    Tick NEON / OpenCL

    Press "configure"

    Press "generate"

    Close cmake-gui

    make -j8

    The way OpenCV is designed means there are a lot of memory copies required before any job is dispatched to the GPU which is perfectly fine for prototyping but if you're interested in performance I would recommend extracting the features you need from the library and create your own application.

    Then you can start optimizing for Mali the OpenCL kernels (I don't think it makes sense to do it before you create your own application as it will be hard to mask the overhead of copies, etc.), I don't think there is anything special about optimizing for computer vision algorithms, you will just have to follow the usual rules: vectorisation, avoid barriers and local memory if they're not needed, etc. ( ARM Mali-T600 Series GPU OpenCL Developer Guide )

    I'm happy to give more feedback if you need advice on that.

    Unfortunately at the moment nothing else is available for Mali GPUs

Children