Khronos Releases OpenCL 2.1 and SPIR-V 1.0 Specifications

KHRONOS Reveal the Vulkan API

Khronos Releases OpenCL 2.1 and SPIR-V 1.0 Specifications

 

The Khronos Group, an open consortium of leading hardware and software companies, today announced the ratification and public release of the OpenCL 2.1 and SPIR-V 1.0 specifications for heterogeneous parallel computation. Consumption of the new SPIR-V cross-API intermediate language is guaranteed in the core OpenCL 2.1 specification. Khronos has released open source utilities and extensions to enable use of SPIR-V in OpenCL 1.2 and 2.0, as well as the upcoming Vulkan graphics API, ensuring widespread availability of its powerful runtime capabilities for developers of parallel computation languages and frameworks. The OpenCL C++ kernel language released in the OpenCL 2.1 provisional specification is being finalized and will be released imminently, also using SPIR-V for run-time execution.

The OpenCL 2.1 specification is available for immediate download at www.khronos.org/opencl/ and SPIR-V 1.0 is available at http://www.khronos.org/spir/.

 

KHRONOS Reveal the Vulkan API

 

SPIR-V 1.0 is an intermediate language fully defined by Khronos with unique, native support for graphics shaders and computational kernels. By providing a well formed compiler target, SPIR-V enables splitting of the compiler chain in graphics and compute intensive environments, so that high-level language and framework front-ends can emit programs to be efficiently executed by Vulkan or OpenCL drivers. Eliminating the need for a built-in high-level language source compiler significantly reduces GPU driver complexity and encourages a diversity of language front-ends. Additionally, a standardized intermediate language provides a measure of kernel IP protection, accelerated kernel load times and enables developers to use a common language front-end, improving kernel reliability and portability across multiple runtime implementations.

 

        “The use of SPIR-V by Vulkan and OpenCL will fundamentally reshape the graphics and compute ecosystem by enabling diverse language and middleware front-ends to leverage the hardware community’s investment in optimized back-end drivers,” said Neil Trevett, president of the Khronos Group and chair of the OpenCL working group and vice president at NVIDIA. “OpenCL 2.1 places the power of SPIR-V into the hands of developers as quickly as possible while we put the finishing touches to the OpenCL C++ kernel language, which we are working to finalize and release as early as mid-2016.”

 

In parallel with the availability of the OpenCL 2.1 and SPIR-V 1.0 specifications, Khronos has released a number of open source utilities on GitHub to catalyze the use of SPIR-V:

     
  • – A bi-directional translator between LLVM to SPIR-V to enable flexible use of both intermediate languages in tool chains;
  •  

  • – An OpenCL C to LLVM compiler that generates SPIR-V through the above translator;
  •  

  • – A SPIR-V assembler and disassembler.

 

In addition to these Khronos initiatives, there is already significant open source community activity using SPIR-V. Further details on these open source projects can be found here: https://www.khronos.org/spir/resources.

 

In addition to SPIR-V 1.0 support, OpenCL 2.1 brings enhancements to the OpenCL API, including:

     
  • – Subgroups, which enable finer grain control of hardware threading, are now in 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 for alignment of profiling data between device and host code.

  KHRONOS Reveal the Vulkan API

 

 

Industry Support for OpenCL 2.1 and SPIR-V 1.0

“AMD is thrilled to see OpenCLâ„¢ include a standard intermediate language as a core component. We believe this opens the door for further innovation in high-level programming languages which can fully leverage the compute power of OpenCL capable devices,” says Greg Stoner, senior director at AMD. “We applaud the efforts of both the compute and graphics communities for defining a standard that can support both – this represents real progress for the industry.”

“We are excited to be part of this move forward with SPIR-V and OpenCL 2.1,” said Andrew Richards, CEO of Codeplay. “This also benefits C++ application developers since the Khronos SYCL™ framework for single source C++ programming will therefore be available on all OpenCL 2.1 enabled platforms.”

“Achieving high compute performance within a limited power budget is essential to the new wave of functions and apps in embedded and mobile systems. Heterogeneous compute is now firmly established as the way to achieve that, and Imagination is delighted that Khronos is directly addressing this objective with the OpenCL 2.1 and SPIR-V 1.0 standards,” said Peter McGuinness, director of multimedia technology marketing, Imagination Technologies. “GPU compute is the bedrock of massively parallel power-efficient acceleration, and these new standards will stimulate the rapid deployment of more functional, compelling apps across a wide range of platforms.”

“Mobica is excited by all of the recent developments from the Khronos Group in graphics and parallel computing. The bringing together of OpenCL 2.1 and Vulkan to use SPIR-V 1.0 as an intermediate language in core is excellent news for the graphics and parallel computing industry,” said Jim Carroll, CTO Mobica.

 

You can join the discussion on OpenCL 2.1 and SPIR-V 1.0 on the OC3D Forums. 

Â