Compilers are essential for the performance and correct execution of software and hold universal relevance across various scientific disciplines. Despite this, there is a notable lack of tools for testing and evaluating them, especially within the adaptable Multi-Level Intermediate Representation (MLIR) context. This paper addresses the need for a tool that can accommodate MLIR's extensibility, a feature not provided by previous methods such as Csmith. Here we introduce MLIR-Smith, a novel random program generator specifically designed to test and evaluate MLIR-based compiler optimizations. We demonstrate the utility of MLIR-Smith by conducting differential testing on MLIR, LLVM, DaCe, and DCIR, which led to the discovery of multiple bugs in these compiler pipelines. The introduction of MLIR-Smith not only fills a void in the realm of compiler testing but also emphasizes the importance of comprehensive testing within these systems. By providing a tool that can generate random MLIR programs, this paper enhances our ability to evaluate and improve compilers and paves the way for future tools, potentially shaping the wider landscape of software testing and quality assurance.


翻译:编译器对于软件的性能与正确执行至关重要,在众多科学领域具有普遍意义。尽管如此,目前仍显著缺乏用于测试和评估编译器的工具,尤其是在灵活的多级中间表示(MLIR)框架内。本文针对一种能够适应MLIR可扩展性需求的工具进行了研究,而先前的工具(如Csmith)未能提供此特性。在此,我们介绍MLIR-Smith,这是一种专门设计用于测试和评估基于MLIR的编译器优化的新型随机程序生成器。我们通过对MLIR、LLVM、DaCe和DCIR进行差分测试,展示了MLIR-Smith的实用性,并借此发现了这些编译器流水线中的多个错误。MLIR-Smith的推出不仅填补了编译器测试领域的空白,还强调了在这些系统中进行全面测试的重要性。通过提供一种能够生成随机MLIR程序的工具,本文增强了我们评估和改进编译器的能力,并为未来工具的研发铺平了道路,有望对更广泛的软件测试与质量保障领域产生深远影响。

0
下载
关闭预览

相关内容

编译器(Compiler),是一种计算机程序,它会将用某种编程语言写成的源代码(原始语言),转换成另一种编程语言(目标语言)。
AAAI 2022 | ProtGNN:自解释图神经网络
专知
10+阅读 · 2022年2月28日
【NeurIPS2019】图变换网络:Graph Transformer Network
Single-Shot Object Detection with Enriched Semantics
统计学习与视觉计算组
14+阅读 · 2018年8月29日
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2016年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
相关资讯
相关基金
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2016年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员