Skip to content

Skip LpaiPartitionFallbackSupport when compiler_specs is None (forward fix for D108707519) (#20324)#20324

Merged
Gasoonjia merged 1 commit into
mainfrom
export-D108853837
Jun 17, 2026
Merged

Skip LpaiPartitionFallbackSupport when compiler_specs is None (forward fix for D108707519) (#20324)#20324
Gasoonjia merged 1 commit into
mainfrom
export-D108853837

Conversation

@Gasoonjia

@Gasoonjia Gasoonjia commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Summary:

Forward fix for D108707519 (Qualcomm AI Engine Direct - LPAI Support Partition, #19835).

The new LpaiPartitionFallbackSupport pass crashes when run without QNN compiler
specs:

lpai_partition_fallback_support.py:153 get_unsupported_nodes
op_validator = QnnOperatorSupport(compiler_specs=self.compiler_specs, ...)
TypeError: 'NoneType' object is not iterable

The edge-transform pass framework injects compiler_specs into passes but
defaults it to None (QnnPassManager.get_to_edge_transform_passes(compiler_specs=
None)). Lowering paths that run the edge transform without partitioner-supplied
specs — e.g. the modai LPAI offline-compile path
(modai/test:test_qualcomm_lpai_recipes::test_export_and_lower_8a8w_writes_pte) —
reach this pass with compiler_specs=None, and QnnOperatorSupport then iterates
the None specs and aborts the whole to_edge_transform_and_lower.

The pass fundamentally needs compiler specs to decide which nodes are LPAI-
unsupported, so with no specs there is nothing to validate against. Skip the
pass (return PassResult(.., modified=False)) in that case, restoring the
behavior from before this pass existed for spec-less paths. On-device paths that
do supply compiler_specs are unaffected.

Differential Revision: D108853837

@pytorch-bot

pytorch-bot Bot commented Jun 17, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

✅ You can merge normally! (3 Unrelated Failures)

As of commit 4c9fa14 with merge base 48ff29e (image):

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 Jun 17, 2026
@meta-codesync

meta-codesync Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

@Gasoonjia has exported this pull request. If you are a Meta employee, you can view the originating Diff in D108853837.

…d fix for D108707519) (#20324)

Summary:

Forward fix for D108707519 (Qualcomm AI Engine Direct - LPAI Support Partition, #19835).

The new LpaiPartitionFallbackSupport pass crashes when run without QNN compiler
specs:

  lpai_partition_fallback_support.py:153 get_unsupported_nodes
    op_validator = QnnOperatorSupport(compiler_specs=self.compiler_specs, ...)
  TypeError: 'NoneType' object is not iterable

The edge-transform pass framework injects compiler_specs into passes but
defaults it to None (QnnPassManager.get_to_edge_transform_passes(compiler_specs=
None)). Lowering paths that run the edge transform without partitioner-supplied
specs — e.g. the modai LPAI offline-compile path
(modai/test:test_qualcomm_lpai_recipes::test_export_and_lower_8a8w_writes_pte) —
reach this pass with compiler_specs=None, and QnnOperatorSupport then iterates
the None specs and aborts the whole to_edge_transform_and_lower.

The pass fundamentally needs compiler specs to decide which nodes are LPAI-
unsupported, so with no specs there is nothing to validate against. Skip the
pass (return PassResult(.., modified=False)) in that case, restoring the
behavior from before this pass existed for spec-less paths. On-device paths that
do supply compiler_specs are unaffected.

Differential Revision: D108853837
@meta-codesync meta-codesync Bot changed the title Skip LpaiPartitionFallbackSupport when compiler_specs is None (forward fix for D108707519) Skip LpaiPartitionFallbackSupport when compiler_specs is None (forward fix for D108707519) (#20324) Jun 17, 2026
@meta-codesync meta-codesync Bot force-pushed the export-D108853837 branch from bdf0a19 to 4c9fa14 Compare June 17, 2026 08:26
@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.

@shewu-quic

Copy link
Copy Markdown
Collaborator

++ @winskuo-quic for awareness

@Gasoonjia Gasoonjia merged commit 07b9feb into main Jun 17, 2026
184 of 187 checks passed
@Gasoonjia Gasoonjia deleted the export-D108853837 branch June 17, 2026 21:29
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. meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants