Skip to content

Add generic annotator for data layout ops #5814

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

Closed
wants to merge 1 commit into from

Conversation

benkli01
Copy link
Collaborator

@benkli01 benkli01 commented Oct 2, 2024

Data layout ops like unsqueeze are not annotated by the quantizer per default which leads to issues down the line. Therefore we add a generic annotator to explicitly annotate those ops.

Data layout ops like unsqueeze are not annotated by the quantizer per
default which leads to issues down the line. Therefore we add a generic
annotator to explicitly annotate those ops.

Signed-off-by: Benjamin Klimczak <[email protected]>
Change-Id: Id3919abcb3df0b81159f3cccaab9785f8706b9cd
Copy link

pytorch-bot bot commented Oct 2, 2024

🔗 Helpful Links

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

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

❌ 3 New Failures, 1 Unrelated Failure

As of commit 265cdb7 with merge base 393553c (image):

NEW FAILURES - The following jobs have failed:

BROKEN TRUNK - The following job failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

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 Oct 2, 2024
@benkli01 benkli01 added partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm ciflow/trunk labels Oct 2, 2024
@digantdesai
Copy link
Contributor

Data layout ops like unsqueeze are not annotated by the quantizer per default which leads to issues down the line

Can you elaborate? what issues? Is it just lowering issues?

@@ -271,6 +271,7 @@ class ArmQuantizer(Quantizer):
"mm",
"cat",
"one_to_one",
"generic",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: too vague? May it's just me.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it is a bit vague (generic even 😅), but naming things is hard...



class TestGenericAnnotator(unittest.TestCase):
def check_annotation(self, model):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@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.

@benkli01
Copy link
Collaborator Author

benkli01 commented Oct 3, 2024

Data layout ops like unsqueeze are not annotated by the quantizer per default which leads to issues down the line

Can you elaborate? what issues? Is it just lowering issues?

Yes, it's a lowering issue. If the data layout op is in the beginning of the graph the forward propagation of annotations does not work (unless we annotate the inputs explicitly). We tried implementing a backward propagation as well, but sharing specs in the backward direction seems to be not supported, so we went for explicit annotation. Or are we missing something?

@facebook-github-bot
Copy link
Contributor

@digantdesai merged this pull request in 98a58e0.

@benkli01 benkli01 deleted the add-generic-annotator branch October 8, 2024 14:38
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. Merged partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants