[quant][graphmode] Fix quantized::conv2d patterns in QuantFusion#26515
Closed
jerryzh168 wants to merge 1 commit intogh/jerryzh168/79/basefrom
Closed
[quant][graphmode] Fix quantized::conv2d patterns in QuantFusion#26515jerryzh168 wants to merge 1 commit intogh/jerryzh168/79/basefrom
jerryzh168 wants to merge 1 commit intogh/jerryzh168/79/basefrom
Conversation
Summary: Fix patterns of `prepack` and `permute` after recent changes to `quantized::conv2d` and `quantized::conv2d_prepack` Test Plan: python test/test_jit.py 'TestJit.test_quant_fusion' Reviewers: pt1quant Subscribers: Tasks: Tags: [ghstack-poisoned]
ZolotukhinM
approved these changes
Sep 20, 2019
ZolotukhinM
left a comment
There was a problem hiding this comment.
Looks good but please include a description of the recent changes (or a link to the corresponding PR) you are referring to in the commit message.
| %w_packed = quantized::conv_prepack(%w_perm, %stride, %padding, %dilation, %groups) | ||
| %r = quantized::conv2d(%a_perm, %w_packed, %b_quant, %stride, %padding, %dilation, %groups, %r_scale, %r_zero_point) | ||
| %out_param : int[] = prim::ListConstruct(%0, %3, %1, %2) | ||
| %r_perm = aten::permute(%r, %out_param) |
There was a problem hiding this comment.
Do we still need a permute for results?
Contributor
Author
There was a problem hiding this comment.
I think so, it's a TODO in qconv.py: https://github.com/pytorch/pytorch/blob/master/aten/src/ATen/native/quantized/cpu/qconv.cpp#L375
we need to update after that is removed
Contributor
|
This pull request has been merged in 4444b91. |
mingbowan
pushed a commit
to mingbowan/pytorch
that referenced
this pull request
Sep 23, 2019
Summary: Pull Request resolved: pytorch#26515 Fix patterns of `prepack` and `permute` after recent changes to `quantized::conv2d` and `quantized::conv2d_prepack` Test Plan: python test/test_jit.py 'TestJit.test_quant_fusion' Imported from OSS Differential Revision: D17502573 fbshipit-source-id: 1a719fd610e8ea9dc16075abaa042556e1edbceb
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:
Fix patterns of
prepackandpermuteafter recent changesto
quantized::conv2dandquantized::conv2d_prepackTest Plan:
python test/test_jit.py 'TestJit.test_quant_fusion'
Reviewers:
pt1quant
Subscribers:
Tasks:
Tags:
Differential Revision: D17502573