We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5dc9e87 commit 3e84053Copy full SHA for 3e84053
mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
@@ -928,10 +928,16 @@ LogicalResult tosa::ReshapeOp::inferReturnTypeComponents(
928
// dimension.
929
int64_t numElements = inputShape.getNumElements();
930
int64_t staticMul = 1;
931
- for (auto val : newShapeValue) {
+ int i = 0;
932
+ for (auto &val : newShapeValue) {
933
+ if (val == 0) {
934
+ // Swap 0 dim with corresponding input dim
935
+ val = inputShape.getDimSize(i);
936
+ }
937
if (!ShapedType::isDynamic(val)) {
938
staticMul *= val;
939
}
940
+ i++;
941
942
943
// Determine the length of the dynamic dimension.
0 commit comments