Intel Looking To Upstream A Proper SPIR-V Compute Back-End For LLVM

There have been various out-of-tree efforts and plans talked about by different companies/developers for having a SPIR-V back-end in LLVM as this key IR supported by the modern Khronos APIs. With Intel's latest push and "request for comments", they are looking to have a proper back-end in LLVM for targeting SPIR-V -- initially with a compute focus but the possibility of extending to 3D shader support for Vulkan later on.
There have been differing opinions before on how such a LLVM to SPIR-V back-end should look while with the proposed Intel approach would be a "true" back-end design. The starting point if agreed on would be existing Khronos code and as mentioned to initially focus on OpenCL/compute use-cases.
If all goes well, the Intel engineers hope to be able to upstream an "experimental" SPIR-V back-end into the LLVM repository within the next few months.
See this mailing list thread for those interested. The early back-end code is being developed via this Khronos GitHub repository.
So far in the resulting discussion questions have been raised over LLVM's MLIR SPIR-V back-end and its future should this LLVM back-end come to pass. But for now the MLIR SPIR-V code is mostly focused on Vulkan while this proposed LLVM SPIR-V back-end is more minded for OpenCL/compute usage, so at least in the near term both efforts might co-exist. In any case if this new LLVM back-end pans out, it could help in allowing for existing code currently being passed through to LLVM front-ends like Clang to be re-targeted for OpenCL/GPU usage.
2 Comments