Work-in-progress probabilistic programming language for use with GenTL, building on LibTorch.
Documentation (work-in-progress)
For example, either clang++-13 or g++-11.
NOTE: The multi-threaded supervised learning function in GenTL currently requires a C++20 feature, which is implemented in gcc
version 11 and above and clang
version 11 and above.
See Installing CMake
This library depends on the C++ distribution of PyTorch, called libtorch.
So far, the code has only been tested with the CPU-version of libtorch (version 1.9.1+cpu).
Follow instructions at Installing C++ distributions of PyTorch to install LibTorch, and record the absolute path to the resulting libtorch
directory on your filesystem.
This is only required for generating documentation.
See Doxygen Installation.
Currently this project builds a static library, tests, and documentation.
To build, either open the GenTorch
directory in a C++ IDE (e.g. https://www.jetbrains.com/clion/) or use cmake
directly.
In either case, you need to add an option -DCMAKE_PREFIX_PATH=/absolute/path/to/libtorch
when configuring cmake.
To configure:
cmake -S . -B build -DCMAKE_PREFIX_PATH=/absolute/path/to/libtorch
To build:
cmake --build build
To run tests:
cmake --build build --target test
To build documentation:
cmake --build build --target docs
Gen: A General-Purpose Probabilistic Programming System with Programmable Inference. Cusumano-Towner, M. F.; Saad, F. A.; Lew, A.; and Mansinghka, V. K. In Proceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ‘19). (pdf) (bibtex)
Marco Cusumano-Towner's PhD thesis.