Skip to content

Conversation

@kimishpatel
Copy link
Contributor

Added corresponding tests as well

Fixes #11988

Test plan

test added

@pytorch-bot
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.

✅ No Failures

As of commit 1fb27d7 with merge base d72e522 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@kimishpatel kimishpatel requested a review from JacobSzwejbka July 1, 2025 22:54
@kimishpatel kimishpatel force-pushed the sym_max_fix branch 2 times, most recently from 1a4d004 to d445a0c Compare July 2, 2025 20:21
Added corresponding tests as well
@kimishpatel kimishpatel merged commit f909aaa into main Jul 11, 2025
97 checks passed
@kimishpatel kimishpatel deleted the sym_max_fix branch July 11, 2025 14:21
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

4 participants