The open standard for parallel programming of heterogeneous systems
OpenCL™ is the first open, royalty-free standard for cross-platform, parallel programming of modern processors found in personal computers, servers and handheld/embedded devices. OpenCL (Open Computing Language) greatly improves speed and responsiveness for a wide spectrum of applications in numerous market categories from gaming and entertainment to scientific and medical software.
OpenCL 2.1 is a significant evolution of this widely used standard that delivers the functionality demanded by the developer community – while preserving backwards compatibility and being able to ship on any OpenCL 2.0-capable hardware.
- New C++ kernel language based on C++14 for significantly enhanced programmer productivity and performance portability with clean, re-usable code
- Support for the new Khronos SPIR-V™ intermediate language in core for kernel language flexibility, sharing of common compiler front-ends, and the ability to ship kernels without exposing source code
- Enhancements to the OpenCL API including bringing subgroups, that expose hardware threading, into core, together with additional subgroup query operations for increased flexibility
The OpenCL 2.1 specification is released in provisional form to enable developers and implementers to provide feedback before finalization on the OpenCL forums.
- The OpenCL 2.1 provisional specification and header files are available in the Khronos Registry
- Post a comment on the OpenCL 2.1 feedback thread on the Khronos forums
- File a bug in the Khronos Bugzilla system under OpenCL 2.1 - good for detailed fixes and error founds in the specification.
- The OpenCL 2.0 specification and header files are available in the Khronos Registry
- The OpenCL 2.0 Reference card ( View online )
- The OpenCL 2.0 Online Man pages.
- The OpenCL 1.2 specification and header files are available in the Khronos Registry
- The OpenCL 1.2 Reference card ( View online )
- The OpenCL 1.2 Online Man pages
- The OpenCL C++ Wrapper 1.2 Reference Card ( View Online )
- The OpenCL 1.1 specification and header files are available in the Khronos Registry
- The OpenCL 1.1 Reference card ( View online )
- The OpenCL 1.1 Online Man pages
OpenCL – Portable Heterogeneous Computing
Portable Heterogeneous programming of diverse compute resources
- Targeting supercomputers -> embedded systems -> mobile devices
One code tree can be executed on CPUs, GPUs, DSPs, FPGA and hardware
- Dynamically interrogate system load and balance work across available processors
OpenCL = Two APIs and Kernel language
- C Platform Layer API to query, select and initialize compute devices
- C Runtime API to build and execute kernels across multiple devices
OpenCL 2.1 Provisional Released!
New OpenCL C++ kernel language based on a subset of C++14
- Significantly enhanced programmer productivity
- OpenCL C still supported to preserve kernel code investment
Support for the new Khronos SPIR-V intermediate language in core
- SPIR-V now used by both OpenCL 2.1 and the new Vulkan graphics API
- OpenCL 1.2 and 2.0 kernel languages also supported by SPIR-Vfor backwards compatibility
New OpenCL 2.1 Compiler Ecosystem
OpenCL as Parallel Language Backend
The OpenCL C++ kernel language is a static subset of C++14
- Frees developers from low-level coding details without sacrificing performance
C++14 featured removed from OpenCL C++ for parallel programming
- Throwing and catching exceptions (throw, catch)
- Allocation and release of memory (new, delete)
- Virtual functions and abstract classes (virtual)
- Function pointers, Recursion and goto
Classes, lambda functions, templates, operator overloading etc..
- Fast and elegant sharable code - reusable device libraries and containers
- Compile-time polymorphism via template meta-programmingfor highly adaptive software that delivers tuned performance across diverse platforms
OpenCL 2.1 API Enhancements
Subgroup functionality moved into core with additional subgroup query operations
- Expose hardware threads/warps/wavefronts and their cross-lane operations
- Host queries for forward progress extension, and workgroup->subgroup mapping
clCloneKernel enables copying of kernel objects and state
- Safe implementation of copy constructors in wrapper classes
- Used to pass kernel to second host thread, or for C++ wrappers for kernel objects
Low-latency device timer queries
- Support alignment of profiling data between device and host code
- Enables ingestion of SPIR-V code by the runtime
Priority and throttle hint extensions for queues
- Specify execution priority on a per-queue basis
- Zero-sized dispatches are valid from the host
Implementers of OpenCL
- Texas Instruments
- Apple, Inc.
- NVIDIA Corporation
- MediaTek Inc
- Altera Corporation
- Vivante Corporation
- Xilinx, Inc.
- ARM Limited
- Imagination Technologies
- STMicroelectronics International NV
- IBM Corporation
- Creative Labs
- Samsung Electronics