-
Notifications
You must be signed in to change notification settings - Fork 25.7k
[quant][graphmode][refactor] propagateQuantizationOps #39550
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: This is to prepare for next PR that fixes propagate dequantize for ops with multiple outputs Test Plan: Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
Summary: This is to prepare for next PR that fixes propagate dequantize for ops with multiple outputs Test Plan: Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
💊 CI failures summary and remediationsAs of commit 794734d (more details on the Dr. CI page): 💚 💚 Looks good so far! There are no failures yet. 💚 💚 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 or post in the (internal) Dr. CI Users group. This comment has been revised 31 times. |
Summary: This is to prepare for next PR that fixes propagate dequantize for ops with multiple outputs Test Plan: Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
Summary: This is to prepare for next PR that fixes propagate dequantize for ops with multiple outputs Test Plan: Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
Summary: This is to prepare for next PR that fixes propagate dequantize for ops with multiple outputs Test Plan: Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
Summary: This is to prepare for next PR that fixes propagate dequantize for ops with multiple outputs Test Plan: Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
| void propagateDequantize(Value* output, const std::vector<Value*> inputs) { | ||
| Node* n = output->node(); | ||
| Graph* graph = n->owningGraph(); | ||
| void removeDequantizeFromInputs(const std::vector<Value*>& inputs) { |
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.
Can you add a test showing the functionality here before you land?
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 a refactor, not a new functionality, it's already tested in test_quantize_script.py
Summary: This is to prepare for next PR that fixes propagate dequantize for ops with multiple outputs Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: [D21942063](https://our.internmc.facebook.com/intern/diff/D21942063) [ghstack-poisoned]
| for (auto* input : inputs) { | ||
| is_dequantized &= input->node()->kind() == Symbol::aten("dequantize"); | ||
| if (isSingleInputGeneralValueAtenFunction(n)) { | ||
| for (auto* output : n->outputs()) { |
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.
Do we need this for loop inside the if, else statements? Can it be moved outside?
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.
yeah, this refactor is preparing for next PR, where we do things differently for the else branch
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.
LG
Summary: This is to prepare for next PR that fixes propagate dequantize for ops with multiple outputs Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: [D21942063](https://our.internmc.facebook.com/intern/diff/D21942063) [ghstack-poisoned]
|
This pull request has been merged in c902146. |
Stack from ghstack:
aten::append#39644 [quant][graphmode] Support quantization foraten::appendifin insert_observers #39615 [quant][graphmode] Fix a corner case in handlingifin insert_observersSummary:
This is to prepare for next PR that fixes propagate dequantize for ops with multiple outputs
Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags:
Differential Revision: D21942063