Skip to content

Conversation

manuelcandales
Copy link
Contributor

Summary: Modify ET_INTERNAL_SWITCH macro, so that we fail non-fatally in the default clause when we encounter an unsupported dtype.

Differential Revision: D80141272

Copy link

pytorch-bot bot commented Aug 13, 2025

🔗 Helpful Links

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

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

❌ 16 New Failures, 2 Unrelated Failures

As of commit 362cd53 with merge base 9359481 (image):

NEW FAILURES - The following jobs have failed:

BROKEN TRUNK - The following jobs failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

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 Aug 13, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D80141272

@manuelcandales manuelcandales added release notes: ops & kernels Changes to the opset and any new / changed kernel implementations release notes: none Do not include this in the release notes and removed release notes: ops & kernels Changes to the opset and any new / changed kernel implementations labels Aug 13, 2025
manuelcandales added a commit to manuelcandales/executorch-1 that referenced this pull request Aug 17, 2025
…13359)

Summary:

Modify `ET_INTERNAL_SWITCH` macro, so that we fail non-fatally in the default clause when we encounter an unsupported dtype.

Differential Revision: D80141272
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D80141272

manuelcandales added a commit to manuelcandales/executorch-1 that referenced this pull request Aug 17, 2025
…13359)

Summary:

Modify `ET_INTERNAL_SWITCH` macro, so that we fail non-fatally in the default clause when we encounter an unsupported dtype.

Differential Revision: D80141272
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D80141272

manuelcandales added a commit to manuelcandales/executorch-1 that referenced this pull request Aug 17, 2025
…13359)

Summary:

Modify `ET_INTERNAL_SWITCH` macro, so that we fail non-fatally in the default clause when we encounter an unsupported dtype.

Differential Revision: D80141272
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D80141272

manuelcandales added a commit to manuelcandales/executorch-1 that referenced this pull request Aug 17, 2025
…13359)

Summary:

Modify `ET_INTERNAL_SWITCH` macro, so that we fail non-fatally in the default clause when we encounter an unsupported dtype.

Differential Revision: D80141272
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D80141272

manuelcandales added a commit to manuelcandales/executorch-1 that referenced this pull request Aug 17, 2025
…13359)

Summary:

Modify `ET_INTERNAL_SWITCH` macro, so that we fail non-fatally in the default clause when we encounter an unsupported dtype.

Differential Revision: D80141272
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D80141272

manuelcandales added a commit to manuelcandales/executorch-1 that referenced this pull request Aug 18, 2025
…13359)

Summary:

Modify `ET_INTERNAL_SWITCH` macro, so that we fail non-fatally in the default clause when we encounter an unsupported dtype.

Differential Revision: D80141272
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D80141272

manuelcandales added a commit to manuelcandales/executorch-1 that referenced this pull request Aug 18, 2025
…13359)

Summary:

Modify `ET_INTERNAL_SWITCH` macro, so that we fail non-fatally in the default clause when we encounter an unsupported dtype.

Differential Revision: D80141272
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D80141272

switch (_st) { \
__VA_ARGS__ \
default: \
CONTEXT.fail(torch::executor::Error::InvalidArgument); \
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Leave a comment along the lines "this sets the return code which should be checked by the caller"


ET_SWITCH_REALHBBF16_TYPES(a_type, ctx, op_name, CTYPE_A, [&] {
CTYPE_A b_casted;
CTYPE_A b_casted{};
Copy link
Contributor

Choose a reason for hiding this comment

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

this took me a minute -- we now return all-zeros output and signal a failure when there's an unsupported dtype instead of terminating the process. this seems fine.

"Unhandled dtype %s for %s",
::executorch::runtime::toString(t.scalar_type()),
op_name);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Sadly, load_and_convert has undefined behavior in this case. We should probably return CTYPE_COMPUTE(); to be safe.

"Unhandled dtype %s for %s",
::executorch::runtime::toString(t.scalar_type()),
op_name);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto undefined behavior

"Unhandled dtype %s for %s",
::executorch::runtime::toString(t.scalar_type()),
op_name);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto undefined behavior; for the convert_and_store case it seems easiest to just skip the write to be safe.

"Unhandled dtype %s for %s",
::executorch::runtime::toString(t.scalar_type()),
op_name);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto undefined behavior

(void)context;
resize_out_tensor(weight, indices, out, weight_nbit);
return quantized_embedding_xbit_out(
auto context = KernelRuntimeContext();
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: KernelRuntimeContext context;

pytorch-bot bot pushed a commit that referenced this pull request Aug 20, 2025
Summary:

Modify `ET_INTERNAL_SWITCH` macro, so that we fail non-fatally in the default clause when we encounter an unsupported dtype.

Reviewed By: digantdesai

Differential Revision: D80141272
manuelcandales added a commit to manuelcandales/executorch-1 that referenced this pull request Aug 20, 2025
…13359)

Summary:

Modify `ET_INTERNAL_SWITCH` macro, so that we fail non-fatally in the default clause when we encounter an unsupported dtype.

Reviewed By: digantdesai

Differential Revision: D80141272
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D80141272

1 similar comment
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D80141272

manuelcandales added a commit to manuelcandales/executorch-1 that referenced this pull request Aug 20, 2025
…13359)

Summary:
Pull Request resolved: pytorch#13359

Modify `ET_INTERNAL_SWITCH` macro, so that we fail non-fatally in the default clause when we encounter an unsupported dtype.

Reviewed By: digantdesai

Differential Revision: D80141272
…13359)

Summary:

Modify `ET_INTERNAL_SWITCH` macro, so that we fail non-fatally in the default clause when we encounter an unsupported dtype.

Reviewed By: digantdesai

Differential Revision: D80141272
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D80141272

@facebook-github-bot facebook-github-bot merged commit 3dac421 into pytorch:main Aug 21, 2025
225 of 245 checks passed
agrima1304 pushed a commit to agrima1304/executorch that referenced this pull request Aug 26, 2025
Differential Revision: D80141272

Pull Request resolved: pytorch#13359
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. fb-exported release notes: none Do not include this in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants