[Mlir-commits] [mlir] [mlir][bufferization] Make alloc_tensor's bufferization customizable (PR #215590)

Matthias Springer llvmlistbot at llvm.org
Wed Aug 12 00:26:16 PDT 2026


https://github.com/matthias-springer commented:

> Overriding BufferizationOptions::allocationFn is not enough, as that hook cannot change the buffer type without a contract break: getBufferType != bufferize().getType.

What's the problem here? Can we generalize the "bufferize" implementation?

External models were not designed to be "swappable". Personally, I wouldn't mind merging this because it make the infrastructure a bit more uniform (all `BufferizableOpInterface` implementations are external models, with the same file name in each dialect). But I'm wondering if something could break when there are multiple interface implementations. E.g. one transformation registers a certain impl, another one registers another impl.


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


More information about the Mlir-commits mailing list