Skip to content

Commit a38ad6e

Browse files
authored
[mlir][tosa] Check empty Concat input for inferReturnTypeComponents (llvm#134728)
Signed-off-by: Jerry Ge <[email protected]>
1 parent ddb32a6 commit a38ad6e

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)