Skip to content

Conversation

@DannyYuyang-quic
Copy link
Contributor

@DannyYuyang-quic DannyYuyang-quic commented Jan 7, 2026

Qualcomm AI Engine Direct - Fix OpTrace Profiling demo script

Summary

  • Fix OpTrace Profiling demo script
  • remove redundant flags from QNN tool

Test plan

python -m examples.qualcomm.util_scripts.qairt_visualizer_demo -s {SERIAL_NUM} -m ${SOC_MODEL} -b build-android -a ${path_to_output_folder}
python -m examples.qualcomm.util_scripts.qairt_visualizer_demo -s {SERIAL_NUM} -m ${SOC_MODEL} -b build-android -a ${path_to_output_folder} --online_prepare
python -m backends.qualcomm.tests.test_qnn_delegate.TestUtilsScript.test_debugger_generate_optrace  -s {SERIAL_NUM} -m ${SOC_MODEL} -b build-android --executorch_root . -a .

@pytorch-bot
Copy link

pytorch-bot bot commented Jan 7, 2026

🔗 Helpful Links

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

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

❌ 4 New Failures, 1 Unrelated Failure

As of commit c1af223 with merge base 913436a (image):

NEW FAILURES - The following jobs have failed:

UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla 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 Jan 7, 2026
@DannyYuyang-quic
Copy link
Contributor Author

Hi @cccclai,

The OpTrace profiling demo script was passing an incorrect example input shape to the QNN toolchain, the example input must be provided as a batch input. Passing a input without batch dimension causes qnn-net-run to fail during execution.

This change fixes the demo script by using the correct input type and
removes redundant QNN tool flags that are no longer required.

Please have a look!
Thanks!

@DannyYuyang-quic
Copy link
Contributor Author

@pytorchbot label "release notes: qualcomm"

@pytorch-bot pytorch-bot bot added the release notes: qualcomm Changes to the Qualcomm backend delegate label Jan 7, 2026
)


def main(args) -> None:
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we have tests for it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for pointing this out!

We already have a test covering this test here:
https://github.com/pytorch/executorch/blob/main/backends/qualcomm/tests/test_qnn_delegate.py#L8176
In one of the earlier changes, this test was already failing in internal CI, but that failure wasn’t noticed at that time.
It’s now passing and can be used as expected.

@DannyYuyang-quic DannyYuyang-quic force-pushed the dev1/danny/fix_optrace_example_script branch from 366916a to c1af223 Compare January 8, 2026 02:01
@cccclai cccclai merged commit 806c8e8 into pytorch:main Jan 9, 2026
137 of 142 checks passed
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. release notes: qualcomm Changes to the Qualcomm backend delegate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants