HirFuzz: Detecting High-Level Optimization Bugs in DL Compilers via Computational Graph Generation

08/03/2022
by   Haoyang Ma, et al.
0

Deep Learning (DL) compilers are widely adopted to optimize advanced DL models for efficient deployment at diverse hardware. However, the optimization of high-level intermediate representation (IR) is found to be error-prone. Testing the implementation of high-level optimization is challenging. First, generating high-level IRs that conform to the integrity constraints required by high-level optimization is non-trivial. Non-conforming IRs are readily rejected by DL compilers before entering the optimization stage, and therefore these IRs are not useful to detect bugs at the stage. Second, it is challenging to expose high-level optimization bugs that does not result in crashes. To address the challenges, we propose HIRFuzz, a fuzzing technique that aims to reveal bugs occurring at the optimization of high-level IR in DL compilers. HIRFuzz generates computational graphs, which are then converted to their underlying high-level IRs for optimization. To reveal high-level optimization bugs, the computational graphs are so generated to explore possible combinations of data types, tensor shapes and operators while conforming to the IR's integrity constraints. In addition, novel test oracles are designed to detect bugs occurring at high-level optimization. HIRFuzz has successfully detected 24 new high-level optimization bugs that occur at TVM, with 19 bugs confirmed and 14 fixed. Furthermore, our experiment results show that HIRFuzz outperforms the state-of-the-art DL compiler fuzzers that can cover high-level optimization stage. Specifically, HIRFuzz found 12 more bugs than the second best fuzzer within the same time budget.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
04/17/2019

Relay: A High-Level IR for Deep Learning

Frameworks for writing, compiling, and optimizing deep learning (DL) mod...
research
05/29/2023

ACETest: Automated Constraint Extraction for Testing Deep Learning Operators

Deep learning (DL) applications are prevalent nowadays as they can help ...
research
04/19/2022

Muffin: Testing Deep Learning Libraries via Neural Architecture Fuzzing

Deep learning (DL) techniques are proven effective in many challenging t...
research
08/02/2022

MEMO: Coverage-guided Model Generation For Deep Learning Library Testing

Recent deep learning (DL) applications are mostly built on top of DL lib...
research
04/17/2019

Relay: A High-Level Compiler for Deep Learning

Frameworks for writing, compiling, and optimizing deep learning (DL) mod...
research
12/03/2021

Characterizing Performance Bugs in Deep Learning Systems

Deep learning (DL) has been increasingly applied to a variety of domains...
research
06/17/2022

GDsmith: Detecting Bugs in Graph Database Engines

Graph database engines stand out in the era of big data for their effici...

Please sign up or login with your details

Forgot password? Click here to reset