Reputation: 301
Recently I want to develop the parallel computing application on android use OpenCL. As far as I know, Android system does not include "libopencl.so",but there are still some webs or blogs show OpenCL development on android. Does Android support OpenCL? if so, what should I do to develop OpenCL on android ?
Upvotes: 29
Views: 22614
Reputation: 228
I know this is an old post but could be an help for other visitors.
Starting from API level 24 a better solution to perform GPGPU on Android is using Vulkan's compute stage.
Vulkan is not only for graphics, the compute stage in the pipeline is indipendent and can be used to run kernels.
I have recently released a Java module that uses the Vulkan's compute stage. It uses GLSL program as kernel but in the future I could add OpenCL C support too.
Upvotes: 1
Reputation: 1221
Update on May 20, 2016
For all devices with arm64-v8a
ABI, the OpenCL library may located in lib64
folder as well.
So when you check the OpenCL library, make sure you also check the corresponding lib64
folder (if you prefer arm64-v8a
as the first ABI for your app, you may want to first check lib64
folder).
For example: /system/vendor/lib64/libOpenCL.so
The original answer:
Since 2014, there are more phones supporting OpenCL.
The followings are the location of the OpenCL library:
Qualcomm Adreno:
/system/vendor/lib/libOpenCL.so
or /system/lib/libOpenCL.so (older devices)
ARM Mali:
/system/vendor/lib/egl/libGLES_mali.so
or /system/lib/egl/libGLES_mali.so
PowerVR:
/system/vendor/lib/libPVROCL.so
You can use OpenCL-Z Android to check the available and capabilities of OpenCL on Android devices.
Upvotes: 17
Reputation: 3406
Strictly speaking, Android does not support OpenCL. That is Google's (bad) choice. However, you can run OpenCL applications on your Android device if you can get hold of an OpenCL library for it. From the links Kirtan provides, I'd recommend the Sony route as it is the most straight forward (i.e. the phones already come with OpenCL on them) which I believe is Qualcomm's Adreno GPU.
The only Imagination OpenCL availability I know of is on this dev board. It has an SGX544 so you may be able to take the drivers from that board and put them on your device. It may work.....
As an aside: OpenGL ES 3.1 supports GL compute shaders and is supported on Android so may be an option of you are looking to ship something using the GPU for compute.
Upvotes: 4
Reputation: 1812
you can take reference of below links
https://software.intel.com/en-us/android/articles/opencl-basic-sample-for-android-os
http://arrayfire.com/getting-started-with-opencl-on-android/
http://developer.sonymobile.com/2013/10/29/boost-the-performance-of-your-android-app-with-opencl/
Upvotes: 3