DrPy: Pinpointing Inefficient Memory Usage in Multi-Layer Python Applications.

IEEE/ACM International Symposium on Code Generation and Optimization(2024)

引用 0|浏览1
暂无评分
摘要
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 application developers and committed to application repositories.
更多
查看译文
关键词
Inefficient,Memory Usage,Python Application,Application Programming Interface,Object Memory,PyTorch,Objective Data,Hash Function,Data Frame,Virtual Machines,Software Libraries,Caching,Python Code,Program Execution,Function Calls,Memory Operations,Tensor Elements,Constant Pattern,Memory Address,Scalene,Redundant Copies,Optimal Guidance,Reduce Memory Usage,Dereference
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要