-
Notifications
You must be signed in to change notification settings - Fork 21.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PT2][Optimus] Read the patterns from the config instead of hard-code…
… passes Summary: Due to the compatitbility issue, we hard coded the passes to do the pattern optimization. Here, we revisit the method since it has been a while for the changes into production packages. We instead read from the config to decide whether we do the specific pattern optimization, which makes followup pattern add easier. Test Plan: # local reproduce ### with all passes on ``` buck2 run mode/opt //scripts/jackiexu0313/pt2:local_model_with_pt2 -- --test_mode batch-split --model_type "cmf" --flow_id 472483751 ``` ``` Counter({'pattern_matcher_nodes': 2069, 'pattern_matcher_count': 1342, 'normalization_pass': 189, 'remove_split_with_size_one_pass': 82, 'scmerge_cat_removed': 34, 'scmerge_split_removed': 23, 'scmerge_cat_added': 20, 'scmerge_split_sections_removed': 14, 'split_cat_pass': 5, 'batch_aten_mul': 5, 'batch_linear': 3, 'batch_linear_post_grad': 3, 'scmerge_split_added': 2, 'batch_aten_sub': 1}) ``` ### with no passes on ``` buck2 run mode/opt //scripts/jackiexu0313/pt2:local_model_with_pt2 -- --test_mode None --model_type "cmf" --flow_id 47 2483751 ``` ``` 'inductor': Counter({'pattern_matcher_nodes': 1158, 'pattern_matcher_count': 994, 'extern_calls': 345}) ``` # e2e see D56732968 Differential Revision: D56659934
- Loading branch information
1 parent
0969f01
commit 77ad2be
Showing
9 changed files
with
82 additions
and
92 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
Oops, something went wrong.