Skip to content

Arm backend: Test TOSA, Ethos-U55 and Ethos-U85 on github #6888

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

Conversation

zingo
Copy link
Collaborator

@zingo zingo commented Nov 15, 2024

This will run some more models in the github test flow and also enable some unit tests to use Corston3x0 FVP.

This structure up the Arm backend testing into separate runable scripts in the same structure as other backends.

Copy link

pytorch-bot bot commented Nov 15, 2024

🔗 Helpful Links

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

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

✅ No Failures

As of commit d371bc7 with merge base 241cd0c (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 Nov 15, 2024
@zingo zingo added partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm ciflow/trunk labels Nov 15, 2024
@zingo zingo requested a review from digantdesai November 15, 2024 12:30
@zingo zingo force-pushed the Arm-backend-Test-TOSA,-Ethos-U55-and-Ethos-U85-on-github branch from ee45572 to bd5ecd9 Compare November 15, 2024 14:38
@zingo zingo removed the request for review from digantdesai November 15, 2024 15:20
@zingo zingo force-pushed the Arm-backend-Test-TOSA,-Ethos-U55-and-Ethos-U85-on-github branch 2 times, most recently from f466583 to 2a6eab5 Compare November 15, 2024 15:37
@zingo zingo marked this pull request as draft November 15, 2024 20:05
@zingo zingo force-pushed the Arm-backend-Test-TOSA,-Ethos-U55-and-Ethos-U85-on-github branch 2 times, most recently from ed5aaba to d6affa5 Compare November 16, 2024 12:13
@zingo zingo requested a review from digantdesai November 16, 2024 12:39
@zingo zingo marked this pull request as ready for review November 16, 2024 12:40
@zingo
Copy link
Collaborator Author

zingo commented Nov 16, 2024

Hi @digantdesai this changes files outside Arm folders and need Meta review

@freddan80
Copy link
Collaborator

lgtm, but @digantdesai should have a look as well

@zingo
Copy link
Collaborator Author

zingo commented Nov 21, 2024

@pytorchbot label "topic: not user facing"

@digantdesai
Copy link
Contributor

Love it. One consideration though, we should try to set this scripts such a way that not just a CI but a human (or a tutorial doc) can use this directly without any changes.

This way there is only one source of truth.

Stamping it to unblock you.

.ci/scripts/setup-arm_baremetal.sh

# Run pytest
.ci/scripts/test_arm_baremetal.sh test_pytest
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you know the time increase?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think currently running with FVP vs without is about 2min 30sec (14ish min vs 16,5ish min ) if OK to always run with FVP then we are happy doing that. I just tried to avoid it in the geneal pull job from my understanding of old discussions :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

But that was before I measured the job diff and spotted that it might have been ok

# Run arm unit tests
pytest -c /dev/null -v -n auto --cov=./ --cov-report=xml backends/arm/test
# Run arm pytest tests with Corstone3x0 FVP testing
.ci/scripts/test_arm_baremetal.sh test_pytest_ethosu_fvp
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess firing fvp a bunch of time is more time consuming compared to running a single large-ish model like mv2?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Maybe, we have a patch to make it run FVP faster ongoing also.

Copy link
Collaborator Author

@zingo zingo Nov 21, 2024

Choose a reason for hiding this comment

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

But the we are also adding more FVP testing. Lets see how it pans out a bit over time.

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah I saw that. Thanks

@zingo
Copy link
Collaborator Author

zingo commented Nov 21, 2024

The plan was to make it easy to run. So we can use it in our CI also and other tests. We can describe them in the readme, at least the test script. Do you want the script to move out of the .ci Folders and placed under backend/arm/test or similar place in that in that case?

@digantdesai
Copy link
Contributor

Do you want the script to move out of the .ci Folders and placed under backend/arm/test or similar place in that in that case?

I don't have a strong preference on where the script lives, as long as a user can just run it on a shell without hacking it up would be a nice-to-have, esp for Tutorial where we can point and know it will work because it is tested by CI.

@zingo
Copy link
Collaborator Author

zingo commented Nov 25, 2024

I don't have a strong preference on where the script lives, as long as a user can just run it on a shell without hacking it up would be a nice-to-have, esp for Tutorial where we can point and know it will work because it is tested by CI.

Could make since (and I kind of like to) move at least the test part (setup could be CI/user specific, but it could also follow) to something like backends/arm/test

I look into that after some other stuff, depending on your wish of getting this is fast or not I can update this patch (a bit slower) or take it as a later patch if this get merged before.

@zingo zingo marked this pull request as draft November 28, 2024 13:08
@zingo zingo force-pushed the Arm-backend-Test-TOSA,-Ethos-U55-and-Ethos-U85-on-github branch from d98d5b0 to 510aef3 Compare December 17, 2024 12:35
@zingo zingo marked this pull request as ready for review December 17, 2024 12:37
@zingo
Copy link
Collaborator Author

zingo commented Dec 17, 2024

Love it. One consideration though, we should try to set this scripts such a way that not just a CI but a human (or a tutorial doc) can use this directly without any changes.

This way there is only one source of truth.

Stamping it to unblock you.

Updated the patch to it's more easy to run for anyone and added it to our README.md
IT will be nice and more easy now to add more stuff to this over time :)

I don't have a strong preference on where the script lives, as long as a user can just run it on a shell without hacking it up would be a nice-to-have, esp for Tutorial where we can point and know it will work because it is tested by CI.

Moved the script to our testing folder, it makes more sense to have it there and more available for anyone.

@zingo zingo force-pushed the Arm-backend-Test-TOSA,-Ethos-U55-and-Ethos-U85-on-github branch from 510aef3 to 108bd73 Compare December 17, 2024 13:28
@zingo zingo marked this pull request as draft December 17, 2024 15:48
@zingo zingo force-pushed the Arm-backend-Test-TOSA,-Ethos-U55-and-Ethos-U85-on-github branch 4 times, most recently from 426ce47 to b2d6a38 Compare December 20, 2024 09:27
This will run some more models in the github test flow and
also enable some unit tests to use Corston3x0 FVP.

This structure up the Arm backend testing into separate runable
scripts in the same structure as other backends.

Signed-off-by: Zingo Andersen <[email protected]>
Change-Id: I5e11b1aca19460845e330b84d0696513c400c0f0
@zingo zingo force-pushed the Arm-backend-Test-TOSA,-Ethos-U55-and-Ethos-U85-on-github branch from b2d6a38 to 1ad6338 Compare December 20, 2024 11:13
@zingo zingo marked this pull request as ready for review December 20, 2024 11:43
@zingo
Copy link
Collaborator Author

zingo commented Dec 20, 2024

MacOs test error seems unrelated to patch

@freddan80 freddan80 merged commit 9a23cff into pytorch:main Jan 8, 2025
137 checks passed

# NB: This function could be used to install Arm dependencies
# Setup arm example environment (including TOSA tools)
git config --global user.email "[email protected]"
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we need to do this? I tried to run this script to repro a build issue and unknowingly set the name and email incorrectly on several github commits.

Copy link
Collaborator Author

@zingo zingo Jan 14, 2025

Choose a reason for hiding this comment

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

Ouch sorry about that.
It just followed along when moved from install_arm() in
.ci/scripts/utils.sh (in the same patch)

I'm not sure if it is needed when running in the CI nowdays, some time back the examples/arm/setup.sh did some git cloning of Vela and other repos and I assume it might have been needed then. Ot it could be related to the patch scripts that was used for Vela patches.

@zingo zingo deleted the Arm-backend-Test-TOSA,-Ethos-U55-and-Ethos-U85-on-github branch February 13, 2025 12:05
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.

6 participants