Skip LpaiPartitionFallbackSupport when compiler_specs is None (forward fix for D108707519) (#20324)#20324
Conversation
🔗 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 ( 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. |
|
@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
bdf0a19 to
4c9fa14
Compare
This PR needs a
|
|
++ @winskuo-quic for awareness |
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