DrPy: Pinpointing Inefficient Memory Usage in Multi-Layer Python Applications
Python has become an increasingly popular programming language, especially in the areas of data analytics and machine learning. Many modern Python packages employ a multi-layer design: the Python layer manages various packages and expresses high-level algorithms; the native layer is written in C/C++/Fortran/CUDA for efficient computation. Typically, each layer manages its own computation and memory and exposes APIs for cross-layer interactions. Without holistic optimization, performance inefficiencies can exist at the boundary between layers.
In this paper, we develop DrPy, a novel profiler that pinpoints such memory inefficiencies across layers in Python applications. Unlike existing tools, DrPy takes a hybrid and fine-grained approach to track memory objects and their usage in both Python and native layers. DrPy correlates the behavior of memory objects across layers and builds an object flow graph to pinpoint memory inefficiencies. In addition, DrPy captures rich information associated with object flow graphs, such as call paths and source code attribution to guide intuitive code optimization. Guided by DrPy, we are able to optimize many Python applications with non-trivial performance improvement. Many optimization patches have been validated by the application developers and committed to the application repositories.
Tue 5 MarDisplayed time zone: London change
11:30 - 12:50 | |||
11:30 20mTalk | Compile-Time Analysis of Compiler Frameworks for Query Compilation Main Conference Pre-print | ||
11:50 20mTalk | DrPy: Pinpointing Inefficient Memory Usage in Multi-Layer Python Applications Main Conference Jinku Cui North Carolina State University, Qidong Zhao North Carolina State University, Yueming Hao North Carolina State University, Xu Liu North Carolina State University | ||
12:10 20mTalk | SCHEMATIC: Compile-Time Checkpoint Placement and Memory Allocation for Intermittent Systems Main Conference Hugo Reymond Université de Rennes - Inria - CNRS - IRISA, Jean-Luc Béchennec Nantes Université - École Centrale Nantes - CNRS - LS2N - UMR 6004, Mikaël Briday Nantes Université - École Centrale Nantes - CNRS - LS2N - UMR 6004, Sébastien Faucou Nantes Université - École Centrale Nantes - CNRS - LS2N - UMR 6004, Isabelle Puaut Université de Rennes - Inria - CNRS - IRISA, Erven Rohou Université de Rennes - Inria - CNRS - IRISA Pre-print Media Attached | ||
12:30 20mTalk | Latent Idiom Recognition for a Minimalist Functional Array Language using Equality Saturation Main Conference Pre-print |