Repository navigation
Qualcomm AI Engine Direct - Keep the selected element when removing a 0D select - #24078
msluszniak wants to merge 1 commit into
Conversation
… 0D select Remove0DTensor replaced a 0D select with its whole source, which is only right for a 1-element source: y + x[1] became y + x, and torch.full(shape, t[i]) became a copy of all of t (lowering then failed with "expand: ... length 3 -> 1"). A 1-element slice of the selected element replaces it instead.
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/24078
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 New Failures, 2 Unclassified FailuresAs of commit 9641725 with merge base e6cfbf8 ( NEW FAILURES - The following jobs have failed:
UNCLASSIFIED FAILURES - DrCI could not classify the following jobs because the workflow did not run on the merge base. The failures may be pre-existing on trunk or introduced by this PR:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
… 0D select Remove0DTensor replaced a 0D select with its whole source, which is only right for a 1-element source: y + x[1] became y + x, and torch.full(shape, t[i]) became a copy of all of t (lowering then failed with "expand: ... length 3 -> 1"). A 1-element slice of the selected element replaces it instead. Backport of pytorch/executorch#24078. 1.4.1 has no rework pass tests.
|
Tagging @qti-horodnic, @shewu-quic, @winskuo-quic, @chenweng-quic, @DannyYuyang-quic, @quic-boyuc, @qti-mmadhava, @zhaoxul-qti, @jethroqti to review. |
|
Closing: superseded by #24222, which fixes the same wrong output in |
Summary
Remove0DTensorreplaced a 0Dselectwith its whole source, which is only right for a 1-element source:y + x[1]becamey + x, andtorch.full(shape, t[i])(YOLO26's anchor grid) became a copy of all oft. It now keeps the selected element as a 1-elementslice_copy.Test plan
New
test_qnn_backend_select_element(FP and quantized) fails on main and passes here (x86 simulator); theRemove0DTensorrework test now checks the slice.test_passes.py,rework/passes/test.pyand the fullTestQNNFloatingPointOperator/TestQNNQuantizedOperator/TestQNNFloatingPointModelsuites give the same results as main.cc @cccclai @winskuo-quic @shewu-quic @haowhsu-quic @DannyYuyang-quic @cbilgin @abhinaykukkadapu @psiddh @nil-is-all