![]() |
Sleipnir
A linearity-exploiting reverse mode autodiff library and nonlinear program solver DSL.
|
Sleipnir is a reverse mode autodiff library, interior-point method, and NLP solver DSL for C++23 and Python. The DSL automatically chooses the best solver based on the problem structure.
Sleipnir supports easy cross-compilation via CMake toolchain files, provides good performance by default, and contains clean reference implementations of various solvers with links to explanatory material.
The C++ API also supports arbitrary scalar types, so users can specify higher precision floating-point types at the cost of speed.
The following platforms are supported:
sudo apt install g++-14)xcode-select --install)To use Sleipnir within a CMake project, add the following to CMakeLists.txt:
To use Sleipnir in Python, install sleipnirgroup-jormungandr from PyPI:
If necessary, follow these instructions to build from source.
See the C++ API docs, Python API docs, and usage docs.
See the examples folder, C++ optimization unit tests, and Python optimization unit tests.
See the benchmarks folder.