[Mlir-commits] [mlir] [mlir] Convert TensorType and BaseMemRefType to interfaces (PR #133053)
Matthias Springer
llvmlistbot at llvm.org
Wed Mar 26 03:08:04 PDT 2025
================
@@ -77,9 +77,9 @@ struct CastOpInterface
// Case 3: Ranked tensor -> ranked tensor. The offsets and strides do not
// change.
auto rankedResultType = cast<RankedTensorType>(castOp.getType());
- return MemRefType::get(
+ return llvm::cast<BaseMemRefType>(MemRefType::get(
----------------
matthias-springer wrote:
Can we add this to the `extra(Shared?)ClassDeclaration` section of `MemRefType`, `UnrankedMemRefType`, `RankedTensorType`, `UnrankedTensorType`? (Converting to the new interfaces.) Then it's really almost NFC for existing code.
https://github.com/llvm/llvm-project/pull/133053
More information about the Mlir-commits
mailing list