[Mlir-commits] [mlir] [mlir][tensor] Avoid asserts in reshape verifiers on unranked tensors (PR #179005)
Samarth Narang
llvmlistbot at llvm.org
Mon Feb 2 11:57:00 PST 2026
================
@@ -2051,8 +2051,8 @@ static LogicalResult verifyTensorReshapeOp(TensorReshapeOp op,
}
LogicalResult ExpandShapeOp::verify() {
- auto srcType = getSrcType();
- auto resultType = getResultType();
+ auto srcType = llvm::cast<RankedTensorType>(getSrc().getType());
+ auto resultType = llvm::cast<RankedTensorType>(getResult().getType());
----------------
snarang181 wrote:
```
error: no viable conversion from 'mlir::TensorType' to 'RankedTensorType'
2081 | RankedTensorType resultType = op.getResult().getType();
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~
```
https://github.com/llvm/llvm-project/pull/179005
More information about the Mlir-commits
mailing list