[quant][graph] Add quantized batch_norm2d_relu to graph mode#36552
Closed
supriyar wants to merge 10 commits intogh/supriyar/86/basefrom
Closed
[quant][graph] Add quantized batch_norm2d_relu to graph mode#36552supriyar wants to merge 10 commits intogh/supriyar/86/basefrom
supriyar wants to merge 10 commits intogh/supriyar/86/basefrom
Conversation
Summary: Do the fusion for inplace and non-inplace relu Tested for functional relu as well. Functional batch_norm is not a usual use-case (since it expects the weight, bias, mean, var) so that is not tested. Test Plan: test_quantize_script.py test_batch_norm2d_relu Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
This was referenced Apr 14, 2020
supriyar
added a commit
that referenced
this pull request
Apr 14, 2020
Summary: Do the fusion for inplace and non-inplace relu Tested for functional relu as well. Functional batch_norm is not a usual use-case (since it expects the weight, bias, mean, var) so that is not tested. Test Plan: test_quantize_script.py test_batch_norm2d_relu Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: c3fea27 Pull Request resolved: #36552
💊 Build failures summary and remediationsAs of commit d28b1f9 (more details on the Dr. CI page):
Extra GitHub checks
This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions on the GitHub issue tracker. This comment has been revised 25 times. |
Summary: Do the fusion for inplace and non-inplace relu Tested for functional relu as well. Functional batch_norm is not a usual use-case (since it expects the weight, bias, mean, var) so that is not tested. Test Plan: test_quantize_script.py test_batch_norm2d_relu Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
supriyar
added a commit
that referenced
this pull request
Apr 14, 2020
Summary: Do the fusion for inplace and non-inplace relu Tested for functional relu as well. Functional batch_norm is not a usual use-case (since it expects the weight, bias, mean, var) so that is not tested. Test Plan: test_quantize_script.py test_batch_norm2d_relu Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: 57d2074 Pull Request resolved: #36552
Summary: Do the fusion for inplace and non-inplace relu Tested for functional relu as well. Functional batch_norm is not a usual use-case (since it expects the weight, bias, mean, var) so that is not tested. Test Plan: test_quantize_script.py test_batch_norm2d_relu Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
supriyar
added a commit
that referenced
this pull request
Apr 14, 2020
Summary: Do the fusion for inplace and non-inplace relu Tested for functional relu as well. Functional batch_norm is not a usual use-case (since it expects the weight, bias, mean, var) so that is not tested. Test Plan: test_quantize_script.py test_batch_norm2d_relu Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: 0320ab6 Pull Request resolved: #36552
jerryzh168
reviewed
Apr 14, 2020
Summary: Do the fusion for inplace and non-inplace relu Tested for functional relu as well. Functional batch_norm is not a usual use-case (since it expects the weight, bias, mean, var) so that is not tested. Test Plan: test_quantize_script.py test_batch_norm2d_relu Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
jerryzh168
reviewed
Apr 14, 2020
jerryzh168
reviewed
Apr 14, 2020
jerryzh168
reviewed
Apr 14, 2020
Summary: Do the fusion for inplace and non-inplace relu Tested for functional relu as well. Functional batch_norm is not a usual use-case (since it expects the weight, bias, mean, var) so that is not tested. Test Plan: test_quantize_script.py test_batch_norm2d_relu Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
Summary: Do the fusion for inplace and non-inplace relu Tested for functional relu as well. Functional batch_norm is not a usual use-case (since it expects the weight, bias, mean, var) so that is not tested. Test Plan: test_quantize_script.py test_batch_norm2d_relu Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
jerryzh168
reviewed
Apr 15, 2020
Summary: Do the fusion for inplace and non-inplace relu Tested for functional relu as well. Functional batch_norm is not a usual use-case (since it expects the weight, bias, mean, var) so that is not tested. Test Plan: test_quantize_script.py test_batch_norm2d_relu Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
Summary: Do the fusion for inplace and non-inplace relu Tested for functional relu as well. Functional batch_norm is not a usual use-case (since it expects the weight, bias, mean, var) so that is not tested. Test Plan: test_quantize_script.py test_batch_norm2d_relu Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
This was referenced Apr 15, 2020
jerryzh168
reviewed
Apr 15, 2020
| for individual ops end to end. | ||
| """ | ||
| def _test_op_impl(self, SingleOpModule, data, quantized_op): | ||
| def _test_op_impl(self, SingleOpModule, data, quantized_op, **kwargs): |
Contributor
There was a problem hiding this comment.
can you change this to take a module instance? then you can initialize the module before passing into this function.
jerryzh168
requested changes
Apr 15, 2020
Contributor
jerryzh168
left a comment
There was a problem hiding this comment.
please refactor _test_op_impl
Summary: Do the fusion for inplace and non-inplace relu Tested for functional relu as well. Functional batch_norm is not a usual use-case (since it expects the weight, bias, mean, var) so that is not tested. Test Plan: test_quantize_script.py test_batch_norm2d_relu Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
jerryzh168
reviewed
Apr 16, 2020
Comment on lines
+1436
to
+1438
| for Model in [BNRelu, BNFuncRelu, BNFuncInplaceRelu]: | ||
| for inplace in [True, False]: | ||
| model = self._test_op_impl(Model(inplace), data, "quantized::batch_norm2d_relu") |
Contributor
There was a problem hiding this comment.
please change this loop as well, we don't need to loop through [True, False] anymore
Contributor
Author
There was a problem hiding this comment.
Good catch! Updated it
Summary: Do the fusion for inplace and non-inplace relu Tested for functional relu as well. Functional batch_norm is not a usual use-case (since it expects the weight, bias, mean, var) so that is not tested. Test Plan: test_quantize_script.py test_batch_norm2d_relu Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
Contributor
|
This pull request has been merged in 17c268b. |
laurentdupin
pushed a commit
to laurentdupin/pytorch
that referenced
this pull request
Apr 24, 2026
…#36552) Summary: Pull Request resolved: pytorch#36552 Do the fusion for inplace and non-inplace relu Tested for functional relu as well. Functional batch_norm is not a usual use-case (since it expects the weight, bias, mean, var) so that is not tested. Test Plan: test_quantize_script.py test_batch_norm2d_relu Imported from OSS Differential Revision: D21075253 fbshipit-source-id: 0a07ea477cab19abf1d1b0856e623b1436240da1
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack from ghstack:
Summary:
Do the fusion for inplace and non-inplace relu
Tested for functional relu as well.
Functional batch_norm is not a usual use-case (since it expects the weight, bias, mean, var) so that is not tested.
Test Plan:
test_quantize_script.py test_batch_norm2d_relu
Reviewers:
Subscribers:
Tasks:
Tags:
Differential Revision: D21075253