Skip to content

Fix boolean scalar support in portable arange - #22060

Open
Air-crypto wants to merge 1 commit into
pytorch:mainfrom
Air-crypto:fix-arange-bool-scalars
Open

Fix boolean scalar support in portable arange#22060
Air-crypto wants to merge 1 commit into
pytorch:mainfrom
Air-crypto:fix-arange-bool-scalars

Conversation

@Air-crypto

Copy link
Copy Markdown

Summary

  • accept boolean scalar arguments in the portable arange kernels by converting them to numeric 0/1 values locally
  • preserve the existing numeric scalar extraction behavior for non-boolean arguments
  • add regression coverage for boolean end, start, and step arguments

Fixes #13580

Test plan

  • cmake --build cmake-out -j 8 --target portable_kernels_test
  • ./cmake-out/kernels/test/portable_kernels_test --gtest_filter='OpArangeOutTest.*:OpArangeStartOutTest.*' (14 passed, 2 skipped)
  • ./cmake-out/kernels/test/portable_kernels_test (1527 passed, 104 skipped)
  • .venv/bin/clang-format --dry-run --Werror kernels/portable/cpu/op_arange.cpp kernels/test/op_arange_test.cpp
  • git diff --check

@pytorch-bot

pytorch-bot Bot commented Aug 23, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

⚠️ 14 Awaiting Approval

As of commit ec7bba9 with merge base cff6f4d (image):

AWAITING APPROVAL - The following workflows need approval before CI can run:

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

@linux-foundation-easycla

linux-foundation-easycla Bot commented Aug 23, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: Air-crypto / name: Arihan Yadav (ec7bba9)

@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 Aug 23, 2026
@github-actions

Copy link
Copy Markdown

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ExecuTorch execution failed for arange.default

2 participants