Different approaches to compute APIs: OpenCL from the Khronos Group

Share on linkedin
Share on twitter
Share on facebook
Share on google

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!

Please leave a comment below

Comment policy: We love comments and appreciate the time that readers spend to share ideas and give feedback. However, all comments are manually moderated and those deemed to be spam or solely promotional will be deleted. We respect your privacy and will not publish your personal details.

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

Product and event round-up from the experts in GPU and AI

It’s certainly been a busy few months for Imagination. Towards the latter end of last year, we released a raft of new products and initiatives, and a new CEO took the helm giving us real momentum for 2019. At the

How AI is conducting the future of music technology

“We tend to think of technological advances as destroying what’s gone before, but that doesn’t usually happen. This could lead to a different way of making music.” – Jarvis Cocker, former Pulp frontman, solo artist, writer and broadcaster In recent

Why you should join Imagination at Embedded World 2019

Our technology is focussed entirely on offering SoC manufacturers low power, high-performance options for building groundbreaking products in a range of markets, from automotive to smart devices such as smart speakers to the latest smartphones. Embedded World is one of

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.