搭建桥梁:将Julia作为MLIR前端
Building Bridges: Julia as an MLIR Frontend
AI总结:
本文探索将Julia作为MLIR的高级前端,利用其多重派发等特性设计并实现了一个易扩展的MLIR代码生成框架,并通过三个案例研究验证了其有效性。
摘要:
受深度学习模型不断增长的算力需求驱动,编译器开发者一直在寻找更高效地针对专用硬件和异构系统的方法。MLIR项目旨在提供可用于开发新编译器并在不同抽象层级表示代码的基础设施。尽管MLIR在为开发者提供编写新IR和变换的方法方面表现出色,但终端用户目前没有简便的途径在这些IR中生成代码。在本研究中,我们探索将Julia编程语言作为生成MLIR代码的高级输入语言。最重要的是,我们关注可扩展性,允许包开发者以直观且易用的方式实现与MLIR dialect的绑定。通过依托Julia编程语言及其多重派发和可扩展编译器等富有表现力的特性,我们设计并实现了一个生成MLIR代码的框架。此外,我们在三个案例研究中评估了该框架,范围涵盖开发用于einsum表达式的小型DSL、指定MLIR代码上的变换,以及编写在GPU上运行的内核。
英文摘要:
Driven by increasing compute requirements for deep learning models, compiler developers have been looking for ways to target specialised hardware and heterogeneous systems more efficiently. The MLIR project has the goal to offer infrastructure that can be used to develop new compilers and represent code at different levels of abstractions. While MLIR excels at offering developers a way to write new IR and transformations, there is no easy way for end users to generate code in these IR. In this work, we explore using the Julia programming language as a high-level input language for generating MLIR code. Most importantly, we focus on extensibility, allowing package developers to implement bindings to MLIR dialects in an intuitive and easy-to-use manner. By building on the Julia programming language, and its expressive features such as multiple dispatch and its extensible compiler, we design and implement a framework to generate MLIR code. Additionally, we evaluate this framework in three case studies. Ranging from developing a small DSL for einsum expressions, to specifying transformations on MLIR code and programming kernels to be run on GPU.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。