arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2203.06233cs.DC
收藏

面向分布式异构计算的Python程序自动并行化

Automatic Parallelization of Python Programs for Distributed Heterogeneous Computing

Jun Shirako, Akihiro Hayashi, Sri Raj Paul, Alexey Tumanov, Vivek Sarkar

摘要:

本文介绍了一种新的方法来自动提前(AOT)并行化和优化的顺序Python程序在分布式异构平台上执行。我们的方法支持Python程序的AOT源到源转换,由包含函数参数和返回值的类型提示驱动。这些提示可以由程序员提供,也可以通过动态分析器工具获得;多版本代码生成保证了AOT转换在所有情况下的正确性。我们的编译框架执行自动并行化和复杂的高级代码优化的目标分布式异构硬件平台。它包括对多面体框架的扩展,统一了矩阵/张量运算符中的用户编写的循环和隐式循环,以及CPU与GPU代码变体的自动化部分。此外,我们的多面体优化使节点内和节点间的并行。最后,使用Ray运行时部署优化的输出代码,以跨集群中的多个异构节点调度分布式任务。我们的经验评估显示,在单节点和多节点实验中,相对于顺序Python,性能有了显著的提高,当在OLCF Summit超级计算机中使用24个节点和144个GPU进行空时自适应处理(STAP)雷达应用时,性能提高了20,000多$\times$。

英文摘要:

This paper introduces a novel approach to automatic ahead-of-time (AOT) parallelization and optimization of sequential Python programs for execution on distributed heterogeneous platforms. Our approach enables AOT source-to-source transformation of Python programs, driven by the inclusion of type hints for function parameters and return values. These hints can be supplied by the programmer or obtained by dynamic profiler tools; multi-version code generation guarantees the correctness of our AOT transformation in all cases. Our compilation framework performs automatic parallelization and sophisticated high-level code optimizations for the target distributed heterogeneous hardware platform. It includes extensions to the polyhedral framework that unify user-written loops and implicit loops present in matrix/tensor operators, as well as automated section of CPU vs. GPU code variants. Further, our polyhedral optimizations enable both intra-node and inter-node parallelism. Finally, the optimized output code is deployed using the Ray runtime for scheduling distributed tasks across multiple heterogeneous nodes in a cluster. Our empirical evaluation shows significant performance improvements relative to sequential Python in both single-node and multi-node experiments, with a performance improvement of over 20,000$\times$ when using 24 nodes and 144 GPUs in the OLCF Summit supercomputer for the Space-Time Adaptive Processing (STAP) radar application.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑