-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add information for coordinating segments in python frontend. (#3289)
# Overview This PR adds information necessary for coordinating segments in the python frontend. Changes pulled from #3025. ## PR Details * Track the fusion state ids for the inputs, outputs, and extents of a Fusion. Inputs and extents are used to gather tensor arguments and scalars to run a fusion segment, while the outputs are employed to store results between segments. * A map from a CPP value to its corresponding fusion state id, which is needed to map values from original fusion to its segmented fusions. ## Implementation Details - `FusionState` is a lightweight representation of a CPP `Fusion`. - When calling `buildFusionIr`, a CPP `Fusion` is created from the Python `FusionDefinition`. At this point, the `FusionState` creates a mapping from CPP `Fusion` to its `State` objects. - However, the `FusionState` is temporary and the CPP `Fusion` is cached in `FusionCache`. The information linking the CPP `Fusion` and Python `FusionDefinition` is stored in `FusionCache`. - When we create a new `FusionState`, we look for a cached CPP `Fusion`. If it exists, we restore the mapping from the data stored in `FusionSchedules`.
- Loading branch information
Showing
9 changed files
with
194 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters