arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 1909.10616cs.LGcs.NEstat.ML
收藏

用于深度学习的多级矩阵乘法优化

Compiler-Level Matrix Multiplication Optimization for Deep Learning

Petuum(佩图姆);Huawei(华为);Amazon(亚马逊)

Huaqing Zhang, Xiaolin Cheng, Hui Zang, Dae Hoon Park

摘要:

一个重要的线性代数例程,通用矩阵乘法(GEMM),是深度学习中的基本运算符。开发人员需要将这些例程转换为针对特定硬件优化的低级代码。GEMM的机器人级优化对训练和执行深度学习模型具有显著的性能影响。然而,大多数深度学习框架依赖于硬件特定的运算符库,其中GEMM优化主要通过手动调整来实现,这限制了不同目标硬件上的性能。在本文中,我们提出了两个新的算法GEMM优化的TVM框架的基础上,一个轻量级的贪婪最佳优先搜索(G-BFS)方法的启发式搜索,和邻域演员优势批判(N-A2 C)方法的基础上强化学习。实验结果表明,所提出的方法的性能显着改善,在最优的解决方案和搜索成本的时间和分数的搜索空间探索。具体来说,所提出的方法分别比最先进的XGBoost和RNN方法节省了24%和40%的GEMM计算时间,同时只探索了0.1%的搜索空间。所提出的方法有可能被应用到其他运营商级的优化。

英文摘要:

An important linear algebra routine, GEneral Matrix Multiplication (GEMM), is a fundamental operator in deep learning. Compilers need to translate these routines into low-level code optimized for specific hardware. Compiler-level optimization of GEMM has significant performance impact on training and executing deep learning models. However, most deep learning frameworks rely on hardware-specific operator libraries in which GEMM optimization has been mostly achieved by manual tuning, which restricts the performance on different target hardware. In this paper, we propose two novel algorithms for GEMM optimization based on the TVM framework, a lightweight Greedy Best First Search (G-BFS) method based on heuristic search, and a Neighborhood Actor Advantage Critic (N-A2C) method based on reinforcement learning. Experimental results show significant performance improvement of the proposed methods, in both the optimality of the solution and the cost of search in terms of time and fraction of the search space explored. Specifically, the proposed methods achieve 24% and 40% savings in GEMM computation time over state-of-the-art XGBoost and RNN methods, respectively, while exploring only 0.1% of the search space. The proposed approaches have potential to be applied to other operator-level optimizations.

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

↑