Skip to content

Arm backend: Support boolean attention mask#17734

Open
YufengShi-dudu wants to merge 1 commit intopytorch:mainfrom
YufengShi-dudu:support-boolean-attention-mask
Open

Arm backend: Support boolean attention mask#17734
YufengShi-dudu wants to merge 1 commit intopytorch:mainfrom
YufengShi-dudu:support-boolean-attention-mask

Conversation

@YufengShi-dudu
Copy link
Contributor

@YufengShi-dudu YufengShi-dudu commented Feb 26, 2026

  • TOSA bitwise_* does not accept boolean inputs; attention masks often apply boolean bitwise operators that are equivalent to logical_*.

  • Rename and extend RewriteBoolBitwiseNotToLogicalNotPass to RewriteBoolBitwiseToLogicalPass so bool bitwise_not/and/or/xor are rewritten to the corresponding aten.logical_* ops.

  • Update and correct bitwise operator tests for bool inputs.

Change-Id: I5532f297587915d99213b8e597942fcc756ca7de

cc @digantdesai @SS-JIA @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell

- TOSA bitwise_* does not accept boolean inputs; attention masks
  often apply boolean bitwise operators that are equivalent to
  logical_*.

- Rename and extend RewriteBoolBitwiseNotToLogicalNotPass to
  RewriteBoolBitwiseToLogicalPass so bool bitwise_not/and/or/xor
  are rewritten to the corresponding aten.logical_* ops.

- Update and correct bitwise operator tests for bool inputs.

Change-Id: I5532f297587915d99213b8e597942fcc756ca7de
Signed-off-by: Yufeng Shi <yufeng.shi@arm.com>
@pytorch-bot
Copy link

pytorch-bot bot commented Feb 26, 2026

🔗 Helpful Links

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

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

❌ 4 New Failures, 2 Cancelled Jobs

As of commit 5c2b5d0 with merge base 331ac4a (image):

NEW FAILURES - The following jobs have failed:

CANCELLED JOBS - The following jobs were cancelled. Please retry:

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

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 26, 2026
@github-actions
Copy link

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

@YufengShi-dudu
Copy link
Contributor Author

@zingo I don't have the permission to add labels and run trunks now.

@zingo zingo added ciflow/trunk partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm labels Feb 26, 2026
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants