mirror of https://github.com/llvm/torch-mlir
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
parent
874fdb7e42
commit
6885f1ed8a
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue