arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2409.01075cs.DC
收藏

Vortex:通过硬件感知策略空间层次化实现高效无样本动态张量程序优化

Vortex: Efficient Sample-Free Dynamic Tensor Program Optimization via Hardware-aware Strategy Space Hierarchization

Yangjie Zhou, Honglin Zhu, Qian Qiu, Weihao Cui, Zihan Liu, Cong Guo, Siyuan Feng, Jintao Meng, Haidong Lan, Jingwen Leng, Wenxi Zhu, Minwen Deng

AI总结:

Vortex提出硬件驱动的无样本动态张量程序编译方法,通过策略空间层次化和双向编译工作流显著降低编译时间并提升CPU/GPU性能。

摘要:

动态形状深度神经网络(DNN)正在快速发展,因其在实时应用中处理可变输入尺寸的能力而受到广泛关注。然而,针对此类网络的现有编译优化方法通常严重依赖预定义样本来指导编译过程,这限制了它们的适应性和效率。这些样本驱动的方法难以高效管理现实场景中遇到的各种不可预测的形状,往往导致性能欠佳。为解决这些问题,我们提出了Vortex,一个面向动态形状张量程序的硬件驱动且无样本的编译器。Vortex利用详细的硬件信息并对策略空间进行层次化,从而在不依赖运行时形状样本的情况下实现高性能代码生成。它具有独特的双向编译工作流,结合了自上而下的抽象以将张量程序执行与硬件层次结构对齐,以及自下而上的内核构建以缩小搜索空间,使Vortex能够实现卓越的效率。综合评估证实,与现有的动态形状编译器相比,Vortex将编译时间减少了$176\ imes$。此外,它在CPU和GPU平台上均显著优于现有的供应商提供库和动态形状编译器,分别实现了$2.53\ imes$和$3.01\ imes$的加速。

英文摘要:

Dynamic-shape deep neural networks (DNNs) are rapidly evolving, attracting attention for their ability to handle variable input sizes in real-time applications. However, existing compilation optimization methods for such networks often rely heavily on predefined samples to guide the compilation process, which restricts their adaptability and efficiency. These sample-driven methods struggle to efficiently manage the diverse and unpredictable shapes encountered in real-world scenarios, often resulting in suboptimal performance. To tackle these issues, we introduce Vortex, a hardware-driven and sample-free compiler tailored for dynamic-shape tensor programs. Vortex capitalizes on detailed hardware information and hierarchizes the strategy space to facilitate high-performance code generation without relying on runtime shape samples. It features a unique bidirectional compilation workflow, combining top-down abstraction for aligning tensor program execution with hardware hierarchies and bottom-up kernel construction to narrow the search space, enabling Vortex to achieve remarkable efficiency. Comprehensive evaluations confirm that Vortex reduces compilation time by $176\times$ compared to the existing dynamic-shape compiler. Additionally, it substantially outperforms existing vendor-provided libraries and dynamic-shape compilers on both CPU and GPU platforms, delivering speedups of $2.53\times$ and $3.01\times$, respectively.

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

↑