Skip to content

Commit

Permalink
[Unity] NestedMsg Support utility (#13995)
Browse files Browse the repository at this point in the history
This PR introduce NestedMsg to robustly handle nested-tuple analysis.

Relax support nested tuple structures in the IR.
Nested tuple structure is important to support advanced groupings in
cases such as gradient calculation and other scenarios.

The possible presence of nested tuple does mean that we need to to
robustly handle analysis that contains nested tuple structures in a dataflow graph.

This PR introduces a NestedMsg<T> class that corresponds to a possibly
nested message tuple for a given leaf message class T.
We also introduces various helper functions to compose and decompose messages.

Co-authored-by: Bohan Hou <32121147+spectrometerHBH@users.noreply.github.com>
Co-authored-by: Yixin Dong <ubospica@gmail.com>
Co-authored-by: Ruihang Lai <ruihangl@cs.cmu.edu>
  • Loading branch information
4 people committed Apr 1, 2023
1 parent 4430d26 commit 471ff84
Show file tree
Hide file tree
Showing 2 changed files with 854 additions and 0 deletions.
Loading

0 comments on commit 471ff84

Please sign in to comment.