[Mlir-commits] [mlir] [mlir] Convert TensorType and BaseMemRefType to interfaces (PR #133053)
Matthias Springer
llvmlistbot at llvm.org
Wed Mar 26 02:21:33 PDT 2025
================
@@ -41,7 +41,7 @@ TensorType inferReshapeInputType(TypedValue<TensorType> input,
// 0D tensor. While such construct is not incorrect on its own, bufferization
// cannot properly handle it at the moment, so we avoid it.
SmallVector<int64_t> shape(input.getType().getRank(), 1);
- return input.getType().clone(shape);
+ return mlir::cast<TensorType>(input.getType().clone(shape));
----------------
matthias-springer wrote:
Just to clarify: Is the cast necessary because `clone` is now calling the `ShapedType` implementation, which returns a `ShapedType`?
https://github.com/llvm/llvm-project/pull/133053
More information about the Mlir-commits
mailing list