Deep learning compilers help address difficulties of deploying deep learning models on diverse types of hardware. Testing deep learning compilers is highly crucial, because they are impacting countless AI applications that use them for model optimization and deployment. To test deep learning compilers, random testing, being popularly used for compiler testing practices, faces the challenge of generating semantically valid test inputs, i.e., deep learning models that satisfy the semantic model specifications (in short as semantic specifications). To tackle this challenge, in this paper, we propose a novel approach named Isra, including a domain-specific constraint solver that resolves the constraints from the semantic specifications without backtracking. We implement and apply our approach on three popular real-world deep learning compilers including TVM, Glow, and a commercial compiler. The evaluation results show that Isra is more effective than the state-of-the-art approaches and the baseline approaches on constructing valid test inputs for compiler-bug detection, and Isra successfully finds 24 previously unknown bugs in released versions of the three compilers. These results indicate effectiveness and practical value of Isra.
翻译:深层学习编纂者帮助解决在各类硬件上部署深层次学习模型的困难。 深层学习编纂者测试非常关键,因为它们影响到无数使用这些模型进行模型优化和部署的人工智能应用程序。 要测试深层学习编纂者,随机测试,并广泛用于编译者测试做法,则面临生成符合语义模型规格(简称语义规格)的精深学习模型(即深层学习模型);为了应对这一挑战,我们在本文件中提议采用名为Isra的新颖方法,包括一个特定域的制约解答器,解决来自语义学规格的制约因素,而不进行回溯跟踪。我们实施和运用了我们的方法,在三个广受欢迎的真实世界深层汇编者,包括TVM、Glow和一个商业编译者。 评价结果显示,Isra比最先进的方法和为编译者检测构建有效测试投入的基线方法更有效,Isra成功地在三个编译者版本中发现了24个以前未知的错误。这些结果表明Isra的有效性和实用价值。