Skip to content

SC-SGS/GPRat

Repository files navigation

GPRat is an open-source library for Gaussian Process Regression. Leveraging the asynchronous many-task runtime HPX, we aim to combine the performance of asynchronous parallelism in C++ with the ease of use of commonly available Python libraries. Thus, GPRat can be conveniently integrated into Python projects without binding overheads or used directly with pure C++ code.

Dependencies

GPRat depends on HPX for asynchronous task-based parallelization. Furthermore, for CPU-only BLAS computation GPRat requires OpenBLAS or MKL. A CUDA installation is required for GPU-only BLAS computations.

Install dependencies

All dependencies can be installed using Spack. A script to install and setup spack for GPRat is provided in spack-repo. Spack environment configurations and setup scripts for CPU and GPU use are provided in spack-repo/environments.

How To Compile

GPRat makes use of CMake presets to simplify the process of configuring the project.

For example, building and testing this project on a Linux machine is as easy as running the following commands:

cmake --preset=dev-linux
cmake --build --preset=dev-linux
ctest --preset=dev-linux

As a developer, you may create a CMakeUserPresets.json file at the root of the project that contains additional presets local to your machine. In addition to the build configuration dev-linux, there are release-linux, dev-linux-gpu, and release-linux-gpu. The configurations suffixed with -gpu build the library with CUDA.

GPRat can be build with or without Python bindings. The following options can be set to include / exclude parts of the project:

Option name Description Default value
GPRAT_BUILD_CORE Enable/Disable building of the core library ON
GPRAT_BUILD_BINDINGS Enable/Disable building of the Python bindings ON
GPRAT_ENABLE_FORMAT_TARGETS Enable/Disable code formatting helper targets ON if top-level
GPRAT_ENABLE_EXAMPLES Enable/Disable example projects ON if top-level
GPRAT_USE_MKL Enable/Disable usage of MKL library OFF
GPRAT_WITH_CUDA Enable/disable compilation with CUDA support OFF

Respective scripts can be found in this directory.

We also provide a spack package for GPRat in spack-repo/packages for portable and convenient compilation. When the repository is added to spack, GPRat can be installed with spack install gprat~cuda~bindings~examples blas={mkl,openblas}

How To Run

GPRat contains several examples. One to run the C++ code, one to run the Python code as well as two reference implementations based on TensorFlow (GPflow) and PyTorch (GPyTorch).

To run the GPRat C++ code

  • Go to examples/gprat_cpp
  • Set parameters in execute.cpp
  • The example is built as part of the main project.
    • Go to build/ and execute ./gprat_cpp [--use_gpu] to run the example.
    • If you want to use an installed GPRat version: Run ./run_gprat_cpp.sh [cpu/gpu] [x86/arm/riscv] to build and run the example.

To run GPRat with Python

To run GPflow reference

To run GPflow reference

The Team

The GPRat library is developed by the Scientific Computing department at IPVS at the University of Stuttgart. The project is a joined effort of multiple undergraduate, graduate, and PhD students under the supervision of Prof. Dr. Dirk Pflüger. We specifically thank the follow contributors:

How To Cite

@InProceedings{GPRat2025,
  author={Helmann, Maksim and Strack, Alexander and Pfl{\"u}ger, Dirk},
  title={{GPRat: Gaussian Process Regression with Asynchronous Tasks}},
  booktitle={Asynchronous Many-Task Systems and Applications},
  year={2025},
  publisher={Springer Nature}
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 4

  •  
  •  
  •  
  •