Skip to content

Commit b5ec9a4

Browse files
author
Hariprasad Ravishankar
committed
Fix pre-commit failure
1 parent e5f1fe5 commit b5ec9a4

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

lib/Conversion/TorchToLinalg/Linear.cpp

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1628,24 +1628,25 @@ Value ConvertAtenConvolutionOp::createTransposedInputPadding(
16281628
Value outerDim = outerSizes[i + 2];
16291629
Value isPadding = rewriter.createOrFold<arith::CmpIOp>(
16301630
loc, arith::CmpIPredicate::ugt, outerDim, innerDim);
1631-
Value maxDim =
1632-
rewriter.createOrFold<arith::SelectOp>(loc, isPadding, outerDim, innerDim);
1631+
Value maxDim = rewriter.createOrFold<arith::SelectOp>(loc, isPadding,
1632+
outerDim, innerDim);
16331633
maxSizes.push_back(maxDim);
16341634
}
16351635

16361636
Value initMaxTensor =
16371637
createInitTensor(rewriter, loc, maxSizes, inputDTy, pad);
16381638

16391639
// Insert input
1640-
auto paddedTensor = tensor::InsertSliceOp::create(rewriter,
1641-
loc, torch_to_linalg::removeSizeInformation(rewriter, loc, input),
1640+
auto paddedTensor = tensor::InsertSliceOp::create(
1641+
rewriter, loc,
1642+
torch_to_linalg::removeSizeInformation(rewriter, loc, input),
16421643
initMaxTensor, insertSliceOffsets, inputSizes, strideIndexValues);
16431644

16441645
SmallVector<Value> allOnesStrides(inputSizes.size(), c1);
16451646

16461647
// Crop. Extract the final tensor from the "max" tensor
1647-
auto finalTensor = tensor::ExtractSliceOp::create(rewriter,
1648-
loc,
1648+
auto finalTensor = tensor::ExtractSliceOp::create(
1649+
rewriter, loc,
16491650
torch_to_linalg::removeSizeInformation(rewriter, loc, paddedTensor),
16501651
extractSliceOffsets, outerSizes, allOnesStrides);
16511652

@@ -1657,8 +1658,9 @@ Value ConvertAtenConvolutionOp::createTransposedInputPadding(
16571658
createInitTensor(rewriter, loc, outerSizes, inputDTy, pad);
16581659

16591660
// Insert the original input into the outer tensor with calculated offsets
1660-
auto paddedInput = tensor::InsertSliceOp::create(rewriter,
1661-
loc, torch_to_linalg::removeSizeInformation(rewriter, loc, input),
1661+
auto paddedInput = tensor::InsertSliceOp::create(
1662+
rewriter, loc,
1663+
torch_to_linalg::removeSizeInformation(rewriter, loc, input),
16621664
initPaddedTensor, insertSliceOffsets, inputSizes, strideIndexValues);
16631665
return paddedInput;
16641666
}

0 commit comments

Comments
 (0)