Skip to content

About

An optimizing code generator for GPU simulations in the modern era.

Resources

Stars

5 stars

Watchers

3 watching

Forks

Repository files navigation

Einstein Engine

The Einstein Engine is a DSL and toolkit for creating Cactus thorns. It can generate complete CarpetX thorns from simple recipes written in Python.

How to set up EinsteinEngine:

  1. Ensure you have the minimum required Python version. Currently, this is 3.13.

  2. Create a venv and activate it.

    python -m venv venv && . ./venv/bin/activate
  3. Install the dependencies.

    python -m pip install -r requirements.txt
  4. Install EinsteinEngine.

    python -m pip install .
  5. (Optional; recommended for development) Install repository git hooks for this clone.

    bash scripts/install-git-hooks.sh

How to generate a thorn:

  1. Be sure the venv is activated.

    . ./venv/bin/activate
  2. Typecheck the recipe with MyPy.

    mypy ./path/to/recipe.py
  3. Run the recipe.

    python ./path/to/recipe.py

Documentation:

  • Tuner quick-start: tune a recipe's parameters (e.g. its loop splits) with a checkpointed Bayesian search on a remote machine.
  • Equation ordering and split loci: how a function's equations are ordered during the bake, and where automatic splits cut it into loops.

Licensing and Attribution

If you use the Einstein Engine in your research, we ask that you cite this repository. When our paper is published, we will update this section accordingly.

Copyright © 2024-2026 Max Morris, Steven R. Brandt, and other Einstein Engine contributors.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

About

An optimizing code generator for GPU simulations in the modern era.

Resources

Stars

5 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages