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

用于DL代码优化的AI供电的优化器技术

AI Powered Compiler Techniques for DL Code Optimization

Sanket Tavarageri, Gagandeep Goyal, Sasikanth Avancha, Bharat Kaul, Ramakrishna Upadrasta

摘要:

在CPU上创建深度学习原语的高性能实现是一项具有挑战性的任务。包括多级缓存层次结构和CPU平台的宽SIMD单元在内的多种考虑因素影响了应用于性能优化的程序转换的选择。在本文中,我们提出了机器学习驱动的编译器技术来优化循环嵌套。我们采取双管齐下的方法来进行代码优化:我们首先应用高级优化来优化代码,以最佳地利用缓存内存。然后,我们执行低级别的、特定于目标的优化,以有效地对代码进行向量化,从而在机器的SIMD单元上运行良好。对于高级优化,我们使用多面体编译技术和深度学习方法。对于低级优化,我们使用目标特定的代码生成器,该代码生成器使用向量内在函数和强化学习(RL)技术生成代码,以找到代码生成器的最佳参数。我们对流行的深度学习工作负载中发生的各种矩阵乘法进行了实验评估。实验结果表明,本文提出的编译技术在串行运行和并行运行时分别获得了7.6倍和8.2倍的速度提升。

英文摘要:

Creating high performance implementations of deep learning primitives on CPUs is a challenging task. Multiple considerations including multi-level cache hierarchy, and wide SIMD units of CPU platforms influence the choice of program transformations to apply for performance optimization. In this paper, we present machine learning powered compiler techniques to optimize loop nests. We take a two-pronged approach to code optimization: We first apply high level optimizations to optimize the code to take optimal advantage of the cache memories. Then, we perform low level, target-specific optimizations to effectively vectorize the code to run well on the SIMD units of the machine. For high level optimizations, we use polyhedral compilation techniques and deep learning approaches. For low level optimization, we use a target specific code generator that generates code using vector intrinsics and Reinforcement Learning (RL) techniques to find the optimal parameters for the code generator. We perform experimental evaluation of the developed techniques on various matrix multiplications that occur in popular deep learning workloads. The experimental results show that the compiler techniques presented in the paper achieve 7.6X and 8.2X speed-ups over a baseline for sequential and parallel runs respectively.

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

↑