OpenCL Logo

OpenCL for Parallel Programming of Heterogeneous Systems

OpenCL™ (Open Computing Language) is an open, royalty-free standard for cross-platform, parallel programming of diverse accelerators found in supercomputers, cloud servers, personal computers, mobile devices and embedded platforms. OpenCL greatly improves the speed and responsiveness of a wide spectrum of applications in numerous market categories including professional creative tools, scientific and medical software, vision processing, and neural network training and inferencing.

Broad Adoption and Use

OpenCL 3.0

OpenCL 3.0 aligns the OpenCL roadmap to enable developer-requested functionality to be broadly deployed by hardware vendors, and it significantly increases deployment flexibility by empowering conformant OpenCL implementations to focus on functionality relevant to their target markets.

An Introduction to OpenCL

OpenCL Image: FluidX3D CFD © Dr. Moritz Lehmann.

The Essential Resources for OpenCL Development

Specification & Key Resources

Thanks to the support of the Khronos membership and our passionate developer community, there is a full set of well-supported developer information and educational resources available to help you get you up and running with your OpenCL application development.

Blogs, Releases and More ...

Featured News and Blogs

Adding Unified Shared Virtual Memory (SVM) to OpenCL

The OpenCL working group has been working on a follow-on to OpenCL 2.0 SVM and we would love your feedback.

Learn more

OpenCL 3.0.17 Released

This maintenance update addresses numerous bug fixes and improvements, covering external_memory, external_semaphore, and the provisional command_buffer_mutable_dispatch extension.

Learn more

New Open Source VirtIO-GPU OpenCL Driver

Discover how you can use the host GPU to accelerate operations in a virtual machine using a VirtIO-based graphics adapter, and VCL, an OpenCL driver by Qualcomm.

Learn more

Featured Event

SYCL Supercomputing 2024 Promo Image

Low-Level Parallel Programming

An Overview of OpenCL

OpenCL speeds applications by offloading their most computationally intensive code onto accelerator processors - or devices. OpenCL developers use C or C++-based kernel languages to code programs that are passed through a device compiler for parallel execution on accelerator devices.

  • Programming and Runtime Framework for Application Acceleration
    • Offload compute-intensive kernels onto parallel heterogeneous processors
    • CPUs, GPUs, DSPs, FPGAs, Tensors Processors, etc.
    • OpenCL or OpenCL for C++ language support

Other Khronos Compute Standards

OpenCL provides the industry with the lowest 'close-to-metal' processor-agile execution layer for accelerating applications, libraries and engines, and also providing a code generation target for compilers. Unlike 'GPU-only' APIs, such as Vulkan, OpenCL enables use of a diverse range of accelerators including multi-core CPUs, GPUs, DSPs, FPGAs and dedicated hardware such as inferencing engines.

OpenCL Deployment Flexibility

As the industry landscape of platforms and devices grows more complex, tools are evolving the enable OpenCL applications to be deployed onto platforms that do not have available native OpenCL drivers. For example, the open source clspv compiler and clvk API translator enable OpenCL applications to be run over a Vulkan run-time. This gives OpenCL developers significant flexibility on where and how they can deploy their OpenCL applications.

OpenCL Programming Model

An OpenCL application is split into host and device parts with host code written using a general programming language such as C or C++ and compiled by a conventional compiler for execution on a host CPU.

The device compilation phase can be done online, i.e. during execution of an application using special API calls. It can alternatively be compiled before executing the application into the machine binary or special portable intermediate representation defined by Khronos called SPIR-V. There are also domain specific languages and frameworks that can compile to OpenCL either using source-to-source translations or generating binary/SPIR-V, for example Halide.

The C++ for OpenCL Kernel Language

The OpenCL working group has transitioned from the original OpenCL C++ kernel language first defined in OpenCL 2.0 to C++ for OpenCL developed by the open source community to provide improved features and compatibility with OpenCL C. C++ for OpenCL is supported by Clang along with documentation. It enables developers to use most C++17 features in OpenCL kernels. It is largely backwards compatible with OpenCL C 2.0 enabling it to be used to program accelerators with OpenCL 2.0 or above with conformant drivers that support SPIR-V. Its implementation in Clang can be tracked via the OpenCL in Clang Support Page.

A Consistent Platform for Developers

OpenCL Implementations

Widespread Adoption

OpenCL is widely adopted with the majority of vendors now offering conformant implementations of OpenCL 3.0 and 2.0. Most of these offer public access to drivers and development platforms, including:

  • AMD - OpenCL runtimes for AMD GPUs
  • Arm - OpenCL for the Immortalis and Mali GPUs
  • Google - OpenCL for Google Pixel and Tensor platforms (not exposed as a public API)
  • Imagination - Open source GPU driver deliverables
  • Intel - OpenCL Runtimes for Intel Processors (CPU, GPU and FPGA)
  • Kalray - OpenCL for MPPA Coolidge processor
  • MediaTek - OpenCL for SoC platforms
  • NVIDIA - OpenCL 3.0 conformant in R465 and later drivers
  • POCL - an open source implementation of the OpenCL standard
  • Qualcomm - OpenCL SDK and an OpenCL ML SDK
  • RustiCL - an OpenCL implementation on top of Gallium drivers
  • Samsung - Undisclosed product
  • TI - OpenCL for a range of TI processor/DSP platforms
  • VeriSilicon - OpenCL on Vivante GPU IP Series

Development Implementations (non Conformant)

  • Mobileye - an OpenCL implementation for EyeQ SoCs

About Conformance Testing

The OpenCL Conformance Test Suite (CTS) is available on GitHub and helps to create a reliable platform for developers by ensuring that OpenCL is implemented consistently across all platforms. If your company is developing a product that implements OpenCL, and passes CTS, then you should consider becoming an official adopter to enjoy the following benefits -- and you don't need to be a Khronos member to become an Adopter.

  • Usage of the OpenCL name and logo in association with your product
  • IP protection under the Khronos IP Framework
  • Products promoted in the Khronos OpenCL Conformant Products listing

Widely Adopted & Deployed

Industry Support for OpenCL

“OpenCL is the most pervasive, cross-vendor, open standard for low-level heterogeneous parallel programming—widely used by applications, libraries, engines, and compilers that need to reach the widest range of diverse processors. OpenCL 2.X delivers significant functionality, but OpenCL 1.2 has proven itself as the baseline needed by all vendors and markets. OpenCL 3.0 integrates tightly organized optionality into the monolithic 2.2 specification, boosting deployment flexibility that will enable OpenCL to raise the bar on pervasively available functionality in future core specifications.”

“In recent years there has been an impressive adoption of OpenCL to drive heterogeneous processing systems within many market segments. This update to OpenCL 3.0 brings important flexibility benefits that will allow many evolving industries, from AI and HPC to automotive, to focus on their specific requirements and embrace open standards. Codeplay is excited to enable hardware vendors to support OpenCL 3.0 and to take advantage of the flexibility provided in its ecosystem of software products.”

“With its focus on deployment flexibility, we see OpenCL 3.0 as an excellent step forward in providing critical features for developers, with the ability to add functionality over time. This really is a step forward for the OpenCL ecosystem, allowing developers to write portable applications that depend on widely accepted functionality. Currently shipping GPUs based on the PowerVR Rogue architecture will enjoy a significant feature uplift including SVM, Generic Address Space and Work-group Functions. Upon final release of the specification, Imagination will ship a conformant OpenCL 3.0 implementation with support extending across a wide range of PowerVR GPUs, including our latest offering with IMG A-Series.”

“Intel strongly supports cross-architecture standards being driven across the compute ecosystem such as in OpenCL 3.0 and SYCL. Standards-based, unified programming models will enable efficiency and unleash creativity for our developers with the upcoming release of our new Xe GPU architecture.”

“NVIDIA welcomes OpenCL 3.0’s focus on defining a baseline to enable developer-critical functionality to be widely adopted in future versions of the specification. NVIDIA will ship a conformant OpenCL 3.0 when the specification is finalized and we are working to define the Vulkan® interop extension that, together with layered OpenCL implementations, will significantly increase deployment flexibility for OpenCL developers.”

“OpenCL 3.0 is an important step forward in the drive to unlock greater performance and innovation across a broadening range of computing platforms and applications. The flexible extension model will help our customers and software partners take full advantage of the tremendous potential available in both our existing and future application processors. We are pleased to have had the opportunity to contribute to this specification and we look forward to supporting the final product.”

“Many of our customers want a GPU programming language that runs on all devices, and with growing deployment in edge computing and mobile, this need is increasing. OpenCL is the only solution for accessing diverse silicon acceleration and many key software stacks use OpenCL/SPIR-V as a backend. We are very happy that OpenCL 3.0 will drive even wider industry adoption, as it reassures our customers that their past and future investments in OpenCL are justified.”

Vincent Hindriksen
Founder and CEO of Stream HPC

“OpenCL 3.0 has opened up a new chapter for the OpenCL API which has served as the standard GPGPU API during the past 10 years. With the streamlined OpenCL 3.0 core feature set, OpenCL 3.0 will enable a whole new class of embedded devices to adopt OpenCL API for GPU Compute and ML/AI processing, and it will also pave the way forward for OpenCL to interop or layer with the Vulkan API. VeriSilicon will deploy OpenCL 3.0 implementations quickly on a broad range of our embedded GPU and VIP products to enable our customers to develop new sets of GPGPU/ML/AI applications with the OpenCL 3.0 API.”

Community

Join the OpenCL Community Discussions

There are several ways to follow the latest OpenCL developments, provide feedback on the specification, and get your questions answered. It's a great way to get involved and will help forge the future of OpenCL and the wider ecosystem.

Help Shape the Future of OpenCL

If you are working with OpenCL and wish to get involved in helping shape its future, please consider Joining Khronos and our Working Group. Any organization is welcome to join, and multiple levels of membership are available to enable any organization, large or small, to get involved.

Join Khronos

Stay Informed

Subscribe to the OpenCL Newsletter

Stay in the loop with everything you need to know about the OpenCL standard, SDK and the wider ecosystem, plus updates on all the latest resources, news and events.

Click to Subscribe

By subscribing you are consenting to receive marketing emails about news and events relating to the Khronos Group. You can unsubscribe at any time by following the “Unsubscribe” link included in each email sent. For information on our privacy practices and commitment to protecting your privacy, please review our Privacy Policy. We do not sell your contact information to third parties.

Khronos Standard Additional links and information