[Mlir-commits] [mlir] [mlir][bufferization] Introduce createMemRefLayoutFn hook (PR #195622)
Matthias Springer
llvmlistbot at llvm.org
Wed May 13 03:26:44 PDT 2026
================
@@ -246,6 +246,13 @@ AllocTensorOp::getBufferType(Value value, const BufferizationOptions &options,
return getOperation()->emitError("could not infer memory space");
}
+ if (options.createMemRefLayoutFn) {
+ if (auto layout = options.createMemRefLayoutFn(getType())) {
----------------
matthias-springer wrote:
We have recently extended the One-Shot Bufferize infrastructure to support custom tensor and buffer types. This PR goes a bit in the other direction. What if you buffer type doesn't even have a layout map?
https://github.com/llvm/llvm-project/pull/195622
More information about the Mlir-commits
mailing list