-
Notifications
You must be signed in to change notification settings - Fork 684
NXP backend: Replace pass to fuse activations functions with joint quantization with activation #14816
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
base: main
Are you sure you want to change the base?
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/14816
Note: Links to docs will display an error until the docs builds have been completed. ❌ 4 New FailuresAs of commit 8d9107b with merge base 2c603e4 ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@pytorchbot label "module: nxp" "release notes: nxp" |
exir_ops.edge.aten.hardtanh.default, | ||
exir_ops.edge.aten.relu.default, | ||
exir_ops.edge.aten.sigmoid.default, | ||
exir_ops.edge.aten.tanh.default, |
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.
Is this necessary?
I would expect that since the Move*AuxiliaryOperatorIntoSeparateQDQClusterPass
now supports these operators, they should be the main nodes within their own QDQ clusters.
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.
I've looked into into it. The reason is it's in the QDQClusterRecognizer
AUXILIARY_OPS
list not only for the use in partitioner, but because the QDQClusterRecognizer
is also used in the Move*AuxiliaryOperatorIntoSeparateQDQClusterPass
:
executorch/backends/nxp/edge_passes/move_auxiliary_operator_into_separate_qdq_cluster_pass.py
Line 233 in 33f153a
cluster = QDQClusterRecognizer().get_qdq_cluster(main_cluster_node) |
6fdef26
to
33f153a
Compare
+ Move fused activations to separate QDQ cluster
33f153a
to
8d9107b
Compare
Summary
This PR replaces optimizations 'fuse_activation_functions.py' by quantization of Conv 2D and Linear ops together with fusable activations - selected activations supported by Neutron (Relu, Relu6, Sigmoid, Tanh). Logic is determined by target specs, now supporting Neutron-C. Tests updated. Relu has now non-shared, standalone quantization.
Test plan
Unit tests provided (test_edge_passes.py, test_quantizer.py).
cc @robert-kalmar @JakeStevens @digantdesai