<Close this diff>#20209
Conversation
…ward core ATen op
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/20209
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New Failure, 29 Pending, 1 Unrelated FailureAs of commit f725c7c with merge base 4519036 ( NEW FAILURE - The following job has failed:
BROKEN TRUNK - The following job 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
|
There was a problem hiding this comment.
Pull request overview
This PR extends the Qualcomm QNN backend’s cdist decomposition support to also handle the internal aten._cdist_forward op, and adds corresponding test coverage to validate lowering for both FP32 and QDQ flows.
Changes:
- Add a
CDistForwardtest model that directly callstorch.ops.aten._cdist_forward.default. - Add new delegate tests to exercise lowering for
_cdist_forwardin both non-quantized and QDQ paths. - Update QNN pass configuration/documentation to enable and document
DecomposeCDistforaten._cdist_forward.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| extension/android/executorch_android/src/main/java/org/pytorch/executorch/Module.kt | Kotlin formatting update for multi-line exception creation call. |
| backends/qualcomm/tests/test_qnn_delegate.py | Adds new _cdist_forward backend tests for both FP32 and QDQ flows. |
| backends/qualcomm/tests/models.py | Adds CDistForward module that calls aten._cdist_forward. |
| backends/qualcomm/builders/README.md | Documents _cdist_forward as handled by DecomposeCDist. |
| backends/qualcomm/_passes/qnn_pass_manager.py | Enables DecomposeCDist by default and adds its capture-program dependency. |
| backends/qualcomm/_passes/decompose_cdist.py | Extends decomposition target matching to include aten._cdist_forward. |
Comments suppressed due to low confidence (1)
backends/qualcomm/_passes/decompose_cdist.py:55
torch.ops.aten._cdist_forward.defaultpassespas a float (e.g.2.0), but the decomposition assertsnode.args[2] == 2. With the newly supported_cdist_forwardtarget (and even foraten.cdistdepending on tracing), this assertion can fail even whenpis effectively 2.
Accept both 2 and 2.0 (or generally numeric values equal to 2) to avoid spurious assertion failures while still enforcing p=2 only.
if node.target in self.cdist_targets:
if len(node.args) > 2:
assert (
node.args[2] == 2
), "Currently only p=2 is supported for CDist Decomposition"
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@qti-horodnic I accidentally pushed one of my commits on your PR, Sorry about that. Can you force push one more time so that author, title and summary etc is set properly. Sorry for the trouble |
Looks like you already fixed this, lmk if you need anything from me |
No description provided.