[Mlir-commits] [mlir] [mlir][tosa] Check for 0-ranked-tensors during fold (PR #68512)
Sarthak Gupta
llvmlistbot at llvm.org
Tue Oct 10 05:31:23 PDT 2023
================
@@ -874,7 +874,8 @@ OpFoldResult ReverseOp::fold(FoldAdaptor adaptor) {
return operandAttr;
// If the dim-length is 1, tosa.reverse is a no-op.
- if (operandTy.hasRank() && operandTy.getDimSize(axis) == 1)
+ if (operandTy.hasRank() && operandTy.getRank() != 0 &&
----------------
gptsarthak wrote:
@GeorgeARM I have made the requested changes, would like you to review the same. Thank you.
https://github.com/llvm/llvm-project/pull/68512
More information about the Mlir-commits
mailing list