-
Notifications
You must be signed in to change notification settings - Fork 537
Add a pass to remove certain redundant branched quant/dequant nodes #8896
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/8896
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit a77b024 with merge base 24671a9 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This pull request was exported from Phabricator. Differential Revision: D69947096 |
1 similar comment
This pull request was exported from Phabricator. Differential Revision: D69947096 |
a038391
to
d533abd
Compare
…ytorch#8896) Summary: This pass addresses situations like this, where the `quantize` and `dequantize` nodes have the same parameters: ``` some_op0 | quantize / \ some_op1 dequantize | some_op2 ``` . We can eliminate `dequantize` like so: ``` some_op0 / \ quantize some_op2 / some_op1 ``` The same logic is applied when the order of `quantize` and `dequantized` is reversed. Situations where the `some_op1` branch doesn't exist are handled by `FuseQuantDequantToRequantizePass`, but branched scenarios require different logic. Differential Revision: D69947096
d533abd
to
a77b024
Compare
This pull request was exported from Phabricator. Differential Revision: D69947096 |
Differential Revision: D69947096 Pull Request resolved: #8896
Summary:
This pass addresses situations like this, where the
quantize
anddequantize
nodes have the same parameters:. We can eliminate
dequantize
like so:The same logic is applied when the order of
quantize
anddequantized
is reversed.Situations where the
some_op1
branch doesn't exist are handled byFuseQuantDequantToRequantizePass
, but branched scenarios require different logic.Differential Revision: D69947096