Skip to content

Arm backend: Populate __init__.py for quantizer and Arm root #10351

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

Merged
merged 1 commit into from
Apr 22, 2025

Conversation

oscarandersson8218
Copy link
Collaborator

@oscarandersson8218 oscarandersson8218 commented Apr 22, 2025

Populate backends/arm/quantizer/init.py and backends/arm/init.py

cc @digantdesai @freddan80 @per @zingo

Populate backends/arm/quantizer/__init__.py and
backends/arm/__init__.py

Signed-off-by: Oscar Andersson <[email protected]>
Change-Id: If8e4c89a9d0393b5cd7c8e6639fd67be39f77ca9
Copy link

pytorch-bot bot commented Apr 22, 2025

🔗 Helpful Links

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

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

✅ No Failures

As of commit 588c5cc with merge base 95c663e (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 Apr 22, 2025
@oscarandersson8218 oscarandersson8218 added partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm ciflow/trunk topic: not user facing and removed CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. labels Apr 22, 2025
@zingo zingo merged commit 9e64882 into pytorch:main Apr 22, 2025
175 of 176 checks passed
@digantdesai
Copy link
Contributor

digantdesai commented Apr 23, 2025

Oscar, this is causing issues internally since we didn't update the buck files. We may have to revert depending on how soon I can forward fix :(

Also for test/common.py we are using old import for ArmCompileSpecBuilder, also getting ImportError: cannot import name 'ArmCompileSpecBuilder' from partially initialized module 'executorch.backends.arm.arm_backend'

And we are not exposing is_tosa or get_tosa_spec from arm_backend.py through init, just an oversight?

cc @jackzhxng

@oscarandersson8218
Copy link
Collaborator Author

oscarandersson8218 commented Apr 23, 2025

@digantdesai feel free to revert this if necessary.

I can fix the import in test/common.py but I'm not able to reproduce the ImportError. When are you seeing this error?

With regards to is_tosa and get_tosa_spec I don't think these should be exposed as they are helper functions for our testing rather than something an end user would use. But for sure, we can expose those as well if you think that looks better :)

@digantdesai
Copy link
Contributor

Yeah I haven't looked into where the circular dependency is coming from.. this is when I try to update the buck files.

re. is_tosa etc. it might be OK but feel it is cleaner to import from one module namespace when they are in the same python file. We can move them into other file if you don't want to expose them to the end users.

Also I see main, operators, quantizer, _passes have init.py, are you planning to refactor others beyond main and quantizer here?

digantdesai added a commit to digantdesai/executorch-1 that referenced this pull request Apr 23, 2025
Summary:
Expose Quantizer and quant config through __init__.py

Relanding Oscar's pytorch#10351 (but in parts)

Differential Revision: D73530601
digantdesai added a commit to digantdesai/executorch-1 that referenced this pull request Apr 24, 2025
Summary:

Expose Quantizer and quant config through __init__.py

Relanding Oscar's pytorch#10351 (but in parts)

Differential Revision: D73530601
digantdesai added a commit to digantdesai/executorch-1 that referenced this pull request Apr 24, 2025
Summary:

Expose Quantizer and quant config through __init__.py

Relanding Oscar's pytorch#10351 (but in parts)

Differential Revision: D73530601
digantdesai added a commit to digantdesai/executorch-1 that referenced this pull request Apr 24, 2025
Summary:

Expose Quantizer and quant config through __init__.py

Relanding Oscar's pytorch#10351 (but in parts)

bypass-github-export-checks
bypass-github-pytorch-ci-checks
bypass-github-executorch-ci-checks

Reviewed By: jackzhxng

Differential Revision: D73530601
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/trunk 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