[Mlir-commits] [mlir] [MLIR][Math] Handle dynamic-shaped tensors without assertion (PR #204510)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Fri Jun 26 02:29:50 PDT 2026
================
@@ -77,6 +86,9 @@ static LogicalResult convertSinhOp(math::SinhOp op, PatternRewriter &rewriter) {
Value operand = op.getOperand();
Type opType = operand.getType();
+ if (isDynamicShaped(opType))
----------------
Peruere1828 wrote:
Thanks for the suggestions. I fixed it in the latest commit. All 12 ops are able to support dynamically-shaped ranked tensors now.
One question about unranked tensors (`tensor<*xf32>`): `tensor.splat` requires `AnyRankedTensor` as its result type, meaning the rank must be known at compile time to splat a scalar into a tensor. I look around but still don't know how to deal with it, so in my latest commit, I just keep the unranked tensors as pass-through. Do you see a better way to handle the unranked cases here?
https://github.com/llvm/llvm-project/pull/204510
More information about the Mlir-commits
mailing list