An optimized hybrid evolutionary algorithm for accelerating automatic code optimization

Yasong Zhang, Yu'e Li, Xiaolin Wang
{"title":"An optimized hybrid evolutionary algorithm for accelerating automatic code optimization","authors":"Yasong Zhang, Yu'e Li, Xiaolin Wang","doi":"10.1117/12.2667392","DOIUrl":null,"url":null,"abstract":"The deployments of deep learning models must be highly optimized by experts or hardware suppliers before being used in practice, and it has always been a long-term goal for the compiler community to enable compilers to automatically optimize code. However, there is no feasible solution in practice as running a program costs a considerable amount of optimization time to obtain a desired latency. Aiming at making up for the deficiency of long optimization time of TVM compiler, a novel optimized hybrid aging evolutionary algorithm is proposed to predict the running time of the code and accelerate automatic code optimization for Ansor, an auto-tuning framework for TVM. The algorithm alternately removes the worst and oldest individuals in the population during the evolution process. Unlike previous evolutionary algorithm, if an individual seeks to survive in the evolving population for a long time, it must have excellent scalability and flexibility, not just the individual's own adaptability. In this way, this algorithm not only ensures a strong search capability, but also improves the convergence speed and accuracy, significantly reducing the optimization time of tensor programs for deep learning inference. Experimental results show that the algorithm can accelerate convergence speed. For the same task, our algorithm provides 9% to 16% shorter optimization time on average while achieving similar or better optimization quality (i.e., inference time).","PeriodicalId":128051,"journal":{"name":"Third International Seminar on Artificial Intelligence, Networking, and Information Technology","volume":"60 4 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2023-02-22","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Third International Seminar on Artificial Intelligence, Networking, and Information Technology","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1117/12.2667392","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

The deployments of deep learning models must be highly optimized by experts or hardware suppliers before being used in practice, and it has always been a long-term goal for the compiler community to enable compilers to automatically optimize code. However, there is no feasible solution in practice as running a program costs a considerable amount of optimization time to obtain a desired latency. Aiming at making up for the deficiency of long optimization time of TVM compiler, a novel optimized hybrid aging evolutionary algorithm is proposed to predict the running time of the code and accelerate automatic code optimization for Ansor, an auto-tuning framework for TVM. The algorithm alternately removes the worst and oldest individuals in the population during the evolution process. Unlike previous evolutionary algorithm, if an individual seeks to survive in the evolving population for a long time, it must have excellent scalability and flexibility, not just the individual's own adaptability. In this way, this algorithm not only ensures a strong search capability, but also improves the convergence speed and accuracy, significantly reducing the optimization time of tensor programs for deep learning inference. Experimental results show that the algorithm can accelerate convergence speed. For the same task, our algorithm provides 9% to 16% shorter optimization time on average while achieving similar or better optimization quality (i.e., inference time).
一种加速代码自动优化的优化混合进化算法
深度学习模型的部署必须经过专家或硬件供应商的高度优化才能投入实际使用,让编译器能够自动优化代码一直是编译器社区的长期目标。然而,在实践中没有可行的解决方案,因为运行程序需要花费相当多的优化时间才能获得所需的延迟。针对TVM编译器优化时间过长的不足,提出了一种新的优化混合老化进化算法,用于预测代码运行时间,加快TVM自动调优框架Ansor的代码自动优化速度。该算法在进化过程中交替去除种群中最差和最老的个体。与以往的进化算法不同,如果一个个体想要在不断进化的种群中长期生存,它必须具有出色的可扩展性和灵活性,而不仅仅是个体自身的适应性。这样,该算法不仅保证了强大的搜索能力,而且提高了收敛速度和精度,显著减少了深度学习推理张量程序的优化时间。实验结果表明,该算法可以加快收敛速度。对于相同的任务,我们的算法在实现相似或更好的优化质量(即推理时间)的同时,平均缩短了9%到16%的优化时间。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信