[Mlir-commits] [mlir] [mlir][bufferization] Introduce reconcileBufferTypeMismatchFn hook (PR #202667)
Matthias Springer
llvmlistbot at llvm.org
Thu Jun 11 02:30:42 PDT 2026
================
@@ -273,6 +273,14 @@ struct BufferizationOptions {
using DefaultMemorySpaceFn =
std::function<std::optional<Attribute>(TensorLikeType t)>;
+ /// Resolve a mismatch between buffer types that were independently inferred
+ /// for the same bufferized value. Returns `failure()` to signal bufferization
+ /// failure; returns a buffer-like type when reconciliation suceeded. By
+ /// default, resolves into a memref with a fully dynamic layout.
+ using ReconcileBufferTypeMismatchFn = std::function<FailureOr<BufferLikeType>(
+ Operation *, BufferLikeType x, BufferLikeType y,
----------------
matthias-springer wrote:
Can you drop the `Operation *`? This function is independent of any operation.
https://github.com/llvm/llvm-project/pull/202667
More information about the Mlir-commits
mailing list