Skip to content

Commit 3e35ada

Browse files
committed
[mlir][tosa] Check empty Concat input for inferReturnTypeComponents
Signed-off-by: Jerry Ge <[email protected]> Change-Id: I72e6f9bbdefca533f49e9c273d6a0d58aa30e4c1
1 parent 9965f3d commit 3e35ada

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

mlir/lib/Dialect/Tosa/IR/TosaOps.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1066,6 +1066,10 @@ LogicalResult tosa::ConcatOp::inferReturnTypeComponents(
10661066

10671067
hasRankedInput = true;
10681068
}
1069+
1070+
if (adaptor.getInput1().empty())
1071+
return failure();
1072+
10691073
Type inputType =
10701074
llvm::cast<TensorType>(adaptor.getInput1().getType()[0]).getElementType();
10711075
if (!hasRankedInput) {

0 commit comments

Comments
 (0)