Repository navigation
Conversation
hiyufan
marked this pull request as ready for review
October 25, 2026 11:27
hiyufan
force-pushed
the
fix/prove-inverse-layout-maps-20594
branch
from
November 15, 2026 02:51
09a34b4 to
bfc8265
Compare
hiyufan
force-pushed
the
fix/prove-inverse-layout-maps-20594
branch
from
November 15, 2026 03:38
bfc8265 to
0596d0a
Compare
hiyufan
force-pushed
the
fix/prove-inverse-layout-maps-20594
branch
from
November 15, 2026 06:30
0596d0a to
d9a61e4
Compare
This branch has not been deployed
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.
OptimizeLayoutTransformcancels consecutive layout transforms based only on equal endpoint shapes. A transpose followed by identity on a square tensor therefore becomesreturn xand changes the output values.Require the composed index maps to be provably identity over the input domain before cancelling them. Binding the source indices to their extents also preserves cancellation for maps involving bounded division/modulo, including the existing padding-reversal pattern.
Fixes #20594.
Add a matrix of transpose and merge/split maps, inverse/non-inverse pairs, and static/symbolic shapes. Each case checks CPU C-backend VM values against NumPy and checks whether cancellation occurred.
Use the current Analyzer API with an explicit
ConstraintContextcontaining the source index ranges.Validation against main
f0267a0a3e, Python 3.11, LLVM 21.1.8 and source-built pinned TIRx/FFI dependencies:test_optimize_layout_transform.pyandtest_transform_alter_op_impl.py: 17 passed.Prepared with OpenAI Codex assistance. The build and validation above were executed locally.
Fresh CI results are pending.