A Tale of Two DL Cities: When Library Tests Meet Compiler

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Shen, Qingchao, Tian, Yongqiang, Ma, Haoyang, Chen, Junjie, Huang, Lili, Fu, Ruifeng, Cheung, Shing-Chi, Wang, Zan
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866913468037201920
author Shen, Qingchao
Tian, Yongqiang
Ma, Haoyang
Chen, Junjie
Huang, Lili
Fu, Ruifeng
Cheung, Shing-Chi
Wang, Zan
author_facet Shen, Qingchao
Tian, Yongqiang
Ma, Haoyang
Chen, Junjie
Huang, Lili
Fu, Ruifeng
Cheung, Shing-Chi
Wang, Zan
contents 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. In this work, we propose OPERA to extract such domain knowledge from the test inputs for DL libraries. OPERA constructs diverse tests from the various test inputs for DL libraries (including the test inputs documented in DL libraries and those generated by recent fuzzers). In addition, it incorporates a diversity-based test prioritization strategy to migrate and execute those test inputs that are more likely to detect diverse bugs earlier. We considered three sources of tests in DL libraries for migration and 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%~47.4% on average compared to general test prioritization strategies.
format Preprint
id arxiv_https___arxiv_org_abs_2407_16626
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle A Tale of Two DL Cities: When Library Tests Meet Compiler
Shen, Qingchao
Tian, Yongqiang
Ma, Haoyang
Chen, Junjie
Huang, Lili
Fu, Ruifeng
Cheung, Shing-Chi
Wang, Zan
Software Engineering
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. In this work, we propose OPERA to extract such domain knowledge from the test inputs for DL libraries. OPERA constructs diverse tests from the various test inputs for DL libraries (including the test inputs documented in DL libraries and those generated by recent fuzzers). In addition, it incorporates a diversity-based test prioritization strategy to migrate and execute those test inputs that are more likely to detect diverse bugs earlier. We considered three sources of tests in DL libraries for migration and 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%~47.4% on average compared to general test prioritization strategies.
title A Tale of Two DL Cities: When Library Tests Meet Compiler
topic Software Engineering
url https://arxiv.org/abs/2407.16626