Updated Plans For Adding SPIR-V Support To LLVM
SPIR-V, the heart of OpenCL 2.1+ and The Khronos Group's forthcoming Vulkan specification, is a step closer to being worked on within the LLVM compiler stack.
Last month I wrote about an AMD developer figuring out plans for SPIR-V support in LLVM as since the announcement of this new intermediate representation there's been talk of having a converter to translate SPIR-V to/from LLVM IR so there's interoperability with existing LLVM components and back-ends. Yaxun Liu of AMD has provided an update today on this SPIR-V target support within LLVM.
The message contains the revised proposal for the LLVM/SPIR-V converter. In order to allow developers to use Clang to compile OpenCL kernels into SPIR-V binaries, the overall approach remains the same for breaking down the LLVM IR into instructions that are represented by LLVM-IR. The first milestone for the involved developers is adding support for compiling an OpenCL 1.2/2.0 kernel to SPIR-V for this new target via Clang. Work will follow in adding an OpenCL 2.1 C++ front-end for Clang. Following bringing up OpenCL kernels in SPIR-V, work would then be focused on adding GLSL front-end support and supporting the SPIR-V instructions relevant specifically to graphics. Once that's all done, the SPIR-V back-end would hopefully be fully compliant with the forthcoming SPIR-V 1.0 specification.
Besides AMD, other SPIR working group members will also be working on this bi-way converter, including Intel and others that have stakes in LLVM's OpenCL support.
Last month I wrote about an AMD developer figuring out plans for SPIR-V support in LLVM as since the announcement of this new intermediate representation there's been talk of having a converter to translate SPIR-V to/from LLVM IR so there's interoperability with existing LLVM components and back-ends. Yaxun Liu of AMD has provided an update today on this SPIR-V target support within LLVM.
The message contains the revised proposal for the LLVM/SPIR-V converter. In order to allow developers to use Clang to compile OpenCL kernels into SPIR-V binaries, the overall approach remains the same for breaking down the LLVM IR into instructions that are represented by LLVM-IR. The first milestone for the involved developers is adding support for compiling an OpenCL 1.2/2.0 kernel to SPIR-V for this new target via Clang. Work will follow in adding an OpenCL 2.1 C++ front-end for Clang. Following bringing up OpenCL kernels in SPIR-V, work would then be focused on adding GLSL front-end support and supporting the SPIR-V instructions relevant specifically to graphics. Once that's all done, the SPIR-V back-end would hopefully be fully compliant with the forthcoming SPIR-V 1.0 specification.
Besides AMD, other SPIR working group members will also be working on this bi-way converter, including Intel and others that have stakes in LLVM's OpenCL support.
Add A Comment