Skip to content

[pull] master from tensorflow:master - #8806

Merged
pull[bot] merged 8 commits into
Cache-Cloud:masterfrom
tensorflow:master
Sep 3, 2026
Merged

[pull] master from tensorflow:master#8806
pull[bot] merged 8 commits into
Cache-Cloud:masterfrom
tensorflow:master

Conversation

@pull

@pull pull Bot commented Sep 3, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

vishwakt and others added 8 commits August 31, 2026 23:51
The tf2xla kernels for Qr, Svd, and XlaSvd passed their input straight
to the XLA builder libraries without checking its rank. The graph-level
shape functions reject inputs of known rank below 2, but an input of
unknown static rank, for example one produced by StackPopV2, reaches
the kernels unchecked at compile time. QrExplicit then reads dimension
rank - 2 = -1 and dies on a fatal ShapeUtil check, and SvdOp dies on
the dim_size range check in TensorShape, aborting the process instead
of failing compilation.

Validate rank >= 2 in all three kernels before any trailing dimensions
are read, mirroring the validation and message style of the
neighboring MatrixSolve kernel and the errors already produced by the
Cholesky and SelfAdjointEig builder libraries.

The regression tests feed a rank-1 value through an unknown-rank
placeholder, which reproduces the abort on unfixed builds, and assert
that a regular InvalidArgumentError is raised instead.

Fixes #110798
Revert #126162

It needs to be aligned with TFLite's security threat model and only do minimal required changes.

Reverts 8aaa9f5

PiperOrigin-RevId: 975544861
I could add it to GemmFusion, but I don't think it is a very useful test. Broadcasts would normally get rejected as a user due to IsOutputWorthFusing where output bytes is increased. However, this one doesn't do that because the broadcast is the ROOT and there's nothing else to fuse it to so it says that it's still worth it.

V1 actually only rejects it because it doesn't propagate tiling through the broadcast user, but V2 has no issue with this.

PiperOrigin-RevId: 975559504
@pull pull Bot locked and limited conversation to collaborators Sep 3, 2026
@pull pull Bot added the ⤵️ pull label Sep 3, 2026
@pull
pull Bot merged commit 0d8b7bf into Cache-Cloud:master Sep 3, 2026
2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants