Skip to content

Prepack stored inputs of dtype conversions - #24435

Open
JakeStevens wants to merge 2 commits into
pytorch:mainfrom
JakeStevens:export-D129088168
Open

JakeStevens wants to merge 2 commits into
pytorch:mainfrom
JakeStevens:export-D129088168

Conversation

@JakeStevens

Copy link
Copy Markdown
Contributor

Summary:

Ulterior Motive

Unblock stored-constant dtype conversions in native MobileNetV3 graphs.

Rationale

What: Add aten._to_copy.default to the existing stored-input prepack list.

Why: A stored constant resolves to a TensorRef, but the conversion shader needs a bound tensor resource. Passing the reference through leaves its input descriptor unwritten.

Details

  • Reuse the existing prepack insertion and consumer replacement.
  • Retain the existing stored-binding and mutation guards.
  • Add a structural prepack test and a numerical int64-to-float conversion test.

Authored with AI using Metamate on agentcloud.

Differential Revision: D129088168

Summary:

Originally, the example supported only mv2.

This PR extends that support to all models within torchvision.

to be more specific, it allows you to export any torchvision model via a script-- it does *not* imply all export successfully or will run successfully. These will be addressed in follow-on PRs.

Reviewed By: SS-JIA

Differential Revision: D128684681
Summary:
## Ulterior Motive

Unblock stored-constant dtype conversions in native MobileNetV3 graphs.

## Rationale

**What**: Add `aten._to_copy.default` to the existing stored-input prepack list.

**Why**: A stored constant resolves to a TensorRef, but the conversion shader needs a bound tensor resource. Passing the reference through leaves its input descriptor unwritten.

## Details

- Reuse the existing prepack insertion and consumer replacement.
- Retain the existing stored-binding and mutation guards.
- Add a structural prepack test and a numerical int64-to-float conversion test.

Authored with AI using Metamate on agentcloud.

Differential Revision: D129088168
@pytorch-bot

pytorch-bot Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❌ 1 New Failure

As of commit 9d7306d with merge base cec2e73 (image):

NEW FAILURE - The following job has failed:

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 Nov 2, 2026
@meta-codesync

meta-codesync Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Nov 2, 2026

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.

This branch has not been deployed

No deployments
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.

1 participant