[Mlir-commits] [mlir] [mlir][tensor] Preserve encoding in more canonicalizers (concat, reshape, pad) (PR #207241)
Dmitrii Makarenko
llvmlistbot at llvm.org
Fri Jul 10 06:24:40 PDT 2026
Devjiu wrote:
@joker-eph
Before I push further on proposing options - when you say this is "more inconsistent," what's the inconsistency you have in mind? I want to make sure I'm arguing against the actual concern and not a guess at it. Is it:
- inconsistent across encodings (some get asked, some don't, depending on whether they implement the interface), or
- inconsistent across transforms (some tensor.* ops would fold through an encoding, others wouldn't), or
- something about relying on `verifyEncoding` for a purpose it wasn't designed for?
If you already have a preferred design in mind, please share - I would be glad to adopt the current design to your suggestion.
My position: I don't think upstream canonicalizers should be guessing what a given encoding means for a given transform - that's the encoding author's call, not ours. `VerifiableTensorEncoding` already exists as the place to make that call explicit (sparse uses it for rank). If a downstream cares about a different invariant, they can express it there too.
https://github.com/llvm/llvm-project/pull/207241
More information about the Mlir-commits
mailing list