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).

3 thoughts on “Different approaches to compute APIs: OpenCL from the Khronos Group”

  1. This expose and comparison of compute APIs is fantastic. I am really looking forward to hearing your perspective of Android’s Renderscript. Thanks!

Leave a Comment

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

What is PowerVR Automotive? Register NOW to hear our webinar.

The automotive industry is going through many changes and that is having a huge impact on the semiconductor IP industry. The vehicle will move from being predominantly mechanical to primarily a computer on wheels enabling a future of self-driving cars,

Image-based lighting

PowerVR Tools and SDK 2018 Release 2 now available

Here’s an early Christmas present for graphics developers – the release of the latest version of our PowerVR Tools and SDK! The headline features for this release include some exciting new examples demonstrating new techniques in our SDK, and some very

on stage in China

PVRIC4 a hit at ICCAD 2018 in China

Imagination’s PVRIC4 image compression tech garnered plenty of attention at the recent ICCAD China 2018 symposium, which took place on 29th and 30th November at the Zhuhai International Convention & Exhibition Centre, China. The annual event focusses on integrated circuit

The ultimate embedded GPUs for the latest applications

Introducing PowerVR Series9XEP, Series9XMP, and Series9XTP As Benjamin Franklin once said, only three things in life are certain: death, taxes and the ongoing rapid advancement of GPUs for embedded applications*. Proving his point, this week, Imagination has once again pushed

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.