Abstract
Python is a popular, dynamic language for data science and scientific computing. To ensure efficiency, significant numerical libraries are implemented in static native languages. However, performance suffers when switching between native and non-native code, especially if data has to be converted between native arrays and Python data structures. As GPU accelerators are increasingly used, this problem becomes particularly acute. Data and control has to be repeatedly transferred between the accelerator and the host.
In this paper, we present DelayRepay, a delayed execution framework for numeric Python programs. It avoids excessive switching and data transfer by using lazy evaluation and kernel fusion. Using DelayRepay, operations on NumPy arrays are executed lazily, allowing multiple calls to accelerator kernels to be fused together dynamically. DelayRepay is available as a drop-in replacement for existing Python libraries. This approach enables significant performance improvement over the state-of-the-art and is invisible to the application programmer. We show that our approach provides a maximum 377× speedup over NumPy - a 409% increase over the state of the art.
In this paper, we present DelayRepay, a delayed execution framework for numeric Python programs. It avoids excessive switching and data transfer by using lazy evaluation and kernel fusion. Using DelayRepay, operations on NumPy arrays are executed lazily, allowing multiple calls to accelerator kernels to be fused together dynamically. DelayRepay is available as a drop-in replacement for existing Python libraries. This approach enables significant performance improvement over the state-of-the-art and is invisible to the application programmer. We show that our approach provides a maximum 377× speedup over NumPy - a 409% increase over the state of the art.
Original language | English |
---|---|
Title of host publication | Proceedings of the 16th ACM SIGPLAN International Symposiumon Dynamic Languages (DLS ’20), |
Publisher | ACM Association for Computing Machinery |
Number of pages | 14 |
Publication status | Accepted/In press - 21 Aug 2020 |
Event | 16th ACM SIGPLAN International Symposiumon Dynamic Languages - Chicago, United States Duration: 17 Nov 2020 → 17 Nov 2020 http://www.dynamic-languages-symposium.org/dls-20/ |
Conference
Conference | 16th ACM SIGPLAN International Symposiumon Dynamic Languages |
---|---|
Abbreviated title | DLS 2020 |
Country/Territory | United States |
City | Chicago |
Period | 17/11/20 → 17/11/20 |
Internet address |
Keywords / Materials (for Non-textual outputs)
- delayed evaluation
- code fusion
- dynamic compilation
- GPU