Skip to content

Walk transparent ops when extracting input quant params (#20139)#20139

Open
ethansfng wants to merge 1 commit into
pytorch:mainfrom
ethansfng:export-D107922730
Open

Walk transparent ops when extracting input quant params (#20139)#20139
ethansfng wants to merge 1 commit into
pytorch:mainfrom
ethansfng:export-D107922730

Conversation

@ethansfng

@ethansfng ethansfng commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary:

SAM 3's encoder input feeds a transparent shape op first — placeholder → reshape (patchify) → quantize_per_tensor — whereas the original code only recognized placeholder → quantize_per_tensor (a quantize directly on the input). The change walks through transparent ops (reshape/permute/transpose/etc.) from the input to reach the first quantize, so that indirected pattern resolves.

Differential Revision: D107922730

@pytorch-bot

pytorch-bot Bot commented Jun 9, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❌ 1 New Failure

As of commit 710cea4 with merge base 8e4fe08 (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 Jun 9, 2026
@meta-codesync

meta-codesync Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Jun 9, 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.

@meta-codesync meta-codesync Bot changed the title Walk transparent ops when extracting input quant params Walk transparent ops when extracting input quant params (#20139) Jun 9, 2026
@ethansfng ethansfng force-pushed the export-D107922730 branch from e9b1f53 to 2304b88 Compare June 9, 2026 18:43
ethansfng added a commit to ethansfng/executorch that referenced this pull request Jun 9, 2026
Summary:

SAM 3's encoder input feeds a transparent shape op first — placeholder → reshape (patchify) → quantize_per_tensor — whereas the original code only recognized placeholder → quantize_per_tensor (a quantize directly on the input). The change walks through transparent ops (reshape/permute/transpose/etc.) from the input to reach the first quantize, so that indirected pattern resolves.

Differential Revision: D107922730
Summary:

SAM 3's encoder input feeds a transparent shape op first — placeholder → reshape (patchify) → quantize_per_tensor — whereas the original code only recognized placeholder → quantize_per_tensor (a quantize directly on the input). The change walks through transparent ops (reshape/permute/transpose/etc.) from the input to reach the first quantize, so that indirected pattern resolves.

Differential Revision: D107922730
@ethansfng ethansfng force-pushed the export-D107922730 branch from 2304b88 to 710cea4 Compare June 9, 2026 22:10
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