Skip to content

Qualcomm AI Engine Direct - Minimal Inference Runtime Core Requirment#18434

Merged
abhinaykukkadapu merged 3 commits intopytorch:mainfrom
CodeLinaro:dev1/winskuo/reduce_library_size
Apr 8, 2026
Merged

Qualcomm AI Engine Direct - Minimal Inference Runtime Core Requirment#18434
abhinaykukkadapu merged 3 commits intopytorch:mainfrom
CodeLinaro:dev1/winskuo/reduce_library_size

Conversation

@winskuo-quic
Copy link
Copy Markdown
Collaborator

@winskuo-quic winskuo-quic commented Mar 24, 2026

Summary

  1. Removed from_blob tensor creation
  2. Compile and Linking Option optimization
  3. Function visibility optimization
  4. Expose Power Config to user: This is a quick workaround, however, we should expose more configs for user to set. To make it easier for user to set all configs, we have also perform some refactor on Python API to make it easier to achieve this. Python API refactor PR: Qualcomm AI Engine Direct - Python API Refactor #18312

Test plan

add --direct_build_folder build-hexagon/ at end of any TestQNNQuantizedUtils, TestQNNQuantizedModel, TestQNNFloatingPointModel, TestQNNFloatingPointOperator

Author: @haowhsu-quic, @shewu-quic, @winskuo-quic

@pytorch-bot
Copy link
Copy Markdown

pytorch-bot bot commented Mar 24, 2026

🔗 Helpful Links

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

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

❌ 1 New Failure, 2 Unrelated Failures

As of commit 3c9a652 with merge base c7f1d72 (image):

NEW FAILURE - The following job has failed:

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.

@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 Mar 24, 2026
@github-actions
Copy link
Copy Markdown

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.

@abhinaykukkadapu
Copy link
Copy Markdown
Contributor

@winskuo-quic can you please rebase.

@winskuo-quic winskuo-quic force-pushed the dev1/winskuo/reduce_library_size branch from b52b847 to 0f916c6 Compare March 27, 2026 09:42
@winskuo-quic
Copy link
Copy Markdown
Collaborator Author

@winskuo-quic can you please rebase.

I have rebased. Thanks

@winskuo-quic winskuo-quic marked this pull request as draft March 31, 2026 05:08
@winskuo-quic winskuo-quic force-pushed the dev1/winskuo/reduce_library_size branch from 0f916c6 to 4883181 Compare March 31, 2026 06:25
@winskuo-quic winskuo-quic changed the title Qualcomm AI Engine Direct - Minimal Inerence Runtime Core Requirment Qualcomm AI Engine Direct - Minimal Inference Runtime Core Requirment Mar 31, 2026
@winskuo-quic winskuo-quic marked this pull request as ready for review March 31, 2026 06:27
@meta-codesync
Copy link
Copy Markdown
Contributor

meta-codesync bot commented Apr 3, 2026

@abhinaykukkadapu has imported this pull request. If you are a Meta employee, you can view this in D99394613.

auto dump_tensor = executorch::extension::from_blob(
QNN_TENSOR_VER_PTR(output_tensor)->clientBuf.data,
sizes,
std::vector<executorch::aten::StridesType> stride_size(sizes.size(), 0);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@winskuo-quic do we want to init zeros for stride?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Updated to align with from_blob behavior. Thanks

1. Removed from_blob tensor creation
2. Compile and Linking Option optimization
3. Function visibility optimization
4. Expose Power Config to user
@winskuo-quic winskuo-quic force-pushed the dev1/winskuo/reduce_library_size branch from 4883181 to 3c9a652 Compare April 7, 2026 02:48
@abhinaykukkadapu abhinaykukkadapu merged commit 788be2d into pytorch:main Apr 8, 2026
174 of 180 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants