展示一个面向NumPy的DSL编译器在MLIR原生环境中的未来
Demonstrating a Future for MLIR-native DSL Compilers on a NumPy-like Example
AI总结:
本文介绍了一个面向NumPy的DSL,完全基于MLIR构建,通过新的MLIR类型检查器实现前端动作和语义分析,展示了其在天气建模和计算流体动力学领域的应用效果。
摘要:
通用语言编译器在专用应用领域相比DSL编译器处于劣势。然而,DSL编译器领域在编译器框架和相关软件生态系统方面缺乏统一性,导致大量工作被重复、丢失或未被发现,大多数DSL从未被视为
英文摘要:
Compilers for general-purpose languages have been shown to be at a disadvantage when it comes to specialized application domains as opposed to their Domain-Specific Language (DSL) counterparts. However, the field of DSL compilers features little consolidation in terms of compiler frameworks and adjacent software ecosystems. As a result, considerable work is duplicated, lost to maintenance issues, or remains undiscovered, and most DSLs are never considered "production-ready". One notable development is the introduction of the Multi-Level Intermediate Representation (MLIR), which promises a similar impact on DSL compilers as LLVM had on general-purpose tooling. In this work, we present a NumPy-like DSL made for offloading numeric tensor kernels that is entirely MLIR-native. In a first for open-source, it implements all frontend actions and semantic analyses directly within MLIR. Most notably, this is made possible by our new dialect-agnostic MLIR type checker, created for the future of DSLs in MLIR. We implement a simple, yet effective, parallel-first lowering scheme that connects our language to another MLIR dataflow dialect for seamless offloading. We show that our approach performs well in real-world use cases from the domain of weather modeling and Computational Fluid Dynamics (CFD) in Fortran.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。