Ansor:为深度学习生成高性能张量程序
Ansor: Generating High-Performance Tensor Programs for Deep Learning
AI总结:
Ansor通过分层搜索空间采样、进化搜索与学习成本模型,生成高性能张量程序,在Intel CPU、ARM CPU和NVIDIA GPU上分别提升性能高达3.8倍、2.6倍和1.7倍。
摘要:
高性能张量程序对于保证深度神经网络的高效执行至关重要。然而,针对不同算子在不同硬件平台上获得高性能张量程序是出了名的困难。目前,深度学习系统依赖供应商提供的内核库或各种搜索策略来获得高性能张量程序。这些方法要么需要大量的工程努力来开发特定于平台的优化代码,要么由于受限的搜索空间和无效的探索策略而无法找到高性能程序。我们提出了Ansor,一个用于深度学习应用的张量程序生成框架。与现有的搜索策略相比,Ansor通过从搜索空间的分层表示中采样程序来探索更多的优化组合。然后,Ansor利用进化搜索和学习到的成本模型对采样程序进行微调,以识别最佳程序。Ansor可以找到现有最先进方法搜索空间之外的高性能程序。此外,Ansor利用任务调度器同时优化深度神经网络中的多个子图。我们表明,与最先进的方法相比,Ansor在Intel CPU、ARM CPU和NVIDIA GPU上将深度神经网络的执行性能分别提高了高达3.8倍、2.6倍和1.7倍。
英文摘要:
High-performance tensor programs are crucial to guarantee efficient execution of deep neural networks. However, obtaining performant tensor programs for different operators on various hardware platforms is notoriously challenging. Currently, deep learning systems rely on vendor-provided kernel libraries or various search strategies to get performant tensor programs. These approaches either require significant engineering effort to develop platform-specific optimization code or fall short of finding high-performance programs due to restricted search space and ineffective exploration strategy. We present Ansor, a tensor program generation framework for deep learning applications. Compared with existing search strategies, Ansor explores many more optimization combinations by sampling programs from a hierarchical representation of the search space. Ansor then fine-tunes the sampled programs with evolutionary search and a learned cost model to identify the best programs. Ansor can find high-performance programs that are outside the search space of existing state-of-the-art approaches. In addition, Ansor utilizes a task scheduler to simultaneously optimize multiple subgraphs in deep neural networks. We show that Ansor improves the execution performance of deep neural networks relative to the state-of-the-art on the Intel CPU, ARM CPU, and NVIDIA GPU by up to $3.8\times$, $2.6\times$, and $1.7\times$, respectively.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。