arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2202.09947cs.SEcs.CRcs.LGcs.PL
收藏

基于覆盖率引导的联合IR通道变异张量模糊算法

Coverage-Guided Tensor Compiler Fuzzing with Joint IR-Pass Mutation

University of Illinois at Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校);Tongji University(同济大学);Fudan University(复旦大学)

Jiawei Liu, Yuxiang Wei, Sen Yang, Yinlin Deng, Lingming Zhang

摘要:

在过去的十年中,深度学习(DL)系统已被广泛部署在各个领域,以方便我们的日常生活。与此同时,确保DL系统的正确性(例如,由于其固有的不确定性),并且DL系统中的错误可能导致严重的后果,甚至可能威胁人类生命。在文献中,研究人员已经探索了各种技术来测试,分析和验证DL模型,因为它们的质量直接影响相应的系统行为。最近,研究人员还提出了用于测试底层操作符级DL库(如TensorFlow和PyTorch)的新技术,这些库为每个高级DL操作符提供了通用的二进制实现,以便在许多平台上运行各种DL模型。然而,针对新兴张量编译器的可靠性的工作仍然有限,这些编译器旨在直接将高级张量计算图编译为高性能二进制文件,以提高效率,可移植性和可扩展性。本文针对张量编译器测试这一重要问题,提出了一种实用的模糊测试技术Tzer,用于广泛使用的TVM张量编译器。由于高级中间表示(IR)的变异空间有限,Tzer专注于对TVM的低级IR进行变异。更具体地说,Tzer利用覆盖反馈指导的通用和张量编译器特定的变异器进行进化IR变异;此外,Tzer还与IR变异串联执行传递变异,以实现更有效的模糊化。我们的研究结果表明,Tzer在张量编译器测试方面大大优于现有的模糊技术,覆盖率比第二好的技术高75%,测试价值高50%。到目前为止,Tzer已经检测到49个TVM以前未知的bug,其中37个bug得到确认,25个bug得到修复(PR合并)。

英文摘要:

In the past decade, Deep Learning (DL) systems have been widely deployed in various domains to facilitate our daily life. Meanwhile, it is extremely challenging to ensure the correctness of DL systems (e.g., due to their intrinsic nondeterminism), and bugs in DL systems can cause serious consequences and may even threaten human lives. In the literature, researchers have explored various techniques to test, analyze, and verify DL models, since their quality directly affects the corresponding system behaviors. Recently, researchers have also proposed novel techniques for testing the underlying operator-level DL libraries (such as TensorFlow and PyTorch), which provide general binary implementations for each high-level DL operator for running various DL models on many platforms. However, there is still limited work targeting the reliability of the emerging tensor compilers, which aim to directly compile high-level tensor computation graphs into high-performance binaries for better efficiency, portability, and scalability. In this paper, we target the important problem of tensor compiler testing, and have proposed Tzer, a practical fuzzing technique for the widely used TVM tensor compiler. Tzer focuses on mutating the low-level Intermediate Representation (IR) for TVM due to the limited mutation space for the high-level IR. More specifically, Tzer leverages both general-purpose and tensor-compiler-specific mutators guided by coverage feedback for evolutionary IR mutation; furthermore, Tzer also performs pass mutation in tandem with IR mutation for more effective fuzzing. Our results show that Tzer substantially outperforms existing fuzzing techniques on tensor compiler testing, with 75% higher coverage and 50% more valuable tests than the 2nd-best technique. To date, Tzer has detected 49 previously unknown bugs for TVM, with 37 bugs confirmed and 25 bugs fixed (PR merged).

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

↑