GPRat: Gaussian Process Regression with Asynchronous Tasks
Preprint
Abstract
Python is the de-facto language for software development in artificial intelligence (AI). Commonly used libraries, such as PyTorch and TensorFlow, rely on parallelization built into their BLAS backends to achieve speedup on CPUs. However, only applying parallelization in a low-level backend can lead to performance and scaling degradation. In this work, we present a novel way of binding task-based C++ code built on the asynchronous runtime model HPX to a high-level Python API using pybind11. We develop a parallel Gaussian process (GP) li- brary as an application. The resulting Python library GPRat combines the ease of use of commonly available GP libraries with the performance and scalability of asynchronous runtime systems. We evaluate the per- formance on a mass-spring-damper system, a standard benchmark from control theory, for varying numbers of regressors (features). The results show almost no binding overhead when binding the asynchronous HPX code using pybind11. Compared to GPyTorch and GPflow, GPRat shows superior scaling on up to 64 cores on an AMD EPYC 7742 CPU for train- ing. Furthermore, our library achieves a prediction speedup of 7.63 over GPyTorch and 25.25 over GPflow. If we increase the number of features from eight to 128, we observe speedups of 29.62 and 21.19, respectively. These results showcase the potential of using asynchronous tasks within Python-based AI applications.Keywords
All Related Versions
This publication has 14 references indexed in Scilit:
- Scalability of Gaussian Processes Using Asynchronous Tasks: A Comparison Between HPX and PETSc2023
- Shared Memory Parallelism in Modern C++ and HPX2023
- PyAlbany: A Python interface to the C++ multiphysics solver AlbanyJournal of Computational and Applied Mathematics, 2022
- Asynchronous Execution of Python Code on Task-Based Runtime Systems2018
- A taxonomy of task-based parallel programming technologies for high-performance computingThe Journal of Supercomputing, 2018
- Gaussian Processes for Data-Efficient Learning in Robotics and ControlIEEE Transactions on Pattern Analysis and Machine Intelligence, 2015
- Python: An Ecosystem for Scientific ComputingComputing in Science & Engineering, 2010
- A class of parallel tiled linear algebra algorithms for multicore architecturesParallel Computing, 2009
- Scheduling multithreaded computations by work stealingJournal of the ACM, 1999
- OpenMP: an industry standard API for shared-memory programmingIEEE Computational Science and Engineering, 1998