[Mlir-commits] [mlir] [mlir][ptr] Add high-level read and write memory operations (PR #161081)
Fabian Mora
llvmlistbot at llvm.org
Sun Sep 28 07:58:23 PDT 2025
fabianmcg wrote:
> I'm afraid of bloating the ptr dialect and making it more than a low-level/thin thing around memory.
Bundling higher-level concepts in the same dialect as lower-level concepts is something that easily scope creep and leads to intra-dialect lowering: this makes a bunch of things less natural, in particular forming a simple mental model around a dialect (and its canonicalization).
On the high-level op side, I was only thinking of adding `read`, `write` and `make_offsets` (a helper to create int offsets from strides and indices `make_offsets [%i0, %i1][%stride0, %stride1] : tensor<3x3xi32>`). I originally didn't think of this multi-level concepts as an issue, as the `vector`, `memref` and other dialect do the same.
A new dialect could be created, but it would only contain those 3 ops.
https://github.com/llvm/llvm-project/pull/161081
More information about the Mlir-commits
mailing list