Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Common Subexpression Elimination for Python, C++ #14

Merged
merged 36 commits into from Jun 29, 2023
Merged

Common Subexpression Elimination for Python, C++ #14

merged 36 commits into from Jun 29, 2023

Conversation

buckbaskin
Copy link
Owner

@buckbaskin buckbaskin commented Jun 15, 2023

FormaK aims to combine symbolic modeling for fast, efficient system modelling
with code generation to create performant code that is easy to use.

The Five Key Elements the library provides to achieve this user experience are:

  1. Python Interface to define models
  2. Python implementation of the model and supporting tooling
  3. Integration to scikit-learn to leverage the model selection and parameter tuning functions
  4. C++ and Python to C++ interoperability for performance
  5. C++ interfaces to support a variety of model uses

This design provides an extension to the second of the Five Keys "Python
implementation of the model..." and the fifth of the Five Keys "C++ interfaces
to support a variety of model uses" to support the performance goals of the
library: Common Subexpresion Elimination (CSE).

CSE is a transformation on the compute graph of the underlying model (for
either Python or C++) to remove duplicate compuation at multiple scales. For
example, if a sensor model computes a + b multiple times, CSE identifies this
subexpression and computes it once. This could also apply to a more complicated
expression like 9.81 * sin(theta + bias).

One of the nicest benefits of this transformation is that it will provide a
performance benefit to the model without a compromise to the user interface.

@buckbaskin buckbaskin self-assigned this Jun 15, 2023
@buckbaskin buckbaskin merged commit 80fdd9d into main Jun 29, 2023
3 of 5 checks passed
@buckbaskin buckbaskin added the enhancement New feature or request label Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant