[Mlir-commits] [mlir] [mlir][bufferization] Support custom types (1/N) (PR #142986)
Andrei Golubev
llvmlistbot at llvm.org
Tue Jul 1 01:29:25 PDT 2025
================
@@ -1030,7 +1027,7 @@ bufferization::detail::unknownGetAliasingValues(OpOperand &opOperand) {
}
bool bufferization::detail::defaultHasTensorSemantics(Operation *op) {
- auto isaTensor = [](Type t) { return isa<TensorType>(t); };
+ auto isaTensor = [](Type t) { return isa<TensorLikeType>(t); };
----------------
andrey-golubev wrote:
Please refer to https://github.com/llvm/llvm-project/pull/134220 for more details.
I guess builtin dialect (and thus types, etc.) are supposed to be always loaded?
As for bufferization, I guess you would load bufferization dialect if you plan to use one-shot bufferization or similar facility. This would automatically register the builtin external models for you.
> any pass that expects the registration need to add the bufferization to the dependent dialect.
If your pass uses one-shot-bufferization, the Bufferization dialect must be a dependency anyway I guess?
> My understanding was that a dialect should be registered if we're going to create the ops/types/attrs. The rule no longer hold today.
Why do you think so? We've had some debate about how this part should look like for builtins in particular, the "let's put external models into dialect initialization" seemed to be a decent compromise given that builtin dialect cannot depend on bufferization.
https://github.com/llvm/llvm-project/pull/142986
More information about the Mlir-commits
mailing list