Skip to content

Commit d5623a7

Browse files
committed
Added missing change
1 parent ddf1108 commit d5623a7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/Conversion/TorchToLinalg/Linear.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1790,8 +1790,8 @@ class ConvertAtenOuterOp : public OpConversionPattern<AtenOuterOp> {
17901790
Type newResultType = getTypeConverter()->convertType(op.getType());
17911791

17921792
// Create a zero-initialized tensor with shape [lhsDim, rhsDim]
1793-
Value zeroTensor = createZeroInitTensor(
1794-
rewriter, loc, ValueRange{lhsDim, rhsDim}, elementType);
1793+
Value initTensor = createInitTensor(
1794+
rewriter, loc, ValueRange{lhsDim, rhsDim}, elementType, NULL);
17951795

17961796
// Set up affine indexing maps:
17971797
// We create a 2D loop iteration space. For the lhs, we use the first index
@@ -1811,9 +1811,9 @@ class ConvertAtenOuterOp : public OpConversionPattern<AtenOuterOp> {
18111811
Value outerProd =
18121812
rewriter
18131813
.create<linalg::GenericOp>(
1814-
loc, zeroTensor.getType(),
1814+
loc, initTensor.getType(),
18151815
/*inputs=*/ValueRange{lhsDim, rhsDim},
1816-
/*outputs=*/zeroTensor,
1816+
/*outputs=*/initTensor,
18171817
/*indexingMaps=*/
18181818
SmallVector<AffineMap, 3>{mapLhs, mapRhs, mapOut},
18191819
/*iteratortType=*/iteratorTypes,

0 commit comments

Comments
 (0)