arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2307.04995cs.LGcs.PL
收藏

PowerFusion:一种具有显式数据移动描述和指令级图IR的张量编译器

PowerFusion: A Tensor Compiler with Explicit Data Movement Description and Instruction-level Graph IR

Tsinghua University(清华大学)

Zixuan Ma, Haojie Wang, Jingze Xing, Liyan Zheng, Chen Zhang, Huanqi Cao, Kezhao Huang, Shizhi Tang, Penghan Wang, Jidong Zhai

AI总结:

本文提出张量编译器IntelliGen,通过指令级图IR显式描述计算与数据移动并进行整体优化,在多种硬件上显著提升内存密集型算子性能。

摘要:

深度神经网络(DNNs)在不同领域中具有关键用途。为了加速DNN计算,张量编译器被提出用于在不同的领域专用加速器上生成高效代码。现有的张量编译器主要专注于优化计算效率。然而,由于加速器的计算性能增长速度远快于内存性能,内存访问正在成为关键的性能瓶颈。当前张量编译器的中间表示(IR)缺乏对内存访问和数据依赖的直接描述,这给生成内存高效代码带来了重大挑战。在本文中,我们提出了IntelliGen,这是一种张量编译器,通过同时考虑计算和数据移动优化,能够为内存密集型算子生成高性能代码。IntelliGen使用GIR表示DNN程序,GIR包含指示其计算、数据移动和并行策略的原语。这些信息将进一步组合为指令级数据流图,通过搜索不同的内存访问模式和计算操作来执行整体优化,并在不同硬件上生成内存高效代码。我们在NVIDIA GPU、AMD GPU和Cambricon MLU上对IntelliGen进行了评估,与当前性能最强的框架相比,分别实现了高达1.97倍、2.93倍和16.91倍的加速(平均为1.28倍、1.23倍和2.31倍)。

英文摘要:

Deep neural networks (DNNs) are of critical use in different domains. To accelerate DNN computation, tensor compilers are proposed to generate efficient code on different domain-specific accelerators. Existing tensor compilers mainly focus on optimizing computation efficiency. However, memory access is becoming a key performance bottleneck because the computational performance of accelerators is increasing much faster than memory performance. The lack of direct description of memory access and data dependence in current tensor compilers' intermediate representation (IR) brings significant challenges to generate memory-efficient code. In this paper, we propose IntelliGen, a tensor compiler that can generate high-performance code for memory-intensive operators by considering both computation and data movement optimizations. IntelliGen represent a DNN program using GIR, which includes primitives indicating its computation, data movement, and parallel strategies. This information will be further composed as an instruction-level dataflow graph to perform holistic optimizations by searching different memory access patterns and computation operations, and generating memory-efficient code on different hardware. We evaluate IntelliGen on NVIDIA GPU, AMD GPU, and Cambricon MLU, showing speedup up to 1.97x, 2.93x, and 16.91x(1.28x, 1.23x, and 2.31x on average), respectively, compared to current most performant frameworks.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑