Standard Portable Intermediate Representation
Lua error in Module:Infobox at line 314: malformed pattern (missing ']'). Standard Portable Intermediate Representation (SPIR) is an intermediate language for parallel compute and graphics by Khronos Group, originally developed for use with OpenCL. The current version, SPIR-V, was announced in March 2015.
Contents
Purpose
OpenCL uses just-in-time compilation (JIT), necessitating one of two software distribution patterns: developers can distribute device-specific pre-compiled binaries, or they can distribute relevant source code, which is limited by the desire to protect intellectual property. SPIR enables the creation and distribution of device-independent binaries within in the OpenCL stack.[1]
Versions
SPIR was originally introduced in 2011, the current version SPIR-V having been introduced in 2015.
- SPIR 1.2 based on LLVM IR version 3.2; part of OpenCL 1.2 Extension
- SPIR 2.0 based on LLVM IR version 3.4; part of OpenCL 2.0 Extension
- SPIR-V not based on LLVM IR; part of OpenCL 2.1 core as well as Vulkan core
LLVM-based versions
SPIR prior to the 2015 SPIR-V release was based on the LLVM Intermediate Representation. A provisional specification for SPIR 1.0 was announced in 2012.[2] Version 1.2 was announced at SIGGRAPH 2013,[3] with version 2.0 following at the same conference a year later.[4]
SPIR-V
SPIR-V is a rewritten version of SPIR announced in March 2015,[5] and released on Nov. 16 2015.[6] The SPIR family now includes a true cross-API standard that is fully defined by Khronos with native support for shader and kernel features.
Support for ingestion of SPIR-V will be incorporated in the core specification of both OpenCL 2.1 and the new Vulkan API for graphics and compute.
SPIR-V is a high-level intermediate language, exchanged in binary form. Functions are represented by a control flow graph of basic blocks, using static single assignment (SSA) form. Data structures retain high-level hierarchical representation. It is not lossy like previous byte-code or virtual machine-like intermediate representations used for graphical shaders. This allows higher performance lowering to target devices.[7]
See also
- High-Level Shading Language
- Cg (programming language)
- OpenGL Shading Language
- Tungsten Graphics Shader Infrastructure
- compute kernel
References
<templatestyles src="Reflist/styles.css" />
Cite error: Invalid <references>
tag; parameter "group" is allowed only.
<references />
, or <references group="..." />
External links
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.