Skip to content

Conversation

@larryliu0820
Copy link
Contributor

Summary

[PLEASE REMOVE] See CONTRIBUTING.md's Pull Requests for ExecuTorch PR guidelines.

[PLEASE REMOVE] If this PR closes an issue, please add a Fixes #<issue-id> line.

[PLEASE REMOVE] If this PR introduces a fix or feature that should be the upcoming release notes, please add a "Release notes: " label. For a list of available release notes labels, check out CONTRIBUTING.md's Pull Requests.

Test plan

[PLEASE REMOVE] How did you test this PR? Please write down any manual commands you used and note down tests that you have written if applicable.

@pytorch-bot
Copy link

pytorch-bot bot commented Nov 4, 2025

🔗 Helpful Links

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

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

❌ 8 New Failures, 3 Unrelated Failures

As of commit 1acb151 with merge base 3826f44 (image):

NEW FAILURES - The following jobs have failed:

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.

@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 Nov 4, 2025
@github-actions
Copy link

github-actions bot commented Nov 4, 2025

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:. This helps us keep track and include your important work in the next release notes.

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.

@cccclai
Copy link
Contributor

cccclai commented Nov 4, 2025

Thanks! I added the binary ci job to make sure the wheel package publishing path is still working

@cccclai
Copy link
Contributor

cccclai commented Nov 5, 2025

Hi @haowhsu-quic, can you review the changes inside backends/qualcomm?

endif()

if(NOT DEFINED QNN_SDK_ROOT)
if(_qnn_host_is_linux_x86)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I’m not sure I understand the reason for this condition, as both Android and x86 builds require the QNN SDK.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is for pip wheels only. Like Chen said, maybe I should condition on that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@shewu-quic can you give some advice on how to move forward? The purpose of this PR is quite simple: to move the qnn build logic from setup.py to backends/qualcomm/CMakeLists.txt. Notice that the logic in setup.py is unique to wheel building and I'm trying to wrap my head on why building the runtime doesn't require downloading the sdk.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Based on my understanding, you want to include libqnn_executorch_backend.so and the pybind files in the wheel build so users can install via pip without needing to set QNN_SDK_ROOT or download qnn sdk.

We could add a step to download the QNN SDK if QNN_SDK_ROOT is not set, similar to your approach, and use "if is_linux_x86():" in setup.py to avoid installation on unsupported systems for now. Does this approach work for you?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for the reply, I think that should work. Let me sync with @cccclai to have more understanding.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it makes sense to gate this change by EXECUTORCH_BUILD_PYBIND. After talking to @cccclai I think we agree that this code path should not be used by cases other than building ET wheel.

set(_qnn_host_is_linux_x86 TRUE)
endif()

if(NOT DEFINED QNN_SDK_ROOT)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the logic below is for wheel only, so probably better to have a separate env variable to control

@larryliu0820 larryliu0820 force-pushed the qnn_sdk_install_refactor branch from 209f881 to eec27d3 Compare November 12, 2025 22:45
@larryliu0820 larryliu0820 force-pushed the qnn_sdk_install_refactor branch from b390043 to 5bb8f91 Compare November 13, 2025 20:07
Copy link
Collaborator

@shewu-quic shewu-quic left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

Copy link
Contributor

@cccclai cccclai left a comment

Choose a reason for hiding this comment

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

Thank you for making the changes

@larryliu0820 larryliu0820 force-pushed the qnn_sdk_install_refactor branch from 5bb8f91 to 1acb151 Compare November 17, 2025 19:24
@larryliu0820 larryliu0820 merged commit 7c746f7 into main Nov 18, 2025
190 of 201 checks passed
@larryliu0820 larryliu0820 deleted the qnn_sdk_install_refactor branch November 18, 2025 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/binaries CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants