Skip to content

Use EValue::tryTo* #19040

Merged
lucylq merged 13 commits into
mainfrom
gh/lucylq/152/head
Apr 24, 2026
Merged

Use EValue::tryTo* #19040
lucylq merged 13 commits into
mainfrom
gh/lucylq/152/head

Conversation

@lucylq
Copy link
Copy Markdown
Contributor

@lucylq lucylq commented Apr 22, 2026

Use tryTo in:

  • parseTensorList (tensor_parser_exec_aten.cpp) — called .toTensor()
    on each element index of a TensorList.
  • parseListOptionalType (tensor_parser.h) — called .toOptional()
    on each element index of an OptionalTensorList.
  • FreeCall instruction handler (method.cpp) — called .toTensor()
    on the value index being freed.

Unit tests cover parseTensorList and parseListOptionalType receiving
a non-matching EValue and expect Error::InvalidType.

Authored-with: Claude

Github Executorch added 2 commits April 21, 2026 17:15
[ghstack-poisoned]
[ghstack-poisoned]
@lucylq
Copy link
Copy Markdown
Contributor Author

lucylq commented Apr 22, 2026

@lucylq lucylq requested a review from JacobSzwejbka as a code owner April 22, 2026 00:15
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented Apr 22, 2026

🔗 Helpful Links

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

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

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

❌ 2 Cancelled Jobs, 2 Unrelated Failures

As of commit d32d696 with merge base c3f3d12 (image):

CANCELLED JOBS - The following jobs were cancelled. Please retry:

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 Apr 22, 2026
@lucylq lucylq changed the title Use EValue::tryTo* to fix TOB-EXECUTORCH-6/7/8 Use EValue::tryTo* Apr 22, 2026
Github Executorch added 10 commits April 21, 2026 18:52
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
Base automatically changed from gh/lucylq/151/head to main April 24, 2026 00:23
[ghstack-poisoned]
@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.

@lucylq lucylq merged commit de8ce55 into main Apr 24, 2026
172 of 176 checks passed
@lucylq lucylq deleted the gh/lucylq/152/head branch April 24, 2026 16:30
zeel2104 pushed a commit to zeel2104/executorch that referenced this pull request May 5, 2026
Use tryTo in:

- parseTensorList (tensor_parser_exec_aten.cpp) — called .toTensor()
  on each element index of a TensorList.
- parseListOptionalType (tensor_parser.h) — called .toOptional<T>()
  on each element index of an OptionalTensorList.
- FreeCall instruction handler (method.cpp) — called .toTensor()
  on the value index being freed.

Unit tests cover parseTensorList and parseListOptionalType receiving
a non-matching EValue and expect Error::InvalidType.

Authored-with: Claude

---------

Co-authored-by: Github Executorch <github_executorch@arm.com>
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.

2 participants