Qualcomm AI Engine Direct - Python API Refactor#18312
Qualcomm AI Engine Direct - Python API Refactor#18312winskuo-quic wants to merge 1 commit intopytorch:mainfrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/18312
Note: Links to docs will display an error until the docs builds have been completed. ⏳ 4 Pending, 3 Unrelated FailuresAs of commit 4a6594d with merge base ca2a616 ( BROKEN TRUNK - The following jobs 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. |
This PR needs a
|
8f0d3da to
4a6594d
Compare
Summary
The biggest goal of this PR is to improve user experience by maintaining consistency across all example scripts and provide an official config file for QNN APIs.

In the past, user has to manually provide params to APIs such as build_executorch_binary to make it work. However, not all the params are passed in the build_executorch_binary, making some of the flags not working, which leaves users confused. Taking example below, if user tries to skip node in script 1, it will fail.
For this reason, we want to maintain a QnnConfig structure as an official config file.
If we want to introduce a new flag to our APIs, if we want all scripts to benefit from the flag, we will need to update all our example scripts, making it hard to maintain as we support more flags and more scripts. With this feature, we don't have to manually update all example scripts when a new flag is introduced. Instead, all QnnConfig will parse it itself and we don't have to update the example script at all.
This PR does the following:
backends/qualcomm/export_utils.py. The reason of doing this is API calls shouldn't be underexamplesfolder. Furthermore,pip install executorchdoes not includeexamples/qualcommfolder, meaning these APIs are not exposed to users that usespip install.compile_only,pre_gen_pte,skip_push,profile_level,dump_intermediate_outputs,shared_buffer,skip_delegate_node_ids,skip_delegate_node_ops.Test plan
Passes all tests under
test_qnn_delegate.py.