Different approaches to compute APIs: OpenCL from the Khronos Group

Compute APIs are a new evolution in the mobile and embedded market space, and are subject to quite a range of different conceptual approaches compared to the evolution of 3D graphics API. The mobile-optimised OpenGL ES API for 3D graphics evolved from a market-tested and well-proven OpenGL API for desktop PCs; this allowed a rapid API evolution with fairly little risk. In the mobile space, two offerings are currently competing for developer attention: the Khronos developed OpenCL API (OS agnostic) and the Google Android-specific Renderscript API. While the goal of both APIs is the same in exposing parallel compute functionality, the approach and vision behind both APIs is very different, as I’ll discuss below.

Compute is far newer as an API concept, and the desktop market is still in the early days of API evolution, where a hardware-specific proprietary API called CUDA is playing a significant role. Custom APIs though are an approach long-abandoned in the 3D space. As a result, compute APIs are all still very young and are going through the usual growing pains, as the software and hardware vendors find the most optimal approaches and balanced feature sets.

OpenCL – a bottom-up development approach

OpenCL, developed by the Khronos Group, builds on the proven concepts of the other open APIs, and follows a logical hardware-driven evolutionary approach. Specifically, this means that an initial version of the API has been created with a feature set in-line with the feature set available in products. As with the Khronos 3D APIs, a desktop hardware optimised variant exists, and a mobile/embedded hardware optimised variant exists.

Unlike the Khronos 3D API, which has two different and separate API developments (OpenGL and OpenGL ES), the compute API OpenCL takes a different approach. This approach is a bit more like that of Microsoft DirectX, in that it exposes different feature levels: a desktop Full Profile and an embedded/mobile optimised variant called the Embedded Profile.

Additionally, in line with the OpenGL concept, the OpenCL API also allows for extensions.  These are extra features which can be exposed optionally, and are typically used to check market feedback on new features that were just not convincing enough to make it into the core specification. Over time, these extensions can be deprecated and fall to the side, or may be adopted into the core if enough Khronos Group members decide they are useful.

The development approach of OpenCL is a bottom-up approach, in that the API starts from the feature set supported by hardware. The API does not typically expose new features until they are usable, allowing for a simple and straightforward approach where over time newer functionality is added to the API as the hardware evolves. The two profiles in OpenCL allow for the embedded market to evolve in line with its far more power-limited requirements, while the desktop profile can concentrate on high-performance compute usage cases which are not (or are far less), limited by power budgets.

The diagram below shows the bottom-up, hardware and market segment focussed approach of the OpenCL API. Over time, incremental OpenCL versions have been released in line with hardware capabilities and market requirements – with 2 specific profiles – a Full Profile (FP) focussed on the desktop High Performance Compute (HPC) market segment, and an Embedded Profile (EP) focussed on the mobile low power consumption focussed market segment.

PowerVR - mobile GPU computing - OpenCL evolution

This development approach is fairly hardware-centric, and it allows for a trivial link between hardware generations and API versions. From a software point of view, this approach is also interesting, in that any new feature exposed is also a feature which is likely to be available and run at full performance. The disadvantage is that software must be rewritten over time to take advantage of the new features added in later versions of the API.

For more articles, news and announcements on GPU compute, keep coming back to our blog and follow us on Twitter (@ImaginationTech, @GPUCompute and @PowerVRInsider).
  • This expose and comparison of compute APIs is fantastic. I am really looking forward to hearing your perspective of Android’s Renderscript. Thanks!

  • Search by Tag

    Search for posts by tag.

    Search by Author

    Search for posts by one of our authors.

    Featured posts
    Popular posts

    Blog Contact

    If you have any enquiries regarding any of our blog posts, please contact:

    United Kingdom

    benny.har-even@imgtec.com
    Tel: +44 (0)1923 260 511

    Related blog articles

    British Engineering Excellence Award

    PowerVR Vision & AI design team collect another award

    We’re delighted that the design team for our PowerVR Series2NX Neural Network Accelerator (NNA) has been honoured with a prestigious British Engineering Excellence Award (BEEA). The BEEAs were established in 2009 to demonstrate the high calibre of engineering design and innovation in the

    Series8XT AR/VR Banner

    Imagination Technologies: the ray tracing pioneers

    After a period out of the spotlight, ray tracing technology has recently come back into focus, taking up a lot of column inches in the tech press. The primary reason is because graphics cards for the PC gaming market have

    Amazon Fire Stick 4K pic

    Amazon Lights up its Fire TV Stick 4K with PowerVR

    Amazon, the internet shopping giant, announced earlier this week the latest version of its media streaming device, the Fire TV Stick 4K. First released in 2016, the Fire TV stick brings catch-up streaming services to any TV with an HDMI

    Stay up-to-date with Imagination

    Sign up to receive the latest news and product updates from Imagination straight to your inbox.

    • This field is for validation purposes and should be left unchanged.
    >
    Contact Us

    Contact Us