Skip to content

Conversation

@haowhsu-quic
Copy link
Collaborator

Test plan

# build xnnpack
cd executorch
export ANDROID_NDK_ROOT=path/to/ndk
./build_xnnpack.sh
# benchmark example for xnnpack
cd optimum
optimum-cli export executorch --model "microsoft/swin-tiny-patch4-window7-224" --task "image-classification" --recipe "xnnpack" --output_dir optimum/xnn_artifacts/swin
cd executorch
python benchmark.py -b xnn -p path/to/optimum/xnn_artifacts/swin/model.pte -s $DEVICE --iteration 150
# benchmark example for qnn
cd executorch
python benchmark.py -b qnn -p path/to/swin_qnn_q8.pte -s $DEVICE --iteration 400

Statistics will be something like:

load: 272.587000
1st: 4.648000
avg: 3.960253
peak_mem: 88766
avg_mem: 84006.000

@pytorch-bot
Copy link

pytorch-bot bot commented May 21, 2025

🔗 Helpful Links

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

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

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

❌ 9 New Failures, 2 Cancelled Jobs, 4 Unrelated Failures

As of commit 4f5a23c with merge base f32cdc3 (image):

NEW FAILURES - The following jobs have failed:

CANCELLED JOBS - The following jobs were cancelled. Please retry:

FLAKY - The following job failed but was likely due to flakiness present on trunk:

BROKEN TRUNK - The following jobs failed but was 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 May 21, 2025
@github-actions
Copy link

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:.

If not, please add the release notes: none label.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

benchmark.py Outdated
@@ -0,0 +1,211 @@
import argparse
Copy link
Contributor

Choose a reason for hiding this comment

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

This is helpful. Should we add this script to the devtools as a cli tool so others can also use it? And expand to other backend like vulkan as well.

@kimishpatel
Copy link
Contributor

How are we generating pte file for QNN. It will be good to have that recipe and ideally if it is available on optimum-cli that would be great

@cccclai
Copy link
Contributor

cccclai commented May 31, 2025

How are we generating pte file for QNN. It will be good to have that recipe and ideally if it is available on optimum-cli that would be great

Those are listed in https://github.com/pytorch/executorch/tree/main/examples/qualcomm/oss_scripts

build_xnnpack.sh Outdated
-B$BUILD_FOLDER .

cmake --build $BUILD_FOLDER -j9 --target install --config $BUILD_TYPE

Copy link
Contributor

Choose a reason for hiding this comment

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

This should generate extecutorch libraries, now you need to build a runner which uses this.

@github-actions
Copy link

github-actions bot commented Sep 9, 2025

Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as Stale.
Feel free to remove the Stale label if you feel this was a mistake.
If you are unable to remove the Stale label please contact a maintainer in order to do so.
If you want the bot to never mark this PR stale again, add the no-stale label.
Stale pull requests will automatically be closed after 30 days of inactivity.

@github-actions github-actions bot added the stale PRs inactive for over 60 days label Sep 9, 2025
@haowhsu-quic haowhsu-quic force-pushed the dev_optimum branch 2 times, most recently from 97aa323 to 389de0a Compare October 8, 2025 09:43
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. stale PRs inactive for over 60 days

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants