Deep Learning (DL) compilers are widely adopted to optimize advanced DL models for efficient deployment on diverse hardware. Their quality has profound effect on the quality of compiled DL models. A recent bug study shows that the optimization of high-level intermediate representation (IR) is the most error-prone compilation stage. Bugs in this stage are accountable for 44.92% of the whole collected ones. However, existing testing techniques do not consider high-level optimization related features (e.g. high-level IR), and are therefore weak in exposing bugs at this stage. To bridge this gap, we propose HirGen, an automated testing technique that aims to effectively expose coding mistakes in the optimization of high-level IR. The design of HirGen includes 1) three coverage criteria to generate diverse and valid computational graphs; 2) full use of high-level IRs language features to generate diverse IRs; 3) three test oracles inspired from both differential testing and metamorphic testing. HirGen has successfully detected 21 bugs that occur at TVM, with 17 bugs confirmed and 12 fixed. Further, we construct four baselines using the state-of-the-art DL compiler fuzzers that can cover the high-level optimization stage. Our experiment results show that HirGen can detect 10 crashes and inconsistencies that cannot be detected by the baselines in 48 hours. We further validate the usefulness of our proposed coverage criteria and test oracles in evaluation.


翻译:摘要:深度学习(DL)编译器被广泛采用,以优化先进的DL模型,使其在各种硬件上高效部署。其质量对编译的DL模型的质量产生深远影响。最近的错误研究表明,高级中间表示(IR)的优化是最容易出现错误的编译阶段。在整个收集到的错误中,此阶段的错误占44.92%。然而,现有的测试技术不考虑高级优化相关特征(例如高级IR),因此在该阶段暴露错误方面较弱。为了弥补这一差距,我们提出了HirGen,一种自动化测试技术,旨在有效地暴露高级IR优化中的编码错误。HirGen的设计包括1)三个覆盖准则来生成多样化且有效的计算图;2)充分利用高级IR语言功能来生成多样化的IR;3)三个测试Oracle,灵感来自差分测试和变形测试。HirGen已成功检测到TVM中发生的21个错误,其中17个错误得到了确认和12个错误得到了修复。此外,我们使用最先进的DL编译器模糊器构建了四个基线,可以覆盖高级优化阶段。我们的实验结果表明,HirGen在48小时内可以检测到10个无法被基线检测到的崩溃和不一致性。我们进一步验证了我们提出的覆盖准则和测试Oracle在评估中的有用性。

0
下载
关闭预览

相关内容

信息检索杂志(IR)为信息检索的广泛领域中的理论、算法分析和实验的发布提供了一个国际论坛。感兴趣的主题包括对应用程序(例如Web,社交和流媒体,推荐系统和文本档案)的搜索、索引、分析和评估。这包括对搜索中人为因素的研究、桥接人工智能和信息检索以及特定领域的搜索应用程序。 官网地址:https://dblp.uni-trier.de/db/journals/ir/
【2022新书】高效深度学习,Efficient Deep Learning Book
专知会员服务
114+阅读 · 2022年4月21日
【陈天奇】TVM:端到端自动深度学习编译器,244页ppt
专知会员服务
85+阅读 · 2020年5月11日
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
143+阅读 · 2019年10月12日
[综述]深度学习下的场景文本检测与识别
专知会员服务
77+阅读 · 2019年10月10日
【SIGGRAPH2019】TensorFlow 2.0深度学习计算机图形学应用
专知会员服务
39+阅读 · 2019年10月9日
强化学习的Unsupervised Meta-Learning
CreateAMind
17+阅读 · 2019年1月7日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
【推荐】RNN最新研究进展综述
机器学习研究会
25+阅读 · 2018年1月6日
【论文】变分推断(Variational inference)的总结
机器学习研究会
39+阅读 · 2017年11月16日
【推荐】用Tensorflow理解LSTM
机器学习研究会
36+阅读 · 2017年9月11日
【推荐】RNN/LSTM时序预测
机器学习研究会
25+阅读 · 2017年9月8日
【推荐】深度学习思维导图
机器学习研究会
15+阅读 · 2017年8月20日
【推荐】图像分类必读开创性论文汇总
机器学习研究会
14+阅读 · 2017年8月15日
强化学习族谱
CreateAMind
26+阅读 · 2017年8月2日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
Arxiv
35+阅读 · 2021年8月2日
Arxiv
11+阅读 · 2021年3月25日
Arxiv
32+阅读 · 2021年3月8日
Arxiv
14+阅读 · 2020年2月6日
Deep Anomaly Detection with Outlier Exposure
Arxiv
17+阅读 · 2018年12月21日
VIP会员
相关资讯
强化学习的Unsupervised Meta-Learning
CreateAMind
17+阅读 · 2019年1月7日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
【推荐】RNN最新研究进展综述
机器学习研究会
25+阅读 · 2018年1月6日
【论文】变分推断(Variational inference)的总结
机器学习研究会
39+阅读 · 2017年11月16日
【推荐】用Tensorflow理解LSTM
机器学习研究会
36+阅读 · 2017年9月11日
【推荐】RNN/LSTM时序预测
机器学习研究会
25+阅读 · 2017年9月8日
【推荐】深度学习思维导图
机器学习研究会
15+阅读 · 2017年8月20日
【推荐】图像分类必读开创性论文汇总
机器学习研究会
14+阅读 · 2017年8月15日
强化学习族谱
CreateAMind
26+阅读 · 2017年8月2日
相关基金
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
Top
微信扫码咨询专知VIP会员