[Mlir-commits] [mlir] [mlir][memref] Add static_sizes attribute to memref.view (PR #183795)
Matthias Springer
llvmlistbot at llvm.org
Sat Feb 28 04:59:07 PST 2026
matthias-springer wrote:
It's worth mentioning that many ops in MLIR follow the design of this PR today:
- `memref.subview`
- `memref.reinterpret_cast`
- `memref.collapse_shape`
- `memref.expand_shape`
- `tensor.extract_slice`
- `tensor.insert_slice`
- `tensor.collapse_shape`
- `tensor.expand_shape`
- `tensor.pad`
- `tensor.parallel_insert_slice`
There's even an interface for it: `OffsetSizeAndStrideOpInterface`
>From that perspective, `memref.view` is the odd one out. And this PR makes the op design more consistent.
I don't really care if we accept or reject this PR, but I'd like to make sure that we eventually end up with a consistent design. I.e., if we reject this PR, are we OK with removing `static_sizes`, `static_offsets`, `static_strides` from the above-mentioned ops?
For reference: I was advocating for PRs like this one [here](https://discourse.llvm.org/t/rfc-more-opfoldresult-and-mixed-indices-in-ops-that-deal-with-shaped-values/72510).
https://github.com/llvm/llvm-project/pull/183795
More information about the Mlir-commits
mailing list