[ET-VK] Add dynamic-shape resize to q8ta ops#20367
Merged
Merged
Conversation
Pull Request resolved: #20312 The q8ta (quantized int8) op `DynamicDispatchNode`s were constructed with an empty resize-args list and no resize function, so their output tensors were never `virtual_resize`d on `trigger_resize()`. On a dynamic-shape graph this froze the q8ta outputs at the build-time upper-bound shape — the same failure mode the fp32 ops already avoid. Concretely, in a quantized Vulkan-delegated graph the terminal pointwise conv produces the graph output, so a smaller input (e.g. 238 rows fed into a graph allocated at the 241-row upper bound) left stale rows that propagate downstream, where GroupNorm's global per-group statistics smear them across the whole tensor. Add resize functions across the q8ta op family, each matching that op's output-shape semantics (mirroring the corresponding fp32 op's resize): - `q8ta_conv2d` / `q8ta_conv2d_dw`: output H/W recomputed from the input via `calc_out_sizes_hw`. - `q8ta_conv2d_pw`: 1x1 conv preserves spatial dims (out H/W == in H/W). - `q8ta_conv2d_transposed`: transposed output formula via `calc_out_sizes_hw(transposed=true)` (threads `output_padding` through the dispatch, which was previously dropped). - `q8ta` im2col scratch: flattened-window `K` from channels/kernel/groups, `H_out`/`W_out` from the current input. - `q8ta_linear`: `[*input.shape[:-1], out_features]`. - `q8ta` binary: `broadcast(in_a, in_b)`. - `q8ta` quantize / dequantize: elementwise, output shape == input shape. The quantized conv/quant path now honors dynamic input shapes like the fp32 path. ghstack-source-id: 394480015 @exported-using-ghexport Differential Revision: [D108788845](https://our.internmc.facebook.com/intern/diff/D108788845/)
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/20367
Note: Links to docs will display an error until the docs builds have been completed. ❌ 3 New Failures, 1 Unrelated FailureAs of commit d299469 with merge base 0eb8247 ( NEW FAILURES - The following jobs have failed:
FLAKY - The following job failed but was likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
SS-JIA
approved these changes
Jun 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was created by the merge bot to help merge the original PR into the main branch.
ghstack PR number: #20312 by @SS-JIA
^ Please use this as the source of truth for the PR details, comments, and reviews
ghstack PR base: https://github.com/pytorch/executorch/tree/gh/SS-JIA/558/base
ghstack PR head: https://github.com/pytorch/executorch/tree/gh/SS-JIA/558/head
Merge bot PR base: https://github.com/pytorch/executorch/tree/gh/SS-JIA/559/orig
Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/SS-JIA/558/orig
Differential Revision: D108788845
@diff-train-skip-merge