Skip to content

Conversation

@fumchin
Copy link
Collaborator

@fumchin fumchin commented May 30, 2025

This patch add a dtype check before diff calculation to avoid runtime errors since boolean tensors do not support arithmetic operations like subtraction.
Reports the mismatch count for boolean tensors.

for example:

############### ERROR DIFFERENCE ###############
BATCH 0
(BOOLEAN tensor) 0 / 8 elements differ (0.00%)
BATCH 1
(BOOLEAN tensor) 8 / 8 elements differ (100.00%)
BATCH 2
(BOOLEAN tensor) 8 / 8 elements differ (100.00%)
################################################
...
...
AssertionError: Output 0 (bool tensor) does not match reference output.

cc @digantdesai @freddan80 @per @zingo @oscarandersson8218

… logging

Add a dtype check before diff calculation to avoid runtime errors since boolean tensors do not support arithmetic operations like subtraction.
Reports the mismatch count for boolean tensors.

Signed-off-by: Fang-Ching <[email protected]>
Change-Id: I9575f9fe3bd2e4dc0a1be45aa9271c84ebc57bad
@fumchin fumchin added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm ciflow/trunk topic: not user facing labels May 30, 2025
@pytorch-bot
Copy link

pytorch-bot bot commented May 30, 2025

🔗 Helpful Links

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

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

❌ 1 New Failure

As of commit 71a5d01 with merge base 699e73d (image):

NEW FAILURE - The following job has failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@zingo
Copy link
Collaborator

zingo commented May 30, 2025

Hi @digantdesai this PR touched file outside Arm backend, so we would appreciate a review if OK

@zingo zingo added release notes: none Do not include this in the release notes and removed topic: not user facing labels Jun 2, 2025
@zingo
Copy link
Collaborator

zingo commented Jun 3, 2025

Hi @mergennachin this PR touched file outside Arm backend, so we would appreciate a review if OK

@zingo zingo requested a review from mergennachin June 4, 2025 07:46
@zingo zingo merged commit 0e35c30 into pytorch:main Jun 4, 2025
190 of 191 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm release notes: none Do not include this in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants