Fix QNN is_nan bool tensor subtraction error#18660
Fix QNN is_nan bool tensor subtraction error#18660meta-codesync[bot] merged 1 commit intopytorch:mainfrom
Conversation
Summary: The QNN delegate simulator test for is_nan fails because _assert_outputs_equal_recipe uses model - ref to compute differences, but is_nan returns bool tensors and PyTorch no longer allows subtraction on bool tensors. Fix: Handle bool tensors separately using torch.equal() and XOR (^) for mismatch reporting instead of subtraction. Differential Revision: D99049483
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/18660
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (2 Unrelated Failures)As of commit eb60f22 with merge base c39a0ff ( 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 D99049483. |
This PR needs a
|
Differential Revision: D99049483 Pull Request resolved: pytorch#18660
Differential Revision: D99049483 Pull Request resolved: #18660
Differential Revision: D99049483 Pull Request resolved: #18660
Summary:
The QNN delegate simulator test for is_nan fails because _assert_outputs_equal_recipe
uses model - ref to compute differences, but is_nan returns bool tensors and PyTorch
no longer allows subtraction on bool tensors.
Fix: Handle bool tensors separately using torch.equal() and XOR (^) for mismatch
reporting instead of subtraction.
Differential Revision: D99049483