GPRat utilizes three external libraries:
- HPX for asynchronous task-based parallelization
- MKL for CPU-only BLAS computations
- CUDA for GPU-only BLAS computations
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
.
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 |
Respective scripts can be found in this directory.
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).
- 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
to build and run the example.
- Go to
- Go to
examples/gprat_python
- Set parameters in
config.json
- Run
./run_gprat_python.sh [--use_gpu]
to run the example
- Go to
examples/gpflow_reference
- Set parameters in
config.json
- Run
./run_gpflow.sh cpu/gpu
to run example
- Go to
examples/gpytorch_reference
- Set parameters in
config.json
- Run
./run_gpytorch.sh cpu/gpu
to run example
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:
-
Alexander Strack: Maintainer and initial framework.
-
Maksim Helmann: Optimization, Python bindings and reference implementations.
TBD.