-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Complete Transition to Control Flow Regions (#1676)
This PR completes the transition to hierarchical control flow regions in DaCe. By nature of the significance in change that is brought through the transition to hierarchical control flow regions, this PR is rather substantial. An exhaustive listing of all adaptations is not feasible, but the most important changes and adaptations are listed below: - [x] Change the default of the Python frontend to generate SDFGs using experimental CFG blocks. A subsequent PR will remove the option to _not_ use experimental CFG blocks entirely, but this was left to a separate PR to avoid growing this one even more than it already has. - [x] The option to write a pass or transformation that is _not_ compatible with experimental blocks has been removed, forcing new transformations and passes to consider them in their design. - [x] Simplifications to loop related transformations by adapting explicit loop regions. - [x] Add a new pass base type, `ControlFlowRegionPass`: This pass works like `StatePass` or `ScopePass`, and can be extended to write a pass that applies recursively to each control flow region of an SDFG. An option can be set to either apply bottom-up or top-down. - [x] A pass has been added to dead code elimination to prune empty or falsy conditional branches. - [x] Include a control flow raising pass in the simplification pipeline, ensuring that even SDFGs generated without the explicit use of experimental blocks are raised to the new style SDFGs. - [x] Adapt all passes and transformations currently in main DaCe to work with SDFGs containing experimental CFG blocks. - [x] Almost all transformations and analyses now _expect_ that experimental blocks are used for regular / reducible control flow, meaning some control flow analyses have been ditched to improve overall performance and reliability of DaCe, and remove redundancy. - [x] Ensure all compiler backends correctly handle experimental blocks. - [x] Adapt state propagation into a separate pass that has been made to use experimental blocks. Legacy state propagation has been left in for now, including tests that ensure it works as intended, to avoid making this PR even larger. However, it is planned to remove this in a subsequent PR soon. - [x] A block fusion pass has been added to the simplification pipeline. This operates similar to StateFusion, but fuses no-op general control flow blocks (empty states or control flow blocks) with other control flow blocks. This reduces the number of nodes and edges in CFGs further. - [x] Numerous bugfixes with respect to experimental blocks and analyses around them, thanks to the ability to now run the entire CI pipeline with them. Note: The FV3 integration test fails and will continue to fail with this PR, since GT4Py cartesian, which is used by PyFV3, does not consider experimental blocks in their design. Since DaCe v1.0.0 will be released _without_ this PR in it, my suggestion is to limit the application of the FV3 integration and regression tests to PRs which are made to a specific v1.0.0 maintenance branch, which is used for fixes to v1.0.0. --------- Co-authored-by: Philip Mueller <[email protected]> Co-authored-by: Tal Ben-Nun <[email protected]>
- Loading branch information
1 parent
4976e16
commit 896a1e1
Showing
131 changed files
with
4,288 additions
and
2,745 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
Oops, something went wrong.