[Mlir-commits] [mlir] [mlir][bufferization] Introduce createMemRefLayoutFn hook (PR #195622)

Andrei Golubev llvmlistbot at llvm.org
Mon May 4 02:37:26 PDT 2026


================
@@ -1783,12 +1750,16 @@ ::mlir::LogicalResult test::TestDummyTensorOp::bufferize(
   if (mlir::failed(buffer))
     return failure();
 
-  const auto outType = getOutput().getType();
+  // Note: mlir::bufferization::getBufferType() would internally call
+  // TestDummyTensorOp::getBufferType()
   const auto bufferizedOutType =
-      convertTensorToBuffer(getOperation(), options, outType);
+      mlir::bufferization::getBufferType(getOutput(), options, state);
----------------
andrey-golubev wrote:

note: due to the presence of a new hook, these custom ops no longer need to specify custom bufferization and can instead function through general infra + a global-option hook.

https://github.com/llvm/llvm-project/pull/195622


More information about the Mlir-commits mailing list