LEGO:一种用于分层映射代码生成的布局表达语言
LEGO: A Layout Expression Language for Code Generation of Hierarchical Mapping
AI总结:
LEGO是一种用于生成分层映射代码的布局表达语言,通过布局规范生成索引表达式,可集成至编译器和模板中,实现数据和计算优化。
摘要:
我们描述了LEGO,一种新的优化数据移动的方法,其中代码以与布局无关的计算方式表达,并与布局结合以进行数据和计算。这种代码生成器组织能够推导出与层次平行代码和数据移动相关的复杂索引表达式。LEGO将布局规范映射到索引表达式,并可以集成到现有的编译器和代码模板中。它促进了数据布局与其他优化的结合探索。我们展示了LEGO与Triton和MLIR编译器以及CUDA模板的集成。我们证明了LEGO能够推导出与Triton具有竞争力的性能,并展示了其在与CUDA和MLIR集成时在数据和线程布局映射优化中的广泛应用。
英文摘要:
We describe LEGO, a new approach to optimizing data movement whereby code is expressed as a layout-independent computation and composed with layouts for data and computation. This code generator organization derives complex indexing expressions associated with hierarchical parallel code and data movement for GPUs. LEGO maps from layout specification to indexing expressions, and can be integrated into existing compilers and code templates. It facilitates the exploration of data layouts in combination with other optimizations. We demonstrate LEGO's integration with the Triton and MLIR compilers, and with CUDA templates. We show that LEGO is capable of deriving performance competitive with Triton, and shows broad applicability for data and thread layout mapping optimizations in its integration with CUDA and MLIR.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。