Repository navigation
Conversation
maxbartel
force-pushed
the
layout/propagate-tensor-encodings
branch
from
September 28, 2026 13:42
be96c36 to
1b8d6bb
Compare
Encoding propagation is currently tied to dispatch hoisting, which prevents layout assignment from using the same rewrite rules on the surrounding tensor graph. Separate where propagation may happen from the rewrites themselves and add a function pass for propagation outside dispatches. Keep the existing hoisting behavior, and stop at existing dispatches and block boundaries. iree-dispatch-creation-propagate-encodings runs in the dispatch-time data-tiling pipeline and only swaps set_encoding ops with tensor.cast producers, so adding these rewrites to it would change that pipeline. Keep them separate until propagation through generic ops goes through the encoding propagation interfaces. Also stop bubbling set_encoding ops whose encoding is not an EncodingAttr, such as a padding encoding, instead of crashing. Hoisting already reached this within dispatches. No pipeline runs the new pass yet. A follow-up adds it to an experimental route that assigns and materializes data-tiling layouts before dispatch formation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
maxbartel
force-pushed
the
layout/propagate-tensor-encodings
branch
from
September 29, 2026 08:33
1b8d6bb to
ac661a8
Compare
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.
Encoding propagation is currently tied to dispatch hoisting, which prevents layout assignment from using the same rewrite rules on the surrounding tensor graph.
Separate where propagation may happen from the rewrites themselves, and add
iree-dispatch-creation-propagate-data-tiling-encodingsfor propagation outside dispatches. Hoisting keeps its existing behavior. The new pass stops at existing dispatches and block boundaries, and constant CSE stays disabled because Flow regions do not materialize constants themselves.Stack. This is one of five PRs adding an experimental CPU path that materializes data-tiling layouts before dispatch creation, so that
linalg.mmt4dand data-tiled convolutions fuse with their elementwise epilogues and result unpacks. Each PR is based on the previous one; please review only its own commit.--iree-opt-experimental-early-data-tiling)Validation.
bazel test //compiler/src/iree/compiler/DispatchCreation/test:allpasses (53/53) at this commit. The new bubble and sink tests across anscf.iffail when the same-block check is removed.Built and tested with Bazel on macOS arm64 (Apple M3 Max). Two local-only flags work around toolchain issues on that machine that are unrelated to this stack:
--features=-layering_checkand a linker wrapper for-Wl,--fatal-warnings, which Apple ld rejects.🤖 Generated with Claude Code