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 A COMMENT

18 Comments

View All Comments

  • tuxRoller - Thursday, February 28, 2013 - link

    http://android-developers.blogspot.com/2013/01/evo...
    Yes.
    Reply
  • niva - Thursday, February 28, 2013 - link

    I was under the impression that Renderscript was an extension built on top of OpenCL... Reply
  • jalexoid - Thursday, February 28, 2013 - link

    Google officially outed RenderScript GPU acceleration on MaliT604. And the API used underneath is OpenCL. Samsung has released SDK for Exynos 5(though only selected developer boards are supported, ex Arndale)

    http://android-developers.blogspot.com/2013/01/evo...
    Reply
  • Chillin1248 - Saturday, March 02, 2013 - link

    Since the latest Android update (4.2.2), I've seen the Nexus 4 performance in the GLbenchmark exceed the "freezer" tests in your previous review while being at room temperature.

    For example, Egypt HD:

    You got 39.6 FPS in your test, I just ran it on mine (including every single other benchmark in the suite) and I got 44 FPS.

    Can we please redo the review with a different Nexus 4 unit. It seems the older revision you reviewers got was flawed.
    Reply
  • nidz109 - Sunday, March 03, 2013 - link

    I agree. Actually, almost all of the benchmarks for the Nexus 4 dramatically different on 4.2.2. Thermal throttling issues have been mitigated by flashing custom kernels, but on stock 4.2.2 all of the issues at launch appear to be gone. I believe the Nexus 4 should be revisited.

    I clean flashed Paranoid Android (it's using the stock 4.2.2 kernel), and ran some benchmarks. The benchmarks are completely different than what's seen below. BTW, I bought my N4 on launch day.

    http://www.anandtech.com/show/6440/google-nexus-4-...

    Here are some screen shots:

    http://imgur.com/a/ufYBJ

    Also, regarding GLBenchmark, all of my scores are higher than your "freezer test" scores, and that's running the entire suite with both offscreen and onscreen tests. To be honest, the phone doesn't even get warm.
    Reply
  • smartypants67 - Tuesday, March 12, 2013 - link

    I got my Nexus 4 yesterday and ran all the benchmarks anandtech did and also get scores slightly above anands freezer tests. I have ran GLbenchmarks 3 times in a row and still get the same scores and the phone never gets more thank lukewarm. Something has changed. Reply
  • Kidster3001 - Thursday, March 14, 2013 - link

    You got an updated version of the OS and it performs better than the old version of the OS? Shocking... Reply
  • squidpickles - Monday, March 04, 2013 - link

    I have been playing with this for a week or so, and just posted a little explanation of what I did to get binaries built for the Nexus 4:

    http://sweetpea.tentacle.net/blog/opencl-on-nexus-...

    I invite comments and suggestions!
    Reply

Log in

Don't have an account? Sign up now