HARP: holistic analysis for refactoring Python-based analytics programs
Weijie Zhou, Yue Zhao, Guoqiang Zhang, Xipeng Shen
摘要
Modern machine learning programs are often written in Python, with the main computations specified through calls to some highly optimized libraries (e.g., TensorFlow, PyTorch). How to maximize the computing efficiency of such programs is essential for many application domains, which has drawn lots of recent attention. This work points out a common limitation in existing efforts: they focus their views only on the static computation graphs specified by library APIs, but leave the influence from the hosting Python code largely unconsidered. The limitation often causes them to miss the big picture and hence many important optimization opportunities. This work proposes a new approach named HARP to address the problem. HARP enables holistic analysis that spans across computation graphs and their hosting Python code. HARP achieves it through a set of novel techniques: analytics-conscious speculative analysis to circumvent Python complexities, a unified representation augmented computation graphs to capture all dimensions of knowledge related with the holistic analysis, and conditioned feedback mechanism to allow risk-controlled aggressive analysis. Refactoring based on HARP gives 1.3--3X and 2.07X average speedups on a set of TensorFlow and PyTorch programs.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 3 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
引用它的顶会 Paper3
- Toward efficient interactions between Python and native librariesJialiang Tan, Yu Chen, Zhenming Liu, Bin Ren 等FSE 2021 · 10 次引用
- Speculative Automated Refactoring of Imperative Deep Learning Programs to Graph ExecutionRaffi Khatchadourian, Tatiana Castro Vélez, Mehdi Bagherzadeh, Nan Jia 等ASE 2025 · 1 次引用
- From Code Changes to Quality Gains: An Empirical Study in Python ML Systems with PyQuMohamed Almukhtar, Anwar Ghammam, Marouane Kessentini, Hua MingICSE 2026
相关 Paper
- MAGPY: Compiling Eager Mode DNN Programs by Monitoring Execution StatesChen Zhang, Rongchao Dong, Haojie Wang, Runxin Zhong 等USENIX ATC 2024 · 5 次引用
- DynaPyt: a dynamic analysis framework for PythonAryaz Eghbali, Michael PradelFSE 2022 · 30 次引用
- Discovering Parallelisms in Python ProgramsSiwei Wei, Guyang Song, Senlin Zhu, Ruoyi Ruan 等FSE 2023 · 1 次引用
- PyGlove: Symbolic Programming for Automated Machine LearningDaiyi Peng, Xuanyi Dong, Esteban Real, Mingxing Tan 等NeurIPS 2020 · 35 次引用
- Heron: Automatically Constrained High-Performance Library Generation for Deep Learning AcceleratorsJun Bi, Qi Guo, Xiaqing Li, Yongwei Zhao 等ASPLOS 2023 · 30 次引用
