Skip to content

Return an error from MethodMeta::get_backend_name for a delegate without an id (#24354) - #24354

Merged
meta-codesync[bot] merged 1 commit into
pytorch:mainfrom
sivapatibandla:export-D128278670
Nov 2, 2026
Merged

meta-codesync[bot] merged 1 commit into
pytorch:mainfrom
sivapatibandla:export-D128278670

Conversation

@sivapatibandla

@sivapatibandla sivapatibandla commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary:

MethodMeta::get_backend_name dereferenced the delegate's id() without checking it, so a program whose delegate entry has no id crashed instead of returning an error. It now returns Error::InvalidProgram, like Method::init, which rejects such a delegate with "Missing backend id", while MethodMeta::uses_backend already skips it.

Reviewed By: metascroy

Differential Revision: D128278670

@pytorch-bot

pytorch-bot Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

⏳ 2 Pending, 1 Unrelated Failure

As of commit 5676a21 with merge base e40e64c (image):

BROKEN TRUNK - The following job 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 Oct 30, 2026
@meta-codesync

meta-codesync Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

@sivapatibandla has exported this pull request. If you are a Meta employee, you can view the originating Diff in D128278670.

@meta-codesync meta-codesync Bot changed the title Return an error from MethodMeta::get_backend_name for a delegate without an id Return an error from MethodMeta::get_backend_name for a delegate without an id (#24354) Oct 31, 2026
sivapatibandla added a commit to sivapatibandla/executorch that referenced this pull request Oct 31, 2026
…out an id (pytorch#24354)

Summary:

`MethodMeta::get_backend_name` dereferenced the delegate's `id()` without checking it, so a program whose delegate entry has no id crashed instead of returning an error. It now returns `Error::InvalidProgram`, like `Method::init`, which rejects such a delegate with "Missing backend id", while `MethodMeta::uses_backend` already skips it.

Reviewed By: metascroy

Differential Revision: D128278670
@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.

sivapatibandla added a commit to sivapatibandla/executorch that referenced this pull request Oct 31, 2026
…out an id (pytorch#24354)

Summary:

`MethodMeta::get_backend_name` dereferenced the delegate's `id()` without checking it, so a program whose delegate entry has no id crashed instead of returning an error. It now returns `Error::InvalidProgram`, like `Method::init`, which rejects such a delegate with "Missing backend id", while `MethodMeta::uses_backend` already skips it.

Reviewed By: metascroy

Differential Revision: D128278670
@sivapatibandla
sivapatibandla force-pushed the export-D128278670 branch 2 times, most recently from 64f1a5e to b15f936 Compare November 2, 2026 18:31
sivapatibandla added a commit to sivapatibandla/executorch that referenced this pull request Nov 2, 2026
…out an id (pytorch#24354)

Summary:

`MethodMeta::get_backend_name` dereferenced the delegate's `id()` without checking it, so a program whose delegate entry has no id crashed instead of returning an error. It now returns `Error::InvalidProgram`, like `Method::init`, which rejects such a delegate with "Missing backend id", while `MethodMeta::uses_backend` already skips it.

Reviewed By: metascroy

Differential Revision: D128278670
…out an id (pytorch#24354)

Summary:

`MethodMeta::get_backend_name` dereferenced the delegate's `id()` without checking it, so a program whose delegate entry has no id crashed instead of returning an error. It now returns `Error::InvalidProgram`, like `Method::init`, which rejects such a delegate with "Missing backend id", while `MethodMeta::uses_backend` already skips it.

Reviewed By: metascroy

Differential Revision: D128278670
@meta-codesync
meta-codesync Bot merged commit 1a0ffe8 into pytorch:main Nov 2, 2026
233 of 234 checks passed
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. meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants