[quant] Add support for Quantized Conv1d and ConvRELU1d#38283
Closed
supriyar wants to merge 4 commits intogh/supriyar/114/basefrom
Closed
[quant] Add support for Quantized Conv1d and ConvRELU1d#38283supriyar wants to merge 4 commits intogh/supriyar/114/basefrom
supriyar wants to merge 4 commits intogh/supriyar/114/basefrom
Conversation
Summary: Adds support for the modules and tests Test Plan: python test/test_quantization.py TestStaticQuantizedModule.test_conv1d_api Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
This was referenced May 11, 2020
💊 CI failures summary and remediationsAs of commit f8740dc (more details on the Dr. CI page):
ci.pytorch.org: 1 failedThis 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 15 times. |
jerryzh168
reviewed
May 12, 2020
|
|
||
| # We are using Conv2d to run the Conv1d. For that we need to know which | ||
| # dimension is squeezed/unsqueezed. | ||
| _SQUEEZE_DIM = -2 # -2 is faster than -1. |
Contributor
There was a problem hiding this comment.
what if you remove this
Contributor
Author
There was a problem hiding this comment.
Yeah this is the culprit. I kept it around since I had to call _packed_params.unpack() (which calls conv2d unpack) so the output weight had to be squeezed for Conv1d. Let me directly try calling quantized::conv1d_unpack op instead.
Summary: Adds support for the modules and tests Test Plan: python test/test_quantization.py TestStaticQuantizedModule.test_conv1d_api Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
Summary: Adds support for the modules and tests Test Plan: python test/test_quantization.py TestStaticQuantizedModule.test_conv1d_api Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
This was referenced May 12, 2020
jerryzh168
reviewed
May 12, 2020
Comment on lines
+181
to
+183
| at::Tensor new_weight = weight.clone(); | ||
| new_weight = new_weight.squeeze_(quant_utils::kConv1dSqueezeDim + 2); | ||
| return std::tuple<at::Tensor, c10::optional<at::Tensor>>(new_weight, bias); |
Contributor
There was a problem hiding this comment.
does this change belong to pervious PR?
jerryzh168
approved these changes
May 12, 2020
Summary: Adds support for the modules and tests Test Plan: python test/test_quantization.py TestStaticQuantizedModule.test_conv1d_api Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
This was referenced May 13, 2020
Contributor
|
This pull request has been merged in f6626aa. |
laurentdupin
pushed a commit
to laurentdupin/pytorch
that referenced
this pull request
Apr 24, 2026
Summary: Pull Request resolved: pytorch#38283 Adds support for the modules and tests Test Plan: python test/test_quantization.py TestStaticQuantizedModule.test_conv1d_api Imported from OSS Differential Revision: D21553665 fbshipit-source-id: 7ea28da024bdf59f87f300d616c266f2b41f0bcd
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:
Adds support for the modules and tests
Test Plan:
python test/test_quantization.py TestStaticQuantizedModule.test_conv1d_api
Reviewers:
Subscribers:
Tasks:
Tags:
Differential Revision: D21553665