-
Notifications
You must be signed in to change notification settings - Fork 25.3k
[PT2][Quant] Use module partition for fused patterns #102394
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
Conversation
This diff introduces utility `find_sequential_partitions`. This utility allows one to specify sequential pattern of nn.Module/nn.functional and returns a list. Each item in the list contains a List[SourcePartition] that represents sequentially connected partitions that are of the pattern requested. For example `find_sequential_partitions(model, [nn.Conv2d, nn.ReLU])` will find all nn.Conv2d and nn.ReLU partitions that are sequentially connected. Furthmore, move to using `find_sequential_partitions` for conv_bn/conv_bn_relu for QAT. Differential Revision: [D45948057](https://our.internmc.facebook.com/intern/diff/D45948057/) **NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D45948057/)! [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/102394
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New Failure, 3 Unrelated FailuresAs of commit 5f26234: NEW FAILURE - The following job has failed:
BROKEN TRUNK - The following jobs failed but were present on the merge base ae5606b:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This diff introduces utility `find_sequential_partitions`. This utility allows one to specify sequential pattern of nn.Module/nn.functional and returns a list. Each item in the list contains a List[SourcePartition] that represents sequentially connected partitions that are of the pattern requested. For example `find_sequential_partitions(model, [nn.Conv2d, nn.ReLU])` will find all nn.Conv2d and nn.ReLU partitions that are sequentially connected. Furthmore, move to using `find_sequential_partitions` for conv_bn/conv_bn_relu for QAT. Differential Revision: [D45948057](https://our.internmc.facebook.com/intern/diff/D45948057/) **NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D45948057/)! [ghstack-poisoned]
This diff introduces utility `find_sequential_partitions`. This utility allows one to specify sequential pattern of nn.Module/nn.functional and returns a list. Each item in the list contains a List[SourcePartition] that represents sequentially connected partitions that are of the pattern requested. For example `find_sequential_partitions(model, [nn.Conv2d, nn.ReLU])` will find all nn.Conv2d and nn.ReLU partitions that are sequentially connected. Furthmore, move to using `find_sequential_partitions` for conv_bn/conv_bn_relu for QAT. Differential Revision: [D45948057](https://our.internmc.facebook.com/intern/diff/D45948057/) **NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D45948057/)! [ghstack-poisoned]
This diff introduces utility `find_sequential_partitions`. This utility allows one to specify sequential pattern of nn.Module/nn.functional and returns a list. Each item in the list contains a List[SourcePartition] that represents sequentially connected partitions that are of the pattern requested. For example `find_sequential_partitions(model, [nn.Conv2d, nn.ReLU])` will find all nn.Conv2d and nn.ReLU partitions that are sequentially connected. Furthmore, move to using `find_sequential_partitions` for conv_bn/conv_bn_relu for QAT. Differential Revision: [D45948057](https://our.internmc.facebook.com/intern/diff/D45948057/) **NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D45948057/)! [ghstack-poisoned]
@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). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Stack from ghstack (oldest at bottom):
This diff introduces utility
find_sequential_partitions
.This utility allows one to specify sequential pattern of
nn.Module/nn.functional and returns a list. Each item in the list contains a
List[SourcePartition] that represents sequentially connected partitions that
are of the pattern requested.
For example
find_sequential_partitions(model, [nn.Conv2d, nn.ReLU])
will findall nn.Conv2d and nn.ReLU partitions that are sequentially connected.
Furthmore, move to using
find_sequential_partitions
for conv_bn/conv_bn_relufor QAT.
Differential Revision: D45948057
NOTE FOR REVIEWERS: This PR has internal Meta-specific changes or comments, please review them on Phabricator!