Skip to content
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

Arm backend: qdq folding support for remaining operators #7340

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

oscarandersson8218
Copy link
Collaborator

Summary

Based on work in #7330, add support for qdq-folding of remaining operators.

Copy link

pytorch-bot bot commented Dec 17, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/7340

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit cdd6c91 with merge base 5190106 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Dec 17, 2024
@oscarandersson8218 oscarandersson8218 added partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm ciflow/trunk topic: not user facing labels Dec 17, 2024
@oscarandersson8218
Copy link
Collaborator Author

This is based on #7330 which was merged, but now has been reverted 11beed1

Edge operators that are lowered to TOSA TABLEs are convereted to a
custom edge IR table-op.

Signed-off-by: Oscar Andersson <oscar.andersson@arm.com>
Change-Id: I147008c30b9b46c7b8ae1a1c15bc540fea614a69
This is a special case where node.args can be lists with many incoming
dq-nodes.

Signed-off-by: Oscar Andersson <oscar.andersson@arm.com>
Change-Id: Icf511a8bdeaaffb597b18455ab7f1fbd947ce3ca
@freddan80
Copy link
Collaborator

Rebase pls

Add support for q/dq folding of more operators such as hardtanh,
maxpool2d, mul, relu, select, sub, to_copy.

Signed-off-by: Oscar Andersson <oscar.andersson@arm.com>
Change-Id: Ifdabda4c927dade41c000859054696844c546f7b
sum is retraced to an int64 dtype of operator after q/dq folding.
This patch adds a pass to manually force the dtype to be int8.

Signed-off-by: Oscar Andersson <oscar.andersson@arm.com>
Change-Id: Ifa737a398c5a878d52cd76a2392499905da085ce
Add support for q/dq folding for the remaining supported ops in Arm
backend.

Signed-off-by: Oscar Andersson <oscar.andersson@arm.com>
Change-Id: I9012b4a501ce018c9771c729706be3b031a5c7ae
Signed-off-by: Oscar Andersson <oscar.andersson@arm.com>
Change-Id: Ibb17add461dc79e022a7f4accde29f9f9d61b16d
Address issues from pyre and add similar # pyre-ignores as in
pytorch#7362.

Signed-off-by: Oscar Andersson <oscar.andersson@arm.com>
Change-Id: I6feaa611dcd539b3b0d21a6a7dd696ef7db691ef
@facebook-github-bot
Copy link
Contributor

@digantdesai has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@digantdesai
Copy link
Contributor

Some type checker issues (so far, still running)

executorch/backends/arm/operators/op_bmm.py:54:28 Undefined attribute [16]: Module `executorch.backends.arm` has no attribute `_passes`.
executorch/backends/arm/operators/op_relu.py:45:24 Undefined attribute [16]: Module `executorch.backends.arm` has no attribute `_passes`.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/trunk CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm topic: not user facing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants