-
Notifications
You must be signed in to change notification settings - Fork 26.3k
[quant][graphmode] Returning axis from calculate_qparams #29494
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
Summary: `calculate_qparams` of per channel quantization should return the axis, this PR added this and also added corresponding support in graph mode Test Plan: python test/test_jit.py Reviewers: mvz Subscribers: Tasks: Tags: [ghstack-poisoned]
Summary: `calculate_qparams` of per channel quantization should return the axis, this PR added this and also added corresponding support in graph mode Test Plan: python test/test_jit.py Reviewers: mvz Subscribers: Tasks: Tags: [ghstack-poisoned]
Summary: `calculate_qparams` of per channel quantization should return the axis, this PR added this and also added corresponding support in graph mode Test Plan: python test/test_jit.py Reviewers: mvz Subscribers: Tasks: Tags: [ghstack-poisoned]
Summary: `calculate_qparams` of per channel quantization should return the axis, this PR added this and also added corresponding support in graph mode Test Plan: python test/test_jit.py Reviewers: mvz Subscribers: Tasks: Tags: [ghstack-poisoned]
Summary: `calculate_qparams` of per channel quantization should return the axis, this PR added this and also added corresponding support in graph mode Test Plan: python test/test_jit.py Reviewers: mvz Subscribers: Tasks: Tags: [ghstack-poisoned]
| zero_point_val = g->insertConstant(zero_point); | ||
| // TODO: get axis from qparam | ||
| axis_val = g->insertConstant(0); | ||
| int axis = tp->elements()[2].toInt(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be squashed with the change where it was introduced before landing. There is no reason to commit half-finished stuff.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is just because the order we do things right now, at the place we introduce this, calculate_qparam doesn't return axis and in this PR we added this support, so we can get the axis here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I reread everything more carefully and it makes sense.
Summary: `calculate_qparams` of per channel quantization should return the axis, this PR added this and also added corresponding support in graph mode Test Plan: python test/test_jit.py Reviewers: mvz Subscribers: Tasks: Tags: [ghstack-poisoned]
Summary: `calculate_qparams` of per channel quantization should return the axis, this PR added this and also added corresponding support in graph mode Test Plan: python test/test_jit.py Reviewers: mvz Subscribers: Tasks: Tags: [ghstack-poisoned]
Summary: `calculate_qparams` of per channel quantization should return the axis, this PR added this and also added corresponding support in graph mode Test Plan: python test/test_jit.py Reviewers: mvz Subscribers: Tasks: Tags: [ghstack-poisoned]
Summary: `calculate_qparams` of per channel quantization should return the axis, this PR added this and also added corresponding support in graph mode Test Plan: python test/test_jit.py Reviewers: mvz Subscribers: Tasks: Tags: [ghstack-poisoned]
Summary: `calculate_qparams` of per channel quantization should return the axis, this PR added this and also added corresponding support in graph mode Test Plan: python test/test_jit.py Reviewers: mvz Subscribers: Tasks: Tags: [ghstack-poisoned]
Summary: `calculate_qparams` of per channel quantization should return the axis, this PR added this and also added corresponding support in graph mode Test Plan: python test/test_jit.py Reviewers: mvz Subscribers: Tasks: Tags: Differential Revision: [D18580905](https://our.internmc.facebook.com/intern/diff/D18580905) [ghstack-poisoned]
Summary: `calculate_qparams` of per channel quantization should return the axis, this PR added this and also added corresponding support in graph mode Test Plan: python test/test_jit.py Reviewers: mvz Subscribers: Tasks: Tags: Differential Revision: [D18580905](https://our.internmc.facebook.com/intern/diff/D18580905) [ghstack-poisoned]
|
This pull request has been merged in f2b851a. |
Stack from ghstack:
torch.jit.ignore#29416 [quant] Make PerChannelMinMaxObserver scriptable usingtorch.jit.ignoreSummary:
calculate_qparamsof per channel quantization should return the axis, thisPR added this and also added corresponding support in graph mode
Test Plan:
python test/test_jit.py
Reviewers:
mvz
Subscribers:
Tasks:
Tags:
Differential Revision: D18580905