• Home
  • News
  • Tutorials
  • Analysis
  • About
  • Contact

TechEnablement

Education, Planning, Analysis, Code

  • CUDA
    • News
    • Tutorials
    • CUDA Study Guide
  • OpenACC
    • News
    • Tutorials
    • OpenACC Study Guide
  • Xeon Phi
    • News
    • Tutorials
    • Intel Xeon Phi Study Guide
  • OpenCL
    • News
    • Tutorials
    • OpenCL Study Guide
  • Web/Cloud
    • News
    • Tutorials
You are here: Home / Featured article / Provisional OpenCL 2.1 Enables Kernels Written Using a Subset of C++14 and Uses SPIR-V

Provisional OpenCL 2.1 Enables Kernels Written Using a Subset of C++14 and Uses SPIR-V

March 3, 2015 by Rob Farber Leave a Comment

The Khronos™ Group today announced the ratification and public release of the OpenCL™ 2.1 provisional specification viewable at www.khronos.org/opencl/ so developers and implementers can provide feedback before finalization at the OpenCL forums. Comments can be made via https://www.khronos.org/opencl/opencl_feedback_forum.

The OpenCL 2.1 C++ kernel language is a static subset of C++14 that provides lambda functions, classes, templates, operator overloading, and many other C++ features to free developers from low-level coding details. OpenCL C++ enables reusable device libraries and containers for easily sharable code that includes templates and enables meta-programming.

In addition to the introduction of the OpenCL C++ shading language, OpenCL 2.1 brings enhancements to the OpenCL API, including:

  • Subgroups, that expose hardware threading, are bought into core, together with additional subgroup query operations for increased flexibility;
  • clCloneKernel enables copying of kernel objects and state for safe implementation of copy constructors in wrapper classes;
  • Low-latency device timer queries support alignment of profiling between device and host 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.

Khrnonos claims OpenCL 2.1 preserves “backwards compatibility and being able to ship on any OpenCL 2.0-capable hardware”.

OpenCL_2.1-fs8

(image courtesy Khronos)

 

(image courtesy Khronos)

 

SPIR-V (Standard Portable Intermediate Representation)

Important for commercial codes, OpenCL 2.1 will incorporate support for the new SPIR-V open standard, cross-API intermediate language that natively represents parallel compute and graphics. SPIR-V exposes the machine model for OpenCL 1.2, 2.0, 2.1 and Vulkan – including full flow control, and graphics and parallel constructs not supported in LLVM. SPIR-V also supports OpenCL 1.2, 2.0, 2.1 kernel languages as well as the GLSL shader language for Vulkan (under development).

See the following articles to learn more about using SPIR to protect their codes:

  • Commercial OpenCL! SPIR 2.0 Protects IP Yet Allows Powerful, Portable, Source Code Free Kernels
  • Try Intel’s OpenCL 2.0 SDK With SPIR

SPIR-V can split the compiler chain across multiple vendors’ products, enabling high-level language front-ends to emit programs in a standardized intermediate form to be ingested by Vulkan or OpenCL drivers. For hardware vendors, ingesting SPIR-V eliminated the need to build a high-level language source compiler into device drivers, significantly reducing driver complexity, and will enable a broad range of language and framework front-ends to run on diverse hardware architectures.

For developers, using SPIR-V means that kernel source code no longer has to be directly exposed, kernel load times can be accelerated and developers can choose the use of a common language front-end, improving kernel reliability and portability across multiple hardware implementations.

(Image courtesy Khronos)

 

 

Share this:

  • Twitter

Filed Under: Featured article, Featured news, News, News, OpenCL Tagged With: OpenCL

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Tell us you were here

Recent Posts

Farewell to a Familiar HPC Friend

May 27, 2020 By Rob Farber Leave a Comment

TechEnablement Blog Sunset or Sunrise?

February 12, 2020 By admin Leave a Comment

The cornerstone is laid – NVIDIA acquires ARM

September 13, 2020 By Rob Farber Leave a Comment

Third-Party Use Cases Illustrate the Success of CPU-based Visualization

April 14, 2018 By admin Leave a Comment

More Tutorials

Learn how to program IBM’s ‘Deep-Learning’ SyNAPSE chip

February 5, 2016 By Rob Farber Leave a Comment

Free Intermediate-Level Deep-Learning Course by Google

January 27, 2016 By Rob Farber Leave a Comment

Intel tutorial shows how to view OpenCL assembly code

January 25, 2016 By Rob Farber Leave a Comment

More Posts from this Category

Top Posts & Pages

  • Guide to Get Ubuntu 14.10 Running Natively on Nvidia Shield Tablet
  • IBM TrueNorth a "Bee Brain" on a SyNAPSE Chip That Uses 70 mW
  • MultiOS Gaming, Media, and OpenCL Using XenGT Virtual Machines On Shared Intel GPUs
  • NVIDIA GTC 2015 keynote - Near-term Roadmap is Deep-Learning
  • LibreOffice OpenCL Acceleration for the Masses - Intel vs. AMD GPU performance

Archives

© 2025 · techenablement.com