Skip to content

Make ScalarType helpers constexpr#21001

Draft
cyyever wants to merge 1 commit into
pytorch:mainfrom
cyyever:constexpr-type-utils
Draft

Make ScalarType helpers constexpr#21001
cyyever wants to merge 1 commit into
pytorch:mainfrom
cyyever:constexpr-type-utils

Conversation

@cyyever

@cyyever cyyever commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Mark the pure switch/comparison ScalarType helpers in scalar_type_util.h constexpr (siblings like isIntegralType/toComplexType already are), and hoist gelu's kBeta/kKappa out of the per-element lambda. Verified by building portable/optimized kernel libs locally.

Authored with Claude.

@pytorch-bot

pytorch-bot Bot commented Jul 17, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

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 Jul 17, 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.

@cyyever
cyyever marked this pull request as draft July 17, 2026 02:43
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.

1 participant