New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PT2][Optimus] Read the patterns from the config instead of hard-code passes #125136
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/125136
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (1 Unrelated Failure)As of commit a7f199c with merge base a03b9a2 (): FLAKY - The following job failed but was likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
77ad2be
to
de42fe6
Compare
… 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
de42fe6
to
a7f199c
Compare
@pytorchbot merge -f 'Landed internally' (Initiating merge automatically since Phabricator Diff has merged, using force because this PR might not pass merge_rules.json but landed internally) |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
… passes (pytorch#125136) 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. Differential Revision: D56659934 Pull Request resolved: pytorch#125136 Approved by: https://github.com/jackiexu1992
… passes (pytorch#125136) 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. Differential Revision: D56659934 Pull Request resolved: pytorch#125136 Approved by: https://github.com/jackiexu1992
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.
Differential Revision: D56659934
cc @ezyang @msaroufim @bdhirsh @anijain2305 @chauhang @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @peterbell10 @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @ColinPeppler @amjames @desertfire