Khronos Officially Announces Its LLVM/SPIR-V Translator

Written by Michael Larabel in LLVM on 11 April 2018 at 10:50 AM EDT. 4 Comments
LLVM
The Khronos Group has officially announced the long-awaited open-source availability of their SPIRV-LLVM-Translator that allows the bi-directional translation of SPIR-V and LLVM IR.

The SPIRV-LLVM-Translator allows taking Vulkan/OpenCL SPIR-V and translating it into native LLVM IR for consumption by the diverse components in the LLVM ecosystem. Likewise, you can go from the LLVM intermediate representation and output to SPIR-V for consumption then by SPIR-V/Vulkan drivers. This bi-directional translator opens up SPIR-V to a range of interesting new options.

This translator can also work with the Khronos OpenCL C compiler for turning the code into SPIR-V. The SPIRV-LLVM-Translator provides the llvm-spirv tool for offline translation from LLVM bitcode to/from SPIR-V. The tool can also provide debugging information and dumping SPIR-V in a textual format for debugging.

The code to the SPIRV-LLVM-Translator can be found via GitHub. Ultimately, Khronos members continue pursuing a SPIR-V back-end within LLVM itself, but for now there is this standalone translator and hopefully it won't be too much longer before seeing official SPIR-V support within LLVM.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week