Lune

ISSTA2023Top-tier venue

GenCoG: A DSL-Based Approach to Generating Computation Graphs for TVM Testing

Zihan Wang, Pengbo Nie, Xinyuan Miao, Yuting Chen, Chengcheng Wan, Lei Bu, Jianjun Zhao

Abstract

TVM is a popular deep learning (DL) compiler. It is designed for compiling DL models, which are naturally computation graphs, and as well promoting the efficiency of DL computation. State-ofthe-art methods, such as Muffin and NNSmith, allow developers to generate computation graphs for testing DL compilers. However, these techniques are inefficient -their generated computation graphs are either type-invalid or inexpressive, and hence not able to test the core functionalities of a DL compiler.

To tackle this problem, we propose GenCoG, a DSL-based approach to generating computation graphs for TVM testing. GenCoG is composed of (1) GenCoGL, a domain-specific language for specifying type constraints of operators, and (2) an approach that concolically solves type constraints and incrementally generates computation graphs of high expressivity. We implement and evaluate GenCoG on TVM releases. Our results show that GenCoG is effective in generating valid and expressive computation graphs -all of the GenCoG-generated graphs pass type checking, a critical graph validation stage; letting the graphs' expressivity be measured by their vertex and edge diversities, GenCoG outperforms state-ofthe-arts by achieving 1.65 6.93× in vertex diversity and 1.06 7.08× in edge diversity, respectively. Furthermore, GenCoG has detected 16 bugs in TVM v0.8 and v0.9, with 14 confirmed and 12 fixed.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

5 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Free Lunch for Testing: Fuzzing Deep-Learning Libraries from Open Source cites Deep learning library testing via effective model generation
  • Optimization-Aware Test Generation for Deep Learning Compilers cites A comprehensive study of deep learning compiler bugs
  • Optimization-Aware Test Generation for Deep Learning Compilers cites NNSmith: Generating Diverse and Valid Test Cases for Deep Learning Compilers
  • NNSmith: Generating Diverse and Valid Test Cases for Deep Learning Compilers cites Free Lunch for Testing: Fuzzing Deep-Learning Libraries from Open Source
  • NNSmith: Generating Diverse and Valid Test Cases for Deep Learning Compilers cites Deep learning library testing via effective model generation
  • TensorJSFuzz: Effective Testing of Web-Based Deep Learning Frameworks via Input-Constraint Extraction cites Free Lunch for Testing: Fuzzing Deep-Learning Libraries from Open Source
  • TensorJSFuzz: Effective Testing of Web-Based Deep Learning Frameworks via Input-Constraint Extraction cites NNSmith: Generating Diverse and Valid Test Cases for Deep Learning Compilers
  • Productively Deploying Emerging Models on Emerging Platforms: A Top-Down Approach for Testing and Debugging cites Free Lunch for Testing: Fuzzing Deep-Learning Libraries from Open Source
  • Productively Deploying Emerging Models on Emerging Platforms: A Top-Down Approach for Testing and Debugging cites NNSmith: Generating Diverse and Valid Test Cases for Deep Learning Compilers
  • Your Compiler is Backdooring Your Model: Understanding and Exploiting Compilation Inconsistency Vulnerabilities in Deep Learning Compilers cites NNSmith: Generating Diverse and Valid Test Cases for Deep Learning Compilers
  • Are LLMs Correctly Integrated into Software Systems? cites NNSmith: Generating Diverse and Valid Test Cases for Deep Learning Compilers
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers5

  1. Your Compiler is Backdooring Your Model: Understanding and Exploiting Compilation Inconsistency Vulnerabilities in Deep Learning CompilersSimin Chen, Jinjun Peng, Yixin He, Junfeng Yang et al.S&P 2026 · 11 citations
  2. Are LLMs Correctly Integrated into Software Systems?Yuchen Shao, Yuheng Huang, Jiawei Shen, Lei Ma et al.ICSE 2025 · 4 citations
  3. Optimization-Aware Test Generation for Deep Learning CompilersQingchao Shen, Zan Wang, Haoyang Ma, Yongqiang Tian et al.ICSE 2026
  4. TensorJSFuzz: Effective Testing of Web-Based Deep Learning Frameworks via Input-Constraint ExtractionLili Quan, Xiaofei Xie, Qianyu Guo, Lingxiao Jiang et al.WWW 2025
  5. Productively Deploying Emerging Models on Emerging Platforms: A Top-Down Approach for Testing and DebuggingSiyuan Feng, Jiawei Liu, Ruihang Lai, Charlie Ruan et al.ISSTA 2025

Builds on14

  1. DNNFusion: accelerating deep neural networks execution with advanced operator fusionWei Niu, Jiexiong Guan, Yanzhi Wang, Gagan Agrawal et al.PLDI 2021 · 166 citations
  2. Deep learning library testing via effective model generationZan Wang, Ming Yan, Junjie Chen, Shuang Liu et al.FSE 2020 · 165 citations
  3. A comprehensive study of deep learning compiler bugsQingchao Shen, Haoyang Ma, Junjie Chen, Yongqiang Tian et al.FSE 2021 · 123 citations
  4. Free Lunch for Testing: Fuzzing Deep-Learning Libraries from Open SourceAnjiang Wei, Yinlin Deng, Chenyuan Yang, Lingming ZhangICSE 2022 · 91 citations
  5. NNSmith: Generating Diverse and Valid Test Cases for Deep Learning CompilersJiawei Liu, Jinkun Lin, Fabian Ruffy, Cheng Tan et al.ASPLOS 2023 · 90 citations

Related papers

  1. Fuzzing Deep Learning Compilers with HirGenHaoyang Ma, Qingchao Shen, Yongqiang Tian, Junjie Chen et al.ISSTA 2023 · 24 citations
  2. Coverage-guided tensor compiler fuzzing with joint IR-pass mutationJiawei Liu, Yuxiang Wei, Sen Yang, Yinlin Deng et al.OOPSLA 2022 · 50 citations
  3. MLIRSmith: Random Program Generation for Fuzzing MLIR Compiler InfrastructureHaoyu Wang, Junjie Chen, Chuyue Xie, Shuang Liu et al.ASE 2023 · 16 citations
  4. A Tale of Two DL Cities: When Library Tests Meet CompilerQingchao Shen, Yongqiang Tian, Haoyang Ma, Junjie Chen et al.ICSE 2025 · 4 citations
  5. Neural architecture search as program transformation explorationJack Turner, Elliot J. Crowley, Michael F. P. O'BoyleASPLOS 2021 · 13 citations
Dusk over the sea between two cliffs drawn in fine vertical lines