Skip to content

Refactor TOSA backend preprocess to use visitor pattern #1099

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

Jerry-Ge
Copy link
Contributor

@Jerry-Ge Jerry-Ge commented Oct 26, 2023

No lowering logic change. Only a very large refactor patch to make the current code more modular for easier future maintenance and development.

@pytorch-bot
Copy link

pytorch-bot bot commented Oct 26, 2023

🔗 Helpful Links

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

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

❌ 1 New Failure

As of commit e727104 with merge base a8e05cc (image):

NEW FAILURE - The following job has failed:

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 26, 2023
@netlify
Copy link

netlify bot commented Oct 26, 2023

Deploy Preview for resplendent-gnome-14e531 canceled.

Name Link
🔨 Latest commit d418930
🔍 Latest deploy log https://app.netlify.com/sites/resplendent-gnome-14e531/deploys/6539e14dfa168a0007dc0793

Copy link
Contributor

@digantdesai digantdesai left a comment

Choose a reason for hiding this comment

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

So clean!! :) Left some comments but lgtm.

nit - seems like there are some changes which are not purely refactor, perhaps move them to another PR?

@cccclai
Copy link
Contributor

cccclai commented Nov 1, 2023

This is great! I have no idea how you manage to read the previous code....

Signed-off-by: Jerry Ge <[email protected]>
Change-Id: I1d7275bdc81c9ad60c27f21fa604c134aa3e3646
@Jerry-Ge
Copy link
Contributor Author

Jerry-Ge commented Nov 1, 2023

This is great! I have no idea how you manage to read the previous code....

I don't think you can 🙂


# Helper function to do broadcasting
# Ref: https://www.mlplatform.org/tosa/tosa_spec.html#_broadcasting
def broadcastShapes(shape1, shape2):
Copy link
Contributor

Choose a reason for hiding this comment

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

does arm kernel supports broadcast?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Jerry-Ge
Copy link
Contributor Author

Jerry-Ge commented Nov 1, 2023

the lint-runner failure should not be related to this patch

+ lintrunner --force-color --all-files --tee-json=lint.json


>>> Lint for sdk/size_analysis_tool/size_analysis_tool.py:

  Warning (FLAKE8) F401
    'executorch.sdk.etrecord._etrecord.ETRecordReservedFileNames' imported
    but unused
    See https://www.flake8rules.com/rules/F401.html.

@digantdesai
Copy link
Contributor

the lint-runner failure should not be related to this patch

+ lintrunner --force-color --all-files --tee-json=lint.json


>>> Lint for sdk/size_analysis_tool/size_analysis_tool.py:

  Warning (FLAKE8) F401
    'executorch.sdk.etrecord._etrecord.ETRecordReservedFileNames' imported
    but unused
    See https://www.flake8rules.com/rules/F401.html.

yeah should be fixed soon, feel free to ignore

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

Copy link
Contributor

@digantdesai digantdesai left a comment

Choose a reason for hiding this comment

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

I am assuming you ran e2e and also setup.sh and run.sh from examples/arm dir?

@facebook-github-bot
Copy link
Contributor

@digantdesai merged this pull request in 53a5cb6.

@robell robell added the partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm label Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

5 participants