Skip to content

[quant] Make PerChannelMinMaxObserver scriptable using torch.jit.ignore #29416

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

Closed
wants to merge 11 commits into from

Conversation

jerryzh168
Copy link
Contributor

@jerryzh168 jerryzh168 commented Nov 7, 2019

Stack from ghstack:

Summary:
att

Test Plan:
python test/test_quantization.py

Reviewers:
pt1quant

Subscribers:

Tasks:

Tags:

Differential Revision: D18580906

…ore`

Summary:
att

Test Plan:
python test/test_quantization.py

Reviewers:
pt1quant

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Nov 7, 2019
…ore`

Summary:
att

Test Plan:
python test/test_quantization.py

Reviewers:
pt1quant

Subscribers:

Tasks:

Tags:

ghstack-source-id: 878d6a9
Pull Request resolved: #29416
jerryzh168 added a commit that referenced this pull request Nov 9, 2019
Summary:
Previously graph mode quantization only works for per tensor quantization,
this PR added support for per channel quantization as well, changes include
- insert per channel quantization calls
- add support of folding for prepacked per channel quantized weight

Test Plan:
test is not possible until we can script PerChannelObserver, which comes in #29416
we'll add test in a separate PR after that.

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
…rch.jit.ignore`"

Summary:
att

Test Plan:
python test/test_quantization.py

Reviewers:
pt1quant

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
…rch.jit.ignore`"

Summary:
att

Test Plan:
python test/test_quantization.py

Reviewers:
pt1quant

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Nov 9, 2019
…ntization in graph mode"

Summary:
Previously graph mode quantization only works for per tensor quantization,
this PR added support for per channel quantization as well, changes include
- insert per channel quantization calls
- add support of folding for prepacked per channel quantized weight

Test Plan:
test is not possible until we can script PerChannelObserver, which comes in #29416
we'll add test in a separate PR after that.

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Nov 9, 2019
…ph mode"

Summary:
Previously graph mode quantization only works for per tensor quantization,
this PR added support for per channel quantization as well, changes include
- insert per channel quantization calls
- add support of folding for prepacked per channel quantized weight

Test Plan:
test is not possible until we can script PerChannelObserver, which comes in #29416
we'll add test in a separate PR after that.

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
…rch.jit.ignore`"

Summary:
att

Test Plan:
python test/test_quantization.py

Reviewers:
pt1quant

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Nov 13, 2019
…ntization in graph mode"

Summary:
Previously graph mode quantization only works for per tensor quantization,
this PR added support for per channel quantization as well, changes include
- insert per channel quantization calls
- add support of folding for prepacked per channel quantized weight

Test Plan:
test is not possible until we can script PerChannelObserver, which comes in #29416
we'll add test in a separate PR after that.

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Nov 13, 2019
…ph mode"

Summary:
Previously graph mode quantization only works for per tensor quantization,
this PR added support for per channel quantization as well, changes include
- insert per channel quantization calls
- add support of folding for prepacked per channel quantized weight

Test Plan:
test is not possible until we can script PerChannelObserver, which comes in #29416
we'll add test in a separate PR after that.

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Nov 13, 2019
…ntization in graph mode"

Summary:
Previously graph mode quantization only works for per tensor quantization,
this PR added support for per channel quantization as well, changes include
- insert per channel quantization calls
- add support of folding for prepacked per channel quantized weight

Test Plan:
test is not possible until we can script PerChannelObserver, which comes in #29416
we'll add test in a separate PR after that.

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Nov 13, 2019
…ph mode"

Summary:
Previously graph mode quantization only works for per tensor quantization,
this PR added support for per channel quantization as well, changes include
- insert per channel quantization calls
- add support of folding for prepacked per channel quantized weight

Test Plan:
test is not possible until we can script PerChannelObserver, which comes in #29416
we'll add test in a separate PR after that.

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Nov 13, 2019
…ntization in insert_quant_dequant and fold_prepack"

Summary:
Previously graph mode quantization only works for per tensor quantization,
this PR added support for per channel quantization as well, changes include
- insert per channel quantization calls(insert_quant_dequant)
- add support of folding for prepacked per channel quantized weight (fold_prepack)

Test Plan:
test is not possible until we can script PerChannelObserver, which comes in #29416
we'll add test in a separate PR after that.

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Nov 13, 2019
…ert_quant_dequant and fold_prepack"

Summary:
Previously graph mode quantization only works for per tensor quantization,
this PR added support for per channel quantization as well, changes include
- insert per channel quantization calls(insert_quant_dequant)
- add support of folding for prepacked per channel quantized weight (fold_prepack)

Test Plan:
test is not possible until we can script PerChannelObserver, which comes in #29416
we'll add test in a separate PR after that.

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Nov 13, 2019
…equant and fold_prepack

Summary:
Previously graph mode quantization only works for per tensor quantization,
this PR added support for per channel quantization as well, changes include
- insert per channel quantization calls(insert_quant_dequant)
- add support of folding for prepacked per channel quantized weight (fold_prepack)

Test Plan:
test is not possible until we can script PerChannelObserver, which comes in #29416
we'll add test in a separate PR after that.

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

ghstack-source-id: ea7a8fb
Pull Request resolved: #29492
…rch.jit.ignore`"

Summary:
att

Test Plan:
python test/test_quantization.py

Reviewers:
pt1quant

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
Copy link

@ZolotukhinM ZolotukhinM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

…rch.jit.ignore`"

Summary:
att

Test Plan:
python test/test_quantization.py

Reviewers:
pt1quant

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Nov 15, 2019
…ntization in insert_quant_dequant and fold_prepack"

Summary:
Previously graph mode quantization only works for per tensor quantization,
this PR added support for per channel quantization as well, changes include
- insert per channel quantization calls(insert_quant_dequant)
- add support of folding for prepacked per channel quantized weight (fold_prepack)

Test Plan:
test is not possible until we can script PerChannelObserver, which comes in #29416
we'll add test in a separate PR after that.

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Nov 15, 2019
…ert_quant_dequant and fold_prepack"

Summary:
Previously graph mode quantization only works for per tensor quantization,
this PR added support for per channel quantization as well, changes include
- insert per channel quantization calls(insert_quant_dequant)
- add support of folding for prepacked per channel quantized weight (fold_prepack)

Test Plan:
test is not possible until we can script PerChannelObserver, which comes in #29416
we'll add test in a separate PR after that.

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
…rch.jit.ignore`"

Summary:
att

Test Plan:
python test/test_quantization.py

Reviewers:
pt1quant

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Nov 15, 2019
…ntization in insert_quant_dequant and fold_prepack"

Summary:
Previously graph mode quantization only works for per tensor quantization,
this PR added support for per channel quantization as well, changes include
- insert per channel quantization calls(insert_quant_dequant)
- add support of folding for prepacked per channel quantized weight (fold_prepack)

Test Plan:
test is not possible until we can script PerChannelObserver, which comes in #29416
we'll add test in a separate PR after that.

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Nov 15, 2019
…ert_quant_dequant and fold_prepack"

Summary:
Previously graph mode quantization only works for per tensor quantization,
this PR added support for per channel quantization as well, changes include
- insert per channel quantization calls(insert_quant_dequant)
- add support of folding for prepacked per channel quantized weight (fold_prepack)

Test Plan:
test is not possible until we can script PerChannelObserver, which comes in #29416
we'll add test in a separate PR after that.

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
…rch.jit.ignore`"

Summary:
att

Test Plan:
python test/test_quantization.py

Reviewers:
pt1quant

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Nov 18, 2019
…ntization in insert_quant_dequant and fold_prepack"

Summary:
Previously graph mode quantization only works for per tensor quantization,
this PR added support for per channel quantization as well, changes include
- insert per channel quantization calls(insert_quant_dequant)
- add support of folding for prepacked per channel quantized weight (fold_prepack)

Test Plan:
test is not possible until we can script PerChannelObserver, which comes in #29416
we'll add test in a separate PR after that.

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Nov 18, 2019
…ert_quant_dequant and fold_prepack"

Summary:
Previously graph mode quantization only works for per tensor quantization,
this PR added support for per channel quantization as well, changes include
- insert per channel quantization calls(insert_quant_dequant)
- add support of folding for prepacked per channel quantized weight (fold_prepack)

Test Plan:
test is not possible until we can script PerChannelObserver, which comes in #29416
we'll add test in a separate PR after that.

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
…rch.jit.ignore`"

Summary:
att

Test Plan:
python test/test_quantization.py

Reviewers:
pt1quant

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Nov 18, 2019
…ntization in insert_quant_dequant and fold_prepack"

Summary:
Previously graph mode quantization only works for per tensor quantization,
this PR added support for per channel quantization as well, changes include
- insert per channel quantization calls(insert_quant_dequant)
- add support of folding for prepacked per channel quantized weight (fold_prepack)

Test Plan:
test is not possible until we can script PerChannelObserver, which comes in #29416
we'll add test in a separate PR after that.

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

Differential Revision: [D18580444](https://our.internmc.facebook.com/intern/diff/D18580444)

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Nov 18, 2019
…ert_quant_dequant and fold_prepack"

Summary:
Previously graph mode quantization only works for per tensor quantization,
this PR added support for per channel quantization as well, changes include
- insert per channel quantization calls(insert_quant_dequant)
- add support of folding for prepacked per channel quantized weight (fold_prepack)

Test Plan:
test is not possible until we can script PerChannelObserver, which comes in #29416
we'll add test in a separate PR after that.

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

Differential Revision: [D18580444](https://our.internmc.facebook.com/intern/diff/D18580444)

[ghstack-poisoned]
…rch.jit.ignore`"

Summary:
att

Test Plan:
python test/test_quantization.py

Reviewers:
pt1quant

Subscribers:

Tasks:

Tags:

Differential Revision: [D18580906](https://our.internmc.facebook.com/intern/diff/D18580906)

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Nov 19, 2019
…ntization in insert_quant_dequant and fold_prepack"

Summary:
Previously graph mode quantization only works for per tensor quantization,
this PR added support for per channel quantization as well, changes include
- insert per channel quantization calls(insert_quant_dequant)
- add support of folding for prepacked per channel quantized weight (fold_prepack)

Test Plan:
test is not possible until we can script PerChannelObserver, which comes in #29416
we'll add test in a separate PR after that.

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

Differential Revision: [D18580444](https://our.internmc.facebook.com/intern/diff/D18580444)

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Nov 19, 2019
…ert_quant_dequant and fold_prepack"

Summary:
Previously graph mode quantization only works for per tensor quantization,
this PR added support for per channel quantization as well, changes include
- insert per channel quantization calls(insert_quant_dequant)
- add support of folding for prepacked per channel quantized weight (fold_prepack)

Test Plan:
test is not possible until we can script PerChannelObserver, which comes in #29416
we'll add test in a separate PR after that.

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

Differential Revision: [D18580444](https://our.internmc.facebook.com/intern/diff/D18580444)

[ghstack-poisoned]
facebook-github-bot pushed a commit that referenced this pull request Nov 19, 2019
…pack (#29492)

Summary:
Pull Request resolved: #29492

Previously graph mode quantization only works for per tensor quantization,
this PR added support for per channel quantization as well, changes include
- insert per channel quantization calls(insert_quant_dequant)
- add support of folding for prepacked per channel quantized weight (fold_prepack)

Test Plan:
test is not possible until we can script PerChannelObserver, which comes in #29416
we'll add test in a separate PR after that.

Imported from OSS

Differential Revision: D18580444

fbshipit-source-id: 347c07f201648ec49f070523642a9170278f8aa4
…rch.jit.ignore`"

Summary:
att

Test Plan:
python test/test_quantization.py

Reviewers:
pt1quant

Subscribers:

Tasks:

Tags:

Differential Revision: [D18580906](https://our.internmc.facebook.com/intern/diff/D18580906)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in b2291d4.

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in b2291d4.

@facebook-github-bot facebook-github-bot deleted the gh/jerryzh168/134/head branch November 23, 2019 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants