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

FamilySeer:利用计算子图相似性优化张量码

FamilySeer: Towards Optimized Tensor Codes by Exploiting Computation Subgraph Similarity

Beihang University(北京航空航天大学)

Shanjun Zhang, Mingzhen Li, Hailong Yang, Yi Liu, Zhongzhi Luan, Depei Qian

摘要:

有效地部署各种深度学习(DL)模型促进了DL编译器的研究。生成优化张量代码的困难促使DL编译器对自动调优方法提出了更高的要求,而不断增长的需求要求提高自动调优的效率和质量。目前,DL编译器将输入DL模型划分为几个子图,并利用自动调整来找到这些子图的最佳张量代码。然而,现有的自动调整方法通常将子图视为单独的子图,忽略了它们之间的相似性,因此无法在有限的时间预算下利用更好的张量代码。我们提出了FamilySeer,这是一个用于DL编译器的自动调优框架,即使在有限的时间预算下也可以生成更好的张量代码。FamilySeer利用子图之间的相似性和差异,可以将它们组织成子图家族,其中一个子图的调整也可以改善同一家族中的其他子图。每个族的代价模型得到更纯净的训练样本,并变得更准确,从而可以通过代价模型的轻量级估计来代替真实硬件上的昂贵测量。我们的实验表明,FamilySeer可以生成具有相同代码性能的模型代码,比最先进的自动调优框架更有效。

英文摘要:

Deploying various deep learning (DL) models efficiently has boosted the research on DL compilers. The difficulty of generating optimized tensor codes drives DL compiler to ask for the auto-tuning approaches, and the increasing demands require increasing auto-tuning efficiency and quality. Currently, the DL compilers partition the input DL models into several subgraphs and leverage the auto-tuning to find the optimal tensor codes of these subgraphs. However, existing auto-tuning approaches usually regard subgraphs as individual ones and overlook the similarities across them, and thus fail to exploit better tensor codes under limited time budgets. We propose FamilySeer, an auto-tuning framework for DL compilers that can generate better tensor codes even with limited time budgets. FamilySeer exploits the similarities and differences among subgraphs can organize them into subgraph families, where the tuning of one subgraph can also improve other subgraphs within the same family. The cost model of each family gets more purified training samples generated by the family and becomes more accurate so that the costly measurements on real hardware can be replaced with the lightweight estimation through cost model. Our experiments show that FamilySeer can generate model codes with the same code performance more efficiently than state-of-the-art auto-tuning frameworks.

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

↑