Skip to content

Arm backend: Add TOSA support for GroupNorm #10198

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 2 commits into from
Jun 2, 2025

Conversation

YufengShi-dudu
Copy link
Collaborator

@YufengShi-dudu YufengShi-dudu commented Apr 15, 2025

  • Decompose groupnorm into a sequence of supported operators
  • Have some numerical issues with BI profile
  • Fix docstring in decompose_layernorm_pass
  • Add "native_group_norm.default" to CUSTOM_EDGE_OPS

Change-Id: I3f70388c12b8d9afd52876840b6c008a1b0bec4e

cc @digantdesai @freddan80 @per @zingo @oscarandersson8218

@YufengShi-dudu YufengShi-dudu added partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm ciflow/trunk topic: not user facing labels Apr 15, 2025
Copy link

pytorch-bot bot commented Apr 15, 2025

🔗 Helpful Links

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

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

✅ You can merge normally! (1 Unrelated Failure)

As of commit bf10831 with merge base d4906e2 (image):

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 Apr 15, 2025
@YufengShi-dudu
Copy link
Collaborator Author

Flaky behaviors on BI profile need to be investigated.
Consider to add xfails to fix it for now.

@YufengShi-dudu YufengShi-dudu requested a review from zingo April 15, 2025 16:16
@zingo
Copy link
Collaborator

zingo commented May 5, 2025

Arm test fail Does it need a fix or rebase?

@YufengShi-dudu YufengShi-dudu force-pushed the add-native-group-norm branch from 3ef5cb2 to f5d8911 Compare May 8, 2025 11:48
@zingo
Copy link
Collaborator

zingo commented May 8, 2025

Hi unfortunately it got a merge conflict and probably needs to be rebased after #10776 was merged.
Sorry about that.

@YufengShi-dudu YufengShi-dudu force-pushed the add-native-group-norm branch from 3f5ef3c to d69c2ec Compare May 13, 2025 13:16
@YufengShi-dudu
Copy link
Collaborator Author

Label topic: not user facing is already added. Label release notes: shouldn't be required in this case.

@YufengShi-dudu YufengShi-dudu requested a review from martinlsm May 13, 2025 13:51
@YufengShi-dudu
Copy link
Collaborator Author

YufengShi-dudu commented May 13, 2025

Failure in test-arm-backend:

FAILED backends/arm/test/ops/test_conv_combos.py::test_convolution_2d_tosa_BI_relu6[combo_conv_relu_neg_0_5_x_4d] - AssertionError: Output 0 does not match reference output.
	Given atol: 0.001, rtol: 0.001.
	Output tensor shape: torch.Size([1, 3, 254, 254]), dtype: torch.float32
	Difference: max: 0.0, abs: 0.004461079835891724, mean abs error: 1.152445605612229e-07.
	-- Model vs. Reference --
	 Numel: 193548, 193548
	Median: 0.0, 0.0
Traceback (most recent call last):
	  Mean: 0.09737735241651535, 0.0973774641752243
	   Max: 1.1375709772109985, 1.1375709772109985
	   Min: 0.0, 0.0

Do we need to mark test_convolution_2d_tosa_BI_relu6 as flaky?

@zingo
Copy link
Collaborator

zingo commented May 14, 2025

This seem to again got "This branch has conflicts that must be resolved" :(

- Decompose groupnorm into a sequence of supported operators
- Have some numerical issues with BI profile
- Fix docstring in decompose_layernorm_pass
- Add "native_group_norm.default" to CUSTOM_EDGE_OPS

Change-Id: I3f70388c12b8d9afd52876840b6c008a1b0bec4e
Signed-off-by: Yufeng Shi <[email protected]>
@YufengShi-dudu YufengShi-dudu force-pushed the add-native-group-norm branch from 83fe44f to 2b18e66 Compare June 2, 2025 10:05
@zingo zingo added release notes: none Do not include this in the release notes and removed topic: not user facing labels Jun 2, 2025
@zingo
Copy link
Collaborator

zingo commented Jun 2, 2025

Unrelated fail
trunk / test-llama-torchao-lowbit / macos-job

@zingo zingo merged commit ef7a6ea into pytorch:main Jun 2, 2025
191 of 193 checks passed
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 release notes: none Do not include this in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants