[Mlir-commits] [mlir] [mlir][bufferization] Support custom types at function boundaries (PR #159766)
Matthias Springer
llvmlistbot at llvm.org
Sun Sep 21 08:41:18 PDT 2025
================
@@ -43,6 +43,18 @@ def Bufferization_TensorLikeTypeInterface
/*args=*/(ins
"::mlir::bufferization::BufferLikeType":$bufferType,
"::llvm::function_ref<::mlir::InFlightDiagnostic()>":$emitError)
+ >,
+ InterfaceMethod<[{
----------------
matthias-springer wrote:
Why is this interface function necessary? We already have `BufferizationOptions::functionArgTypeConverterFn`. We can change the signature to:
```
/// Tensor -> MemRef type converter.
/// Parameters: tensor type, memory space, func op, bufferization options
using FunctionArgTypeConverterFn =
std::function<BufferLikeType(TensorLikeType, Attribute memorySpace,
func::FuncOp, const BufferizationOptions &)>;
```
Do you need access to the function? In that case, we can pass an additional `FunctionOpInterface` to the lambda.
https://github.com/llvm/llvm-project/pull/159766
More information about the Mlir-commits
mailing list