Skip to content

Fix QNN online-prepare graph handle retrieval - #21860

Open
sylvesterkaczmarek wants to merge 1 commit into
pytorch:mainfrom
sylvesterkaczmarek:fix-21804-qnn-online-prepare-graph-handle
Open

Fix QNN online-prepare graph handle retrieval#21860
sylvesterkaczmarek wants to merge 1 commit into
pytorch:mainfrom
sylvesterkaczmarek:fix-21804-qnn-online-prepare-graph-handle

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown

Fixes #21804.

QnnContext::Configure() registers DLC graphs into the QNN context for ONLINE_PREPARE before QnnGraph::Configure() runs. The graph configuration path then skipped both graph creation and graph retrieval, leaving graph_handle null and storing it in handle_.

This change retrieves already-registered DLC graphs with qnn_graph_retrieve, matching the deserialization path, applies AfterRetrieveGraph, and defensively rejects a null graph handle before bookkeeping.

Validation: checked the initialization sequence through QnnContext::Configure() and QnnManager::InitContext(), and kept the serialize/multi-graph creation paths unchanged.

@pytorch-bot

pytorch-bot Bot commented Aug 15, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

⚠️ 12 Awaiting Approval, 1 Pending

As of commit 487b3ea with merge base ed65b12 (image):

AWAITING APPROVAL - The following workflows need approval before CI can run:

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

@meta-cla

meta-cla Bot commented Aug 15, 2026

Copy link
Copy Markdown

Hi @sylvesterkaczmarek!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@linux-foundation-easycla

linux-foundation-easycla Bot commented Aug 15, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: sylvesterkaczmarek / name: Sylvester Kaczmarek (487b3ea)

Copy link
Copy Markdown
Author

@pytorchbot label "release notes: qualcomm"

@pytorch-bot pytorch-bot Bot added the release notes: qualcomm Changes to the Qualcomm backend delegate label Aug 15, 2026
@meta-cla

meta-cla Bot commented Aug 15, 2026

Copy link
Copy Markdown

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@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 Aug 15, 2026
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.

Deterministic SIGSEGV in Method::execute_instruction via EventTracerProfileOpScope destructor — QNN restore-fails→DLC-fallback path

2 participants