Hi,
I'm trying to get the 64 bit OpenCL 1.2 libraries onto my Android development board. My goal is to finally use ARM Compute Library with OpenCL on Android.
I see that since Android 4.x onwards OpenCL support was stopped by Google (probably to promote Renderscript).
The Mali OpenCL SDK (refered from Khronos website) seems broken.
The Mali SDK Home page has a link for Mali OpenCL SDK which is getting redirected to ARM Compute Library page.
The ARM Compute Library has suupport for Android and has OpenCL Stubs and asking the user to use the real libOpenCL.so library
My guess is that the Mali OpenCL SDK page is temporarily down for maintainence.
Could someone help please?
Where do I find the OpenCL 1.2 SDK?
How do I (cross) compile the OpenCL 1.2 libraries for Android?
I don't want to port the Mali OpenCL SDK into Android build system and build from within Android SDK. I'm fine using a standalone Android toolchain to cross-compile the Mali OpenCL SDK and copying the libraries onto my target.
Thank you.
Regards,
San
I have been chasing the same problem for weeks now for OpenCL1.2 on Linux. Since introduction of Compute Library, Arm took down the Mali opencl1.1 SDK and haven't replaced it with 1.2. I raised a support ticket TAC710361. I was told that I could download the pre-compiled binaries from github " It includes libraries for Android and Linux, libarm_compute.so is under arm_compute-v17.06-bin/lib/. " I finally found the v17.09 version that I'm using, downloaded and extracted the so called binaries relevant to my build but it turns out that these binaries are what looks like merely the stub version compiled under the various build variations of v7 ,v8-64, debug etc. So still no further forward!
I have scoured the sites and the internet over the last three or four weeks and found no sign of OpenCL 1.2 for Mali Midgard GPUs. I don't believe it exists!
I've been looking at Samsung website for exynos driver support (Their processor system is used on Odroid XU4) and I've looked at Hardkrenels' webiste looking for drivers and guess what! They have the same Mali OpenCL SDK link which only points to a non existent page
Is there an answer to this?
Regards
Dave
Thanks Dave.
san@san-Thinkpad-T440S:~/Downloads/arm_compute-v17.10-bin/lib/android-arm64-v8a-neon-cl$ strings libOpenCL.so | grep stub ERROR: %s from stub libOpenCL.so library called! This library can be used to resolve OpenCL symbols at compile time but must *not* be in your runtime path (You need to use a real OpenCL implementation, this one is empty) opencl_stubs.c
I also tried on the latest v17.10 binaries. All of the libOpenCL.so are stubs with PRINT_STUB_ERROR macro uin it.
The only OpenCL libraries that I've found so far is for debian. The package ocl-icd-opencl-dev has OpenCL and other relevant libraries. I suppose the OpenCL version is 1.2 (not verified). Maybe you can give it a try.
I'm hoping someone from ARM would help us and point us to the relevant source/binaries.
Thanks,San
Hi Dave + San. Unfortunately, you are correct. The OpenCL SDK is no longer available. It has been replaced by the Compute Library. Arm has no plans on supporting or releasing any updates for it.
We moved Malideveloper over to Arm's fresher developer website and we are still in the process of making the content on there fit together. The reason there are Open CL links is because they used to point back to the Malideveloper website, which now doesn't exist. We are removing them as soon as we can. I think the pages may have been lost in the migration as they were hosted on a server outside of my remit.
I'm afraid I only curate the content around here and sorry for not being much more help.
Ben
Hi Ben
Thanks for confirming what I had thought but that now leaves us with Compute Library very much as a chocolate poker. When running the examples before using the library for real. The Opencl Stub returns the message that we don't have a real OpenCL library and needs a real armlib_compute.so (along with OpenCL.so + others) in order to run the examples and Compute Library. So we turn full circle to my TAC710361 request to find where do we get these shared oblect files from?
I think I'll give up my research into using GPUs for image analysis and go back to FPGA!
Hi Ben,
Thanks for your inputs. Indeed, my intention is to use ACL.
However, the ACL (even the latest V17.10) has OpenCL stub library and forcing us to use the real libOpenCL.so (which is no more available).
Seems like a deaclock and our project is blocked.
Is there a woraround you could suggest? Should we takeup with the ACL team?
Hi San + Dave,
Yes, I would recommend flagging these issues with the ACL team. They sound like major bugs. Especially if it is stopping projects.
Once again I apologise for the resources not being available, and developer.arm being misleading on the topic. I have reported this thread to the ACL team too.
Kind regards,
Don't get your hopes up too high! My original support query that I quoted was originally handed over to the ACL team which led me off to the white elephant chase of the arm_compute-v17.06-bin/lib/ solution which proved to be just another set of compiled versions of the stub libarm_compute.so!
Ben Walshe said:
I have reported this thread to the ACL team too.
Thanks a lot Ben. I guess I don't have to open another thread. I'll wait for inputs from ACL team.
Thanks,
Hi all,
Driver binaries for any given chipset - whether for graphics or compute APIs - generally need to be sourced from the chipset provider or the device manufacturer. We don't provide drivers directly at all, except for a small number of test platforms such as the Arm Juno development board. In most cases the drivers are customized by the chipset provider - e.g. to add support for GPU power management which is outside of the Mali GPU itself - so we are unable to provide binaries directly. Not all chipset providers will provide an OpenCL driver - many simply want to support graphics use cases.
The OpenCL SDK contains demo applications showing how to use OpenCL - it doesn't actually contain the OpenCL driver libraries themselves.
The ARM Compute Library is a library which itself is effectively built on top of the platform's OpenCL driver, so again doesn't include the OpenCL library itself. The stub library included is just for cross-compilation to provide something to link against; it's not a real library implementation.
For any specific device you might find that the libGLES_mali.so graphics library on the platform actually also exports the OpenCL symbols; if you create a symlink to that call libOpenCL.so then you might find it works. Running "strings" over the library will let you know which symbols it exports.
Pete
Thanks for your inputs Pete.
I'll check with the chipset vendor for the libraries.
Peter Harris said:
Thanks for this hint as well!!
Your hint worked Pete. My libGLES_mali.so does have the required OpenCL Symbols. Symlinking libOpenCL.so from libGLES_mali.so actually helps. I'm able to run all the ACL examples successfully.
Thanks again!!
Sa
Dave, please try the hint given by Pete. Check if OpelCL symbols are already there in your libGLES_mali.so. It worked for me.
Great, glad you got it working.
I don't have the libGLES_mali.so installed on my Odroid XU4, I'm getting a bit short of eMMC space and will have to rebuild to a larger device before installing extra stuff. A search for libGLES proved unsuccesful. What I did find however on my OpenCV 3.3 install there is a file in the build/lib/ directory libopencv_core.so which has all the opencl symbols listed, that may fit the bill, only trouble is I can't find out what version of OpenCL is used by OpenCV.
On doing a bit of further searching I also found that in /usr/lib/arm-linux-gnueabihf/mali-egl/ there is a file libmali,so that also appears to have the cl symbols listed. Again I have been trying to find out what version of OpenCL is used.
Following the suggestion, if I symlink to one of these file with a local libOpenCL.so, what about the stub library name libarm_compute.so? Does that become irrelevant or does that also have to be symlinked?
Cheers
Dave, from what I understand, ComputeLibrary/build/libarm_compute.so and ComputeLibrary/build/ibarm_compute_core.so are the main ACL libraries.
All the CL subs are inside ComputeLibrary/build/libOpenCL.so . You don't need ComputeLibrary/build/libOpenCL.so anymore, as you'd have symlnked libOpenCL.so to your libmali.so which contains the actual CL symbols.
You can just delete your ComputeLibrary/build/libOpenCL.so and use your symlinked version.
Hope this helps.