Skip to content

Keep the view after a linear when only its shape bounds match - #24626

Merged
shoumikhin merged 2 commits into
pytorch:mainfrom
shoumikhin:linear-view-compare-shapes
Nov 5, 2026
Merged

shoumikhin merged 2 commits into
pytorch:mainfrom
shoumikhin:linear-view-compare-shapes

Conversation

@shoumikhin

@shoumikhin shoumikhin commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

What is wrong today

AddmmToLinearTransform removes the view after a linear when the linear already produces that shape. It compares upper bounds, and two different dynamic shapes can have the same bounds.

Example: a dequantized input [a, b, 16], with a and b both in [2, 8], goes through view(-1, 16), a linear, and view(b, a, 8). The transform points the linear at the dequantized tensor, so its output [a, b, 8] and the view [b, a, 8] both have the bounds [8, 8, 8]. The view is removed and the output has the wrong shape.

The transform points a linear at the dequantized tensor even when no view after it is removed. That changes its output shape: view(-1, 16) -> linear on a [2, 3, 16] input returns [2, 3, 8] instead of [6, 8].

XNNPACK, Vulkan and Samsung lowering run this transform, and so does the LLM export through ConvertToLinearPass.

What this change does

  1. The transform compares the symbolic shapes, and removes the view only when they are known to be equal. XNNPACK's ConvertToLinearPass now gives each linear it makes the value of the op it replaces, not a fixed-size tensor, so a no-op view after a second linear still goes.
  2. The linear reads the dequantized tensor only when the view after it is removed in the same step, and it takes that view's shape. The dequantized tensor no longer needs a single reader, so two linears that read it through their own views both lose their views.

Testing

  • New backends/transforms/test/test_addmm_mm_to_linear.py: the swapped view is kept, with bounded and unbounded dims; a view back to the linear's shape is still removed, and the linear takes its value; each linear reads the dequantized tensor only when its view goes, not for a view that only restates its shape; two linears sharing one dequantized tensor both lose their views. Each checks the graph and compares with eager, and each fails on main.
  • New cases in backends/xnnpack/test/passes/test_convert_to_linear.py: a no-op view after two linears with a dynamic batch is removed, as on main; the swapped view after a linear is kept with both dims dynamic (fails on main).
  • Byte-identical programs before and after: 5 small static models lowered with XNNPACK and Vulkan, and 8 dynamic-shape programs built the way the LLM export does (float and dynamically quantized, with and without XNNPACK).

Copilot AI balanced review requested due to automatic review settings November 4, 2026 18:26
@pytorch-bot

pytorch-bot Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

✅ You can merge normally! (1 Unrelated Failure)

As of commit c8a750e with merge base dadc829 (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 Nov 4, 2026
@shoumikhin

Copy link
Copy Markdown
Contributor Author

@claude /pr-review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@claude

claude Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Claude finished @shoumikhin's task in 19m 25s —— View job


PR Review: #24626. I found no blockers. The new symbolic comparison is correct and only removes views the old bound check also removed. Three minor follow-ups: XNNPACK's concrete linear metadata now keeps some no-op views with dynamic shapes, the same function has an older stale-metadata bug that the changed check still reads, and there are test gaps.

Detailed review

Summary

The PR changes replace_linear_view_copy_input_output to compare symbolic shapes with statically_known_true(sym_eq(...)) instead of upper bounds. A view after a linear is now removed only when its shape is provably the linear's output shape. Provably equal shapes always have equal bounds and example sizes, so the new check removes a subset of what the old one removed and cannot create a new wrong removal. Nothing blocks the PR. The issues below are minor or were already there before this change.

All findings come from reading the code. Python commands needed approval in this run, so I did not run the new test or the trigger models below.

Code Quality

  • Older bug (also on main): the changed check at backends/transforms/addmm_mm_to_linear.py:88 reads metadata that the same function makes stale.
    • Cause: line 75 points the linear at the N-D dequant but leaves node.meta["val"] at the 2-D shape set at line 159. When a later linear takes that linear as input, line 88 builds output_shape from the stale shape, so a view can be removed even though the shapes differ at run time.
    • Example (static shapes): xq int8 [2,3,16] → dequantize_per_tensor.tensor → view(-1,16) → Linear(16,8) → Linear(8,4) → view(-1,4).
      • For the second linear, line 88 reads [6,8], so output_shape is [6,4]. That equals the view's shape, so the view is removed.
      • But the first linear now returns [2,3,8], so the program returns [2,3,4] instead of [6,4].
      • This is the same wrong-output-shape symptom the PR fixes, reached another way. So "removes the view only when they are known to be equal" does not fully hold yet.
    • Same rewire, two related problems:
      • It changes the output shape even when no view follows: … → view(-1,16) → linear → output returns [2,3,8] instead of [6,8].
      • Line 74 counts the users of input_node.args[0] instead of input_node. Any other user of the flattened view is also switched to the N-D dequant.
    • Suggested fix: only rewire the input when the trailing view is removed in the same step, and decide that from dqlinear_input.meta["val"].shape. Then set node.meta["val"] from the removed view, so no user sees a shape change. This can be a follow-up. Fix this →
  • backends/transforms/targets.bzl:208-217: the new test_addmm_mm_to_linear target sits between fuse_view_copy (line 194) and its test test_fuse_view_copy (line 219). Put it right after the addmm_mm_to_linear library (line 22), the way fuse_gqa_with_sdpa and test_fuse_gqa_with_sdpa are paired. Fix this →

Testing

  • backends/transforms/test/test_addmm_mm_to_linear.py:
    • Missing case: the description names a second way the bug happens, dims with no upper bound compared by their example sizes, but no test covers it. Example: Dim("a") and Dim("b") with no max, an input of shape (3, 3, 16), and swap=True. On main, this goes through get_shape's eval_shape fallback and the view is removed.
    • Weak assertions: the tests only check output.target. Running the transformed program on an input with a != b and comparing with eager would also catch a wrong rewire, not just whether the node is still there.
    • Nit: wrapping the loop at lines 44-49 in self.subTest(...) would show which configuration failed.
    • Fix this →

Performance

  • XNNPACK: with dynamic shapes, a no-op view after two back-to-back linears is now kept. (Suspected from reading the code, not run.)
    • Cause: ConvertToLinearPass.create_linear sets linear_node.meta["val"] = torch.zeros(get_shape(output)) (backends/xnnpack/_passes/convert_to_linear.py:146). Those sizes are plain ints (upper bounds or example sizes). The pass then calls this transform at line 192, before the retrace at line 197.
    • Effect: when that linear feeds a second linear that is followed by a view, line 88 reads plain ints while the view's shape is symbolic. sym_eq then gives something like Eq(s0, 32), which statically_known_true cannot prove, so the view is kept. The old bound-vs-bound check removed it.
    • Trigger: linears decomposed to addmm, as in the legacy to_edge(...).to_backend(XnnpackPartitioner()) flow. Input x: [s0, 16] with s0 in [1, 32], and self.fc2(self.fc1(x)).view(-1, 8) with fc2 = Linear(16, 8).
    • Impact: the result is still correct, but an extra view_copy stays in the graph. The PR's byte-identical check only covered static models.
    • Likely fix: set linear_node.meta["val"] = output.meta["val"] in create_linear, since the linear replaces output one-for-one. Both sides of the comparison are then symbolic. Otherwise, mention this behavior change in the PR. Fix this →

Recommendation

Approve. The fix is correct and never removes a view the old check kept. The items above are minor or were already there before this PR, and can be follow-ups.

@shoumikhin
shoumikhin force-pushed the linear-view-compare-shapes branch from 09d8b8d to aa88861 Compare November 4, 2026 20:37
Copilot AI balanced review requested due to automatic review settings November 4, 2026 20:37
@shoumikhin

Copy link
Copy Markdown
Contributor Author

Thanks for the review.

Fixed:

  • Stale shape after rewiring. The linear now reads the dequantized tensor only when the view after it is removed in the same step, and it takes that view's shape. Only the linear is rewired, so other readers of the view keep it. Your examples now keep their shapes, and the tests cover a linear with no view after it, another reader of the flattened input, and the linear's new shape. This is a separate commit. It also drops the old single-reader check, so two linears that read one dequantized tensor through their own views now both lose their views.
  • XNNPACK dynamic shapes. You were right. With ConvertToLinearPass, two linears then view(-1, 8) with a dynamic batch kept the view in the version you reviewed. create_linear now sets the linear's value to the value of the op it replaces, and a new test checks that the view is removed, as on main.
  • Tests. Added the unbounded case (Dim("a"), Dim("b"), example (3, 3, 16)), subTest labels, and an eager comparison on an input with a != b.
  • Buck target. Moved next to the addmm_mm_to_linear library.

Static models still lower byte-identically with XNNPACK and Vulkan.

@shoumikhin

Copy link
Copy Markdown
Contributor Author

@claude /pr-review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@claude

claude Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Claude finished @shoumikhin's task in 26m 5s —— View job


PR Review: #24626. No blockers; the issues are minor test gaps, mainly that the new transform tests mostly compare with eager instead of checking the rewritten graph, and that the new XNNPACK test covers only fp32 with a 2-D input.

Detailed review

Summary

The PR removes the view after a linear only when the symbolic shapes are provably equal, rewires the linear to the dequantized input only when that view goes, and gives XNNPACK's create_linear the value of the op it replaces. No correctness bug turned up; the problems are test gaps and one style point. Python commands needed approval in this run (add them to --allowedTools to let the review run tests), so nothing was run, and every finding comes from reading the code.

Code Quality

  • backends/transforms/test/test_addmm_mm_to_linear.py:71-72: _output_target is a one-line helper used once (line 101), while line 83 writes the same graph.output_node().args[0][0] expression inline. CLAUDE.md asks for no trivial single-use helpers, so inline it. Fix this →

Testing

  • The transform tests mostly compare with eager instead of checking the rewritten graph (backends/transforms/test/test_addmm_mm_to_linear.py).
    • Missing case: no test has two linears that read one dequantized tensor through their own views. The second commit adds this by dropping the single-reader check: on main both views stay, and with this PR both go. Each of the three models (lines 28-57) has one linear.
    • Unchecked comment: test_linear_output_shape_is_kept_when_no_view_goes (lines 106-114) only compares with eager, so it still passes if the transform does nothing. The comment at lines 107-109 says the second linear reads the dequantized tensor once its view goes, but nothing checks that. Both cases are static only.
    • Metadata: line 86 checks only the rank of the linear's new meta["val"]. The swap test (lines 90-104) would still pass if the linear were rewired while the view stayed, which would leave a stale 2-D value. AddmmToLinearTransform.call does not retrace (addmm_mm_to_linear.py:168-171), so the next pass, and later linears in the same loop (line 88), see the value as written.
    • Fix: add the two-linear model. In every case, assert the linear's args[0]: the dequantize_per_tensor node when the view after it goes, the flattening view_copy otherwise. Compare meta["val"].shape with the removed view's shape, and run the multi-reader models with _BOUNDED too. Fix this →
  • The new XNNPACK test covers only fp32 with a 2-D input (backends/xnnpack/test/passes/test_convert_to_linear.py:45-65).
    • So get_dqlinear_input never finds a dequantize node there, and no linear reads an N-D input.
    • The qd8 and dynamic-shape linear tests the description says were compared before and after are in backends/xnnpack/test/ops/test_linear.py. pytest.ini:15 excludes that file, and no CI script runs it by path.
    • Fix: add a dynamically quantized case with a 3-D input and a dynamic batch to test_convert_to_linear.py, which CI runs (pytest.ini:94). It would test the new create_linear value together with the rewiring. Fix this →
  • Low confidence, worth checking: the before/after comparison skips a dynamic-shape caller.
    • The description's caller list leaves out extension/llm/export/builder.py:558. That line runs ConvertToLinearPass on the non-delegated part of every export_llm program, and enable_dynamic_shape defaults to True (extension/llm/export/config/llm_config.py:205).
    • The byte-identical check covered only static models, so it cannot show the dynamic-shape change. A before/after .pte diff for one small export_llm config would.
    • No graph that changes was found.

Recommendation

Approve. Nothing blocks the PR. The two-linear test is worth adding here, because that behavior is new and has no test.

@shoumikhin
shoumikhin force-pushed the linear-view-compare-shapes branch from aa88861 to 27cd6ab Compare November 4, 2026 21:24
Copilot AI balanced review requested due to automatic review settings November 4, 2026 21:24
@shoumikhin

Copy link
Copy Markdown
Contributor Author

Thanks for the review.

Fixed:

  • Single-use helper. Inlined.
  • Tests check the graph now. Each transform test asserts what the linear reads: the dequantize node when its view goes, the flattening view otherwise. The removal test checks that the linear takes the removed view's value. The rewiring cases also run with bounded dims.
  • Two linears sharing a dequantized input. New test: both read the dequantize node and no view is left.
  • XNNPACK coverage in CI. Added a dynamically quantized linear with a 3-D input and a dynamic batch to test_convert_to_linear.py.
  • LLM export path. I built 8 dynamic-shape programs the way the LLM export does (to_edge, ConvertToLinearPass on the whole program, then to_executorch): a transformer block and a head, float and dynamically quantized, with and without XNNPACK. They are byte-identical before and after this change.

@shoumikhin

Copy link
Copy Markdown
Contributor Author

@claude /pr-review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@claude

claude Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Claude finished @shoumikhin's task in 30m 45s —— View job


PR Review: #24626. I found no blockers or correctness bugs, only two test gaps: the new qd8 XNNPACK test passes on main without reaching the changed code, and no transform test covers the fallback to the linear's own input when a dequantize node exists.

Detailed review

Summary

The PR removes the view after a linear only when the symbolic shapes are provably equal, rewires the linear to the dequantized input only when that view goes, and gives XNNPACK's create_linear the value of the node it replaces. No correctness bug turned up in the new loop in replace_linear_view_copy_input_output, so both findings below are test gaps. Python commands needed approval in this run, so no tests were run, and every finding comes from reading the code.

Testing

  • backends/xnnpack/test/passes/test_convert_to_linear.py:70-82: test_qd8_linear_with_3d_input_and_dynamic_shapes never reaches the changed code, and it passes on main.
    • Why: find (convert_to_linear.py:51-55) resolves the linear's input to the dequantize node, and create_linear replaces the trailing view_copy of the decomposed linear (lines 134 and 149). The linear then feeds the graph output, so replace_linear_view_copy_input_output returns at addmm_mm_to_linear.py:75. The retrace at line 196 recomputes the value set at line 145, so main builds the same graph.
    • The test checks only the linear count and the outputs. The previous review asked for this case on the assumption that it reaches the rewiring. It does not.
    • Fix: make it reach the transform. Wrap the linear in a module that returns self.linear(x).view(x.shape[1], x.shape[0], 8), make dims 0 and 1 dynamic with the same max, and check that one view_copy is left.
      • On main, the bound check removes that view, and the output comparison fails on the (2, 5, 16) input. With this PR, the view stays.
      • Otherwise, drop the test.
    • Fix this →
  • backends/transforms/test/test_addmm_mm_to_linear.py: when a dequantize node exists, no test lets the fallback candidate (input_node, addmm_mm_to_linear.py:85) decide.
    • In every model here that has a view after the linear, that view either matches the dequantized candidate or matches neither. test_fp32_view_after_two_linears_with_dynamic_shapes reaches the fallback only when there is no dequantize node.
    • Consequence: a loop that tried only dqlinear_input whenever there is one would pass every test, and it would keep the no-op view in the case below.
    • Missing case: self.linear(_dequantize(xq).view(-1, 16)).view(-1, 8).
      • The view should go, and the linear should keep reading the flattened view.
      • Main instead rewires the linear to the dequantize node and keeps the view, so a graph check on this model also fails on main.
    • Fix this →

Recommendation

Approve. Nothing blocks the PR. The qd8 test is worth fixing in this PR, because the description lists it as coverage for this change.

AddmmToLinearTransform folds the views around a linear when the linear
can produce the same shape on its own. It decided that by comparing the
upper bounds of the two shapes. With dynamic shapes, two different shapes
can have the same bounds. For example, with a and b both in [2, 8], the
linear output [a, b, 8] and a following view to [b, a, 8] both have the
bounds [8, 8, 8]. The view was then dropped, so the output had the shape
[a, b, 8] instead of [b, a, 8]. A dim with no upper bound is compared by
its example size, so the same happens when the example sizes are equal.

XNNPACK, Vulkan and Samsung lowering run this transform. Inside a Vulkan
delegate the swapped view above is dropped today.

Now the transform compares the symbolic shapes, and drops the view only
when they are known to be equal. Static shapes are plain integers, so
their result is the same as before.

XNNPACK's ConvertToLinearPass gave each linear it makes a tensor sized by
the upper bounds of the op it replaces. The transform then could not
prove that a view after a second linear keeps its shape, and kept it.
The linear now takes the value of the op it replaces, so such a view
still goes.
…goes

When a linear reads a dequantized tensor through views,
AddmmToLinearTransform points it at the dequantized tensor itself. That
changes the shape of the linear output, from [6, 8] to [2, 3, 8] for an
input of [2, 3, 16], and it did this even when no view after the linear
was removed to make up for it. It also redirected every other reader of
the view, and left the linear's shape metadata at the old shape, so a
later linear could drop a view based on that stale shape.

For example, view(-1, 16) -> linear -> output returned [2, 3, 8] instead
of [6, 8], and view(-1, 16) -> linear -> linear -> view(-1, 4) returned
[2, 3, 4] instead of [6, 4].

Now the linear reads the dequantized tensor only when that makes its
output match the view after it, and that view is removed in the same
step. Only the linear is rewired, and it takes the shape of the removed
view. Otherwise it keeps its input, and a view that does not change its
output shape still goes. The dequantized tensor no longer has to have a
single reader, so two linears that read one dequantized input through
their own views are both rewired, and their views go.
@shoumikhin
shoumikhin force-pushed the linear-view-compare-shapes branch from 27cd6ab to c8a750e Compare November 4, 2026 23:10
Copilot AI balanced review requested due to automatic review settings November 4, 2026 23:10
@shoumikhin

Copy link
Copy Markdown
Contributor Author

Thanks for the review. Both test gaps are fixed.

  • The dynamically quantized XNNPACK test. You were right: it passed on main without reaching the changed code. I replaced it with your model, without the quantization: a linear followed by view(x.shape[1], x.shape[0], 8), with both dims dynamic and the same max. It checks that the view stays and compares the output on a (2, 5, 16) input. On main the view is removed and the test fails. A quantized version would need its own export and quantization code, because the Quantize stage exports with static shapes, which fixes the sizes this view reads from the input. It would not test more: ConvertToLinearPass makes the linear read the dequantized tensor directly, so the transform makes the same shape check. The transform tests already cover a linear that reads a dequantized tensor through views.
  • The fallback to the linear's own input. Added self.linear(_dequantize(xq).view(-1, 16)).view(-1, 8) to the rewiring test. The view goes, and the linear keeps reading the flattened view. It fails on main, where the linear reads the dequantize node and the view stays. It also fails if the transform tries only the dequantized input when there is one.

@shoumikhin

Copy link
Copy Markdown
Contributor Author

@claude /pr-review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@claude

claude Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Claude finished @shoumikhin's task in 25m 11s —— View job


PR Review: #24626. I found no blockers, only three minor issues: the rewire can also replace the linear's weight (main has this too), no test covers the guard that now decides the rewire, and the docstring doesn't say that removing the view now needs symbolic shapes.

Detailed review

Summary

The PR removes the view after a linear only when the symbolic shapes are provably equal. It points the linear at the dequantized input only when that view goes, and it gives XNNPACK's create_linear the value of the node it replaces. I found no correctness regression.

What I could not do in this run:

  • No tests were run. python, pytest and git fetch needed approval. Add them to --allowedTools so the review can run tests. Every finding below comes from reading the code.
  • The diff is against dadc829, not origin/main. The checkout is shallow and has no merge base with origin/main. dadc829 is the PR's parent and gives the same 5 files and +276/-31.

Code Quality

  • backends/transforms/addmm_mm_to_linear.py:95: the rewire can also replace the linear's weight.
    • Cause: node.replace_input_with(input_node, new_input) replaces every argument that is input_node. If the weight is the same node as the input, the weight also becomes the N-D dequantized tensor.
    • Trigger: flat = _dequantize(xq).view(-1, 16) with xq of shape [2, 3, 16], then (flat @ flat.t()).view(2, 3, 6).
      • replace_addmm_mm_with_linear (lines 138-150) takes the weight from the t_copy/permute_copy argument without checking where it comes from. So it builds linear(flat, flat) with 6 output channels.
      • The dequantized input gives the shape [2, 3, 6], which matches the view. The linear becomes linear(dq, dq) with a 3-D weight, which aten.linear rejects.
    • Also on main: main has the same problem in more cases. Its input_node.replace_all_uses_with(dqlinear_input) ran even when no view followed the linear. The trigger is contrived, but this PR rewrites this line.
    • Fix: node.update_arg(0, new_input), which changes only the activation. Fix this →

Testing

  • backends/transforms/test/test_addmm_mm_to_linear.py:148: no test covers the reader-count guard at addmm_mm_to_linear.py:72.
    • Why it matters: no model in the file has a linear with more than one reader. With this PR, that guard also decides whether the linear is rewired. On main, the rewire ran before the reader count was checked.
    • Trigger: y = self.linear(_dequantize(xq).view(-1, 16)), returning y, y.view(a, b, 8).
      • On main, the linear is rewired and y comes back as [2, 3, 8] instead of [6, 8].
      • If the loop took the first reader instead of skipping such a linear, every test in the file would still pass.
    • Fix: add this model with _VIEW to the loop at line 148. Return y first so the output_node().args[0][0] is linear check still holds. Fix this →

API Design

  • backends/transforms/addmm_mm_to_linear.py:62-67: the docstring doesn't match the new behavior.
    • What it says: it still promises that x -> view_copy -> view_copy -> linear -> view_copy -> y always becomes x -> linear -> y. It also doesn't tell callers what this change now needs from them.
    • What happens now:
      • The views before the linear are skipped only when x is a dequantize_per_tensor.tensor node and the view after the linear goes.
      • That view goes only when statically_known_true can prove the shapes are equal. With dynamic shapes, both the linear's input and the view therefore need symbolic meta["val"].
    • Consequence: a fixed-size value, like the torch.zeros(get_shape(output)) that create_linear set before this PR, keeps a view that main removed, with no warning. The output is still correct, but an extra view_copy stays in the graph.
    • Who is affected:
      • apply_addmm_mm_to_linear_transform is exported from backends/transforms/__init__.py:10. Vulkan (vulkan_preprocess.py:192) and Samsung (enn_pass_manager.py:79) run the transform in their own pass lists.
      • A search found no pass in the Vulkan, Samsung or XNNPACK backends that sets a fixed-size value this way, so this affects new passes and out-of-tree callers.
    • Fix: state both conditions in the docstring. Fix this →

Recommendation

Approve. Nothing blocks the PR. All three items are minor, and main already has the first one.

@shoumikhin

Copy link
Copy Markdown
Contributor Author

Thanks. Merging as is. The guard test, the docstring note on symbolic shapes, and the weight case go into a follow-up PR together with the addmm fixes.

@shoumikhin
shoumikhin merged commit 38ba5da into pytorch:main Nov 5, 2026
@shoumikhin

Copy link
Copy Markdown
Contributor Author

Follow-up for the review points: #24658

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. release notes: backends

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants