Updates from OpenCL Tooling Task Sub Group: Recently Upstreamed SPIR-V Backend Ready for Discussion at 2022 LLVM Developers’ Meeting
OpenCL™ Tooling Task Sub Group (TSG) is actively contributing to the LLVM compiler infrastructure project and is determined to bring first-class support for OpenCL and SPIR-V™ to LLVM.
While the latest release of Clang brought the long-awaited support for the OpenCL 3.0 standard, C++ for OpenCL 2021 kernel language, and the SPIR-V generation interface utilizing an external tool llvm-spirv from the SPIRV-LLVM-Translator repository, the work on the native GlobalISel-based SPIR-V backend continues at full speed.
The TSG has been diligently working to review and merge all patches with features already implemented in the Khronos LLVM-SPIRV-Backend repository and these are now current. The current upstream backend yields 87% pass rate with OpenCL CTS test suite and 81% pass rate with LLVM integrated tests. Further development inside the LLVM repository is planned to provide full OpenCL conformance, performance improvements, and the redesign of OpenCL/SPIR-V built-in generation to make the backend easier to target from the non-OpenCL based frontends.
The OpenCL TSG is investing in providing offline and online/runtime testing automation for SPIR-V-related changes submitted to LLVM’s Phabricator and changes committed to the repository. The implementation of the infrastructure is open source and developed in the SPIRV-Backend-Testing repository. The website with current testing status is available at https://spirv-testing.khronos.org.
These updates and many other exciting changes in the SPIR-V and OpenCL world will be discussed in depth at the upcoming 2022 LLVM Developers’ Meeting, taking place November 7-9 in San Jose, California. The meeting will feature a 30-minute technical talk, “SPIR-V Backend in LLVM: Upstream and Beyond,” by Michal Paszkowski and Alex Bezzubikov. All interested developers are encouraged to register at https://llvm.swoogo.com/2022devmtg/ and participate in the conference.
The SPIR-V Language Ecosystem
SPIR-V enables a rich ecosystem of languages and compilers to target low-level APIs such as Vulkan® and OpenCL, including deployment flexibility: e.g., running OpenCL kernels on Vulkan.