fix: Broaden range of tosa.matmul outputs that don't need to be reshaped (#1015)

Co-authored-by: Andrew Cain <acain@d-matrix.ai>
pull/1020/head
Andrew Cain 2022-07-07 10:24:16 +10:00 committed by GitHub
parent 874fdb7e42
commit 6885f1ed8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -1315,11 +1315,11 @@ public:
matmulLhs, matmulRhs)
.getResult();
// Perform the reshape to output shape. This is always required unless both
// inputs are rank=3, in which case the tosa.matmul output itself is
// Perform the reshape to output shape. This is always required unless max
// input rank=3 and there was no broadcasting, in which case the tosa.matmul output itself is
// correctly shaped.
bool performOpReshape =
!(lhsRank == 3 && rhsRank == 3 && lhsShape[0] == rhsShape[0]);
!(maxInputRank == 3 && !performBatchDimBroadcast);
if (performOpReshape) {
// Since the output shape may be unknown, we construct it