facebookresearch / beanmachine

A library that allows for inference on probabilistic models
https://beanmachine.org/
MIT License
264 stars 49 forks source link

minibmg: transform a computation graph to make it a set of trees of bounded depth (for NUTS perf) #1795

Closed gafter closed 1 year ago

gafter commented 1 year ago

Summary: Implement a transformation of a data structure containing nodes rooting directed acyclic graphs, into a prelude followed by a rewritten data structure in which the nodes root trees. The prelude is a series of assignments of expressions (represented by trees) to temporary variables. This transformation is also capable of limiting the depth of the expression trees produced to a given constant (which must be two or greater).

Differential Revision: D40745754

facebook-github-bot commented 1 year ago

This pull request was exported from Phabricator. Differential Revision: D40745754