Repository navigation
[TIRx] Store tensor address geometry in layouts - #20786
Merged
Merged
Conversation
Make layouts the single source of tensor address geometry while retaining constructor adapters and regular-memory ABI matching. Preserve compact stride matching, post-swizzle origins, and layout-aware view and lowering semantics across TIRx and S-TIR.
spectrometerHBH
approved these changes
Oct 18, 2026
Keep memory contiguity on TileLayout and let TensorType prove default shape coverage and zero origin. Reuse optional analyzers lazily across both predicates and preserve origin-independent packing and footprint behavior.
tqchen
added a commit
that referenced
this pull request
Oct 18, 2026
Make layout the single source of tensor strides and element offsets. Tensor and S-TIR declarations accept explicit layouts, while views forward layout geometry directly. Shape-aligned memory layouts support dynamic strides and linear offset expressions through the existing parameter binder. Provide structural shape/stride matching and distinguish TileLayout contiguity from TensorType default shape coverage and zero origin. Both predicates reuse an optional analyzer after deep-equality checks. Python exposes the optional named matching result only in S-TIR. Shared-memory pools select their physical allocation base with pointer offsets, and Relax preserves contiguous native tensor origins at call boundaries.
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.
Make layout the single source of tensor strides and element offsets. Tensor and S-TIR declarations accept explicit layouts, while views forward layout geometry directly. Shape-aligned memory layouts support dynamic strides and linear offset expressions through the existing parameter binder.
Provide structural shape/stride matching and distinguish TileLayout contiguity from TensorType default shape coverage and zero origin. Both predicates reuse an optional analyzer after deep-equality checks. Python exposes the optional named matching result only in S-TIR. Shared-memory pools select their physical allocation base with pointer offsets, and Relax preserves contiguous native tensor origins at call boundaries.