OpenCL drivers discovered on Nexus 4 and Nexus 10 devicesby Rahul Garg on February 27, 2013 11:07 AM EST
As regular Anandtech readers will know, OpenCL is a standard by Khronos group that allows you to access the computational power of parallel devices such as multicore CPUs and GPUs in your system provided the hardware and drivers support the API. Companies such as AMD, Intel and Nvidia have been shipping OpenCL drivers on the desktop for some time now. On the mobile side, vendors such as ARM, Imagination, Qualcomm, Samsung and TI have been promising OpenCL on mobile and often show off demos using OpenCL. Drivers from vendors such as ARM, Qualcomm and Imagination have also passed official conformance tests, certifying that they do have working drivers in at least development firmwares. However, none of the vendors have publically announced whether or not they are already shipping OpenCL in stock firmware on any device. ARM and Qualcomm have both maintained that licensing and shipping the OpenCL driver is upto the handset makers and have not issued any documentation confirming which handsets or tablets do ship with OpenCL. Google has also always maintained that Renderscript Compute, and not OpenCL, is the official parallel computing API for Android.
However, recently we have seen several stories that OpenCL drivers are in fact present on both Nexus 4 and Nexus 10 stock firmware. I first became aware of the presence of OpenCL for Mali T604 on Nexus 10 stock firmware through a tweet from Kishonti who were able to run their CLBenchmark test on the Nexus 10. Then, posters on several forums (such as bearon on Beyond3D forum ) posted instructions on how to get access to OpenCL on Nexus 10. Matthew Scarpino has also posted some instructions for Nexus 10 on his blog . Finally, posters on Qualcomm developer forums posted that Nexus 4 also appears to ship with OpenCL drivers, and gave some instructions on how to get access to OpenCL on Nexus 4. On Nexus 4, drivers appear to be present for both the quad-core Krait CPU and Adreno 320 GPU.
We have also been able to confirm ourselves that both Nexus 4 and Nexus 10 contain OpenCL drivers, though we have only tested very basic functions in the API so far. I have posted sample code here that appears to be working on both Nexus 4 and Nexus 10 and does not require you to pull any proprietary binaries from the firmware, unlike some other proposed solutions. I will keep updating the source code over time as I learn more.
It is not clear whether the shipping drivers are the conformant drivers referred to above, or some other internal build that may not have the full functionality of the API. It is potentially risky for commercial apps to depend upon the libraries, as they may be buggy or unstable, and may also disappear in future firmware versions. However, it is still an exciting development for developers and tinkerers, as it opens up the way for developers to explore the potential of OpenCL on mobile/low-power platforms.
Post Your CommentPlease log in or sign up to comment.
View All Comments
Jodiuh - Wednesday, February 27, 2013 - linkThis is very exciting!
Assimilator87 - Wednesday, February 27, 2013 - linkI'm waiting for the day when I can Fold on my phone =P
ShieTar - Thursday, February 28, 2013 - linkFunny. I'm waiting for the day when I can fold my phone.
DukeN - Thursday, February 28, 2013 - linkWhy are you waiting?
xaml - Thursday, February 28, 2013 - linkAnd I'm waiting for the day that I can phone my folder...
CNP-Keythai - Saturday, March 2, 2013 - linkKudos to Khronos group. I think Nexus 10 is a great invention and Khronos should be proud for their part in it.
dalingrin - Wednesday, February 27, 2013 - linkI believe the prefered way of using GPGPU on Android would be to use RenderScript. AFAIK the Nexus 4 and Nexus 10 are also the first devices to truly accelerate RenderScript on the GPU.
Having stable OpenCL support would allow for more code reused though.
xaueious - Wednesday, February 27, 2013 - linkI was under the impression that Renderscript was a rather non-productive language compared to the likes of OpenCL...
jalexoid - Thursday, February 28, 2013 - linkIt's as productive as OpenCL. Their goals are the same.
Krysto - Thursday, February 28, 2013 - linkCan you use Renderscript for computation photography or physics engines?