构建用于运行时 SPIR-V 代码生成的可组合与函数式 API 的经验
Experiences in Building a Composable and Functional API for Runtime SPIR-V Code Generation
AI总结:
本文提出 Beehive SPIR-V Toolkit 框架,支持动态生成和验证 SPIR-V 二进制模块,集成至 TornadoVM 后编译速度提升 3 倍,性能最高提升 1.52 倍。
摘要:
本文提出了 Beehive SPIR-V Toolkit;这是一个能够自动生成 Java 可组合与函数式库的框架,用于动态构建 SPIR-V 二进制模块。优化编译器和运行时系统可以使用 Beehive SPIR-V Toolkit 从托管运行时系统(如 Java 虚拟机,JVM)生成并验证 SPIR-V 二进制模块。此外,我们的框架架构设计易于维护,能够适应新的 SPIR-V 版本发布,并支持除 SPIR-V 之外的其他标准的 Java 库自动生成。Beehive SPIR-V Toolkit 还包含一个汇编器(从反汇编的 SPIR-V 文本文件生成 SPIR-V 二进制模块)、一个反汇编器(将 SPIR-V 二进制代码转换为文本文件)以及一个控制台客户端应用程序。据我们所知,Beehive SPIR-V Toolkit 是第一个能够动态生成 SPIR-V 二进制模块的 Java 编程框架。为了演示我们框架的用法,我们展示了在 TornadoVM(一个用于在异构硬件上自动卸载和运行 Java 程序的 Java 框架)环境中集成 SPIR-V Beehive Toolkit 的过程。我们表明,通过 SPIR-V Beehive Toolkit,TornadoVM 编译代码的速度比其现有的 OpenCL C JIT 编译器快 3 倍,并且性能比 TornadoVM 中现有的 OpenCL C 后端最高快 1.52 倍。
英文摘要:
This paper presents the Beehive SPIR-V Toolkit; a framework that can automatically generate a Java composable and functional library for dynamically building SPIR-V binary modules. The Beehive SPIR-V Toolkit can be used by optimizing compilers and runtime systems to generate and validate SPIR-V binary modules from managed runtime systems, such as the Java Virtual Machine (JVM). Furthermore, our framework is architected to accommodate new SPIR-V releases in an easy-to-maintain manner, and it facilitates the automatic generation of Java libraries for other standards, besides SPIR-V. The Beehive SPIR-V Toolkit also includes an assembler that emits SPIR-V binary modules from disassembled SPIR-V text files, and a disassembler that converts the SPIR-V binary code into a text file, and a console client application. To the best of our knowledge, the Beehive SPIR-V Toolkit is the first Java programming framework that can dynamically generate SPIR-V binary modules. To demonstrate the use of our framework, we showcase the integration of the SPIR-V Beehive Toolkit in the context of the TornadoVM, a Java framework for automatically offloading and running Java programs on heterogeneous hardware. We show that, via the SPIR-V Beehive Toolkit, the TornadoVM is able to compile code 3x faster than its existing OpenCL C JIT compiler, and it performs up to 1.52x faster than the existing OpenCL C backend in TornadoVM.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。