Lines Matching +full:non +full:- +full:batch
1 //===- TosaDecomposeTransposeConv.cpp -------------------------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
16 //===----------------------------------------------------------------------===//
35 Location loc = op->getLoc();
36 Value input = op->getOperand(0);
37 Value weight = op->getOperand(1);
38 Value bias = op->getOperand(2);
43 ShapedType resultTy = cast<ShapedType>(op->getResult(0).getType());
62 convPad[0] = kernelHeight - 1 + pad[0];
63 convPad[1] = kernelHeight - 1 + pad[1];
64 convPad[2] = kernelWidth - 1 + pad[2];
65 convPad[3] = kernelWidth - 1 + pad[3];
100 Location loc = op->getLoc();
101 Value input = op->getOperand(0);
102 Value weight = op->getOperand(1);
103 Value bias = op->getOperand(2);
108 ShapedType resultTy = cast<ShapedType>(op->getResult(0).getType());
124 return rewriter.notifyMatchFailure(op, "non-one stride found.");
130 int64_t batch = inputTy.getDimSize(0);
140 (weightHeight % stride[0]) ? (stride[0] - weightHeight % stride[0]) : 0;
142 weightWidth % stride[1] ? stride[1] - weightWidth % stride[1] : 0;
145 getTosaConstShape(rewriter, op->getLoc(), weightPadding);
173 // Transpose the factored-out stride to the output channels.
200 inputPadding[2] += restridedWeightTy.getDimSize(1) - 1;
201 inputPadding[3] += restridedWeightTy.getDimSize(1) - 1;
202 inputPadding[4] += restridedWeightTy.getDimSize(2) - 1;
203 inputPadding[5] += restridedWeightTy.getDimSize(2) - 1;
206 getTosaConstShape(rewriter, op->getLoc(), inputPadding);
261 batch, convHeight, convWidth, stride[0], stride[1], outputChannels};
266 // Transpose the factored-out stride to the output channels.
277 batch, convHeight * stride[0], convWidth * stride[1], outputChannels};
283 int64_t resultSliceTop = std::max<int64_t>(0, -pad[0]);
284 int64_t resultSliceLeft = std::max<int64_t>(0, -pad[2]);
290 std::min<int64_t>(convReshapeDims1[1] - resultSliceTop,
291 resultTy.getDimSize(1) - resultPadTop);
293 std::min<int64_t>(convReshapeDims1[2] - resultSliceLeft,
294 resultTy.getDimSize(2) - resultPadLeft);
311 resultPadding[3] = resultTy.getDimSize(1) - resultPadTop - sliceSize[1];
313 resultPadding[5] = resultTy.getDimSize(2) - resultPadLeft - sliceSize[2];
316 getTosaConstShape(rewriter, op->getLoc(), resultPadding);