A Tale of Two DL Cities: When Library Tests Meet Compiler
Authors:
- 26 April 2025
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 2201-2212
Abstract
Deep Learning (DL) compilers typically load a DL model and optimize it with intermediate representation. Existing DL compiler testing techniques mainly focus on model optimization stages, but rarely explore bug detection at the model loading stage. Effectively testing the model loading stage requires covering diverse usages of each DL operator from various DL libraries, which shares a common objective with DL library testing, indicating that the embedded knowledge in DL library tests is beneficial for testing the model loading stage of DL compilers. With this idea, we propose Opera to migrate the knowledge embedded in DL library tests to test the model loading stage. Opera constructs diverse tests from various tests for DL libraries (including the tests documented in DL libraries and those generated by recent fuzzers). In total, we considered three sources of tests in DL libraries for migration. In addition, it incorporates a diversity-based test prioritization strategy to migrate and execute those tests that are more likely to detect diverse bugs earlier. We then used eight frontends from three DL compilers (e.g., TVM, TensorRT, and OpenVINO) for evaluation. OPERA detected 170 previously unknown bugs in total, 90 of which have been confirmed/fixed by developers, demonstrating the effectiveness of such the migration-based idea. The test prioritization strategy in OPERA improves testing efficiency with migrated tests by $11.9 \% \sim 47.4 \%$ on average compared to general test prioritization strategies.
Keywords
All Related Versions
Funding Information
- National Natural Science Foundation of China (62322208,12411530122,62232001)
This publication has 48 references indexed in Scilit:
- JITfuzz: Coverage-guided Fuzzing for JVM Just-in-Time Compilers2023
- Fuzzing Automatic Differentiation in Deep-Learning Libraries2023
- UI Test Migration Across Mobile Platforms2021
- Prioritizing Test Inputs for Deep Neural Networks via Mutation Analysis2021
- An empirical study of optimization bugs in GCC and LLVMJournal of Systems and Software, 2021
- Test Migration Between Mobile Apps with Similar Functionality2019
- CRADLE: Cross-Backend Validation to Detect and Localize Bugs in Deep Learning Libraries2019
- A Survey on Regression Test-Case Prioritization2019
- Prioritizing test cases for regression testingIEEE Transactions on Software Engineering, 2001
- The Analysis of HeapsortJournal of Algorithms, 1993