Skip to content

Introduce sym_max and sym_min ops to executorch #12037

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kimishpatel
Copy link
Contributor

Added corresponding tests as well

Fixes #11988

Test plan

test added

Copy link

pytorch-bot bot commented Jun 26, 2025

🔗 Helpful Links

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

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

❌ 4 New Failures, 2 Cancelled Jobs

As of commit d445a0c with merge base 4e59c4e (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.

@facebook-github-bot facebook-github-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 Jun 26, 2025
@kimishpatel kimishpatel added the release notes: exir Changes to any dialects and passes on these dialects, such as memory planning label Jun 26, 2025
@kimishpatel kimishpatel force-pushed the sym_max_fix branch 2 times, most recently from f167a3a to b94e801 Compare July 1, 2025 22:47
if (a.isInt() && b.isInt()) {
out = EValue(std::max(a.toInt(), b.toInt()));
} else {
ET_CHECK_MSG(false, "sym_max only supports int inputs, got %zu, %zu", (size_t)a.tag, (size_t)b.tag);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Conarnar has a PR up to change all of these checks in prim ops to non fatal

if (a.isInt() && b.isInt()) {
out = EValue(std::max(a.toInt(), b.toInt()));
} else {
ET_CHECK_MSG(
Copy link
Contributor

@JacobSzwejbka JacobSzwejbka Jul 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use ET_KERNEL_CHECK_MSG instead so that we dont abort the process unecessarily

Added corresponding tests as well
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. release notes: exir Changes to any dialects and passes on these dialects, such as memory planning
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sym_max support in ExecuTorch
3 participants