Lines Matching refs:targetShape
31 ArrayRef<int64_t> targetShape, in getVectorOffset() argument
34 computeStrides(originalShape, targetShape); in getVectorOffset()
37 computeElementOffsetsFromVectorSliceOffsets(targetShape, vectorOffsets); in getVectorOffset()
54 ArrayRef<int64_t> targetShape, in DecomposeShapeIterator() argument
56 : vectorShape(targetShape.begin(), targetShape.end()), in DecomposeShapeIterator()
59 assert(originalShape.size() == targetShape.size()); in DecomposeShapeIterator()
60 assert(loopOrder.size() == targetShape.size()); in DecomposeShapeIterator()
65 sliceDimCounts[r] = ceilDiv(originalShape[r], targetShape[r]); in DecomposeShapeIterator()
155 Optional<SmallVector<int64_t, 4>> targetShape = options.nativeShape(op); in getTargetShape() local
156 if (!targetShape) in getTargetShape()
158 auto maybeShapeRatio = shapeRatio(*maybeUnrollShape, *targetShape); in getTargetShape()
162 return targetShape; in getTargetShape()
194 auto targetShape = getTargetShape(options, readOp); in matchAndRewrite() local
195 if (!targetShape) in matchAndRewrite()
198 SmallVector<int64_t, 4> strides(targetShape->size(), 1); in matchAndRewrite()
206 VectorType::get(*targetShape, sourceVectorType.getElementType()); in matchAndRewrite()
212 DecomposeShapeIterator indexToOffsets(originalSize, *targetShape, in matchAndRewrite()
250 auto targetShape = getTargetShape(options, writeOp); in matchAndRewrite() local
251 if (!targetShape) in matchAndRewrite()
254 SmallVector<int64_t, 4> strides(targetShape->size(), 1); in matchAndRewrite()
262 DecomposeShapeIterator indexToOffsets(originalSize, *targetShape, in matchAndRewrite()
269 loc, writeOp.getVector(), elementOffsets, *targetShape, strides); in matchAndRewrite()
315 auto targetShape = getTargetShape(options, contractOp); in matchAndRewrite() local
316 if (!targetShape) in matchAndRewrite()
331 DecomposeShapeIterator indexToOffsets(originalSize, *targetShape, in matchAndRewrite()
343 permutationMap, ArrayRef<int64_t>(*targetShape)); in matchAndRewrite()
381 applyPermutationMap(dstAffineMap, ArrayRef<int64_t>(*targetShape)); in matchAndRewrite()
417 Optional<SmallVector<int64_t, 4>> targetShape = in matchAndRewrite() local
419 if (!targetShape) in matchAndRewrite()
422 SmallVector<int64_t, 4> ratio = *shapeRatio(originalSize, *targetShape); in matchAndRewrite()
432 getVectorOffset(originalSize, *targetShape, i); in matchAndRewrite()
437 loc, reductionOp.getSource(), offsets, *targetShape, operandStrides); in matchAndRewrite()
441 for (size_t i : llvm::seq(size_t(0), targetShape->size())) { in matchAndRewrite()
444 dstShape.push_back((*targetShape)[i]); in matchAndRewrite()
491 auto targetShape = getTargetShape(options, op); in matchAndRewrite() local
492 if (!targetShape) in matchAndRewrite()
497 SmallVector<int64_t, 4> ratio = *shapeRatio(originalSize, *targetShape); in matchAndRewrite()
503 SmallVector<int64_t, 4> strides(targetShape->size(), 1); in matchAndRewrite()
505 VectorType::get(*targetShape, dstVecType.getElementType()); in matchAndRewrite()
508 getVectorOffset(originalSize, *targetShape, i); in matchAndRewrite()
518 loc, operand.get(), offsets, *targetShape, strides)); in matchAndRewrite()
735 Optional<SmallVector<int64_t, 4>> targetShape = in matchAndRewrite() local
737 if (!targetShape) in matchAndRewrite()
740 int64_t ratio = (*shapeRatio(originalSize, *targetShape))[0]; in matchAndRewrite()
747 getVectorOffset(originalSize, *targetShape, i); in matchAndRewrite()
750 loc, reductionOp.getVector(), offsets, *targetShape, strides); in matchAndRewrite()
782 auto targetShape = getTargetShape(options, tranposeOp); in matchAndRewrite() local
783 if (!targetShape) in matchAndRewrite()
786 SmallVector<int64_t, 4> strides(targetShape->size(), 1); in matchAndRewrite()
789 SmallVector<int64_t, 4> ratio = *shapeRatio(originalSize, *targetShape); in matchAndRewrite()
798 getVectorOffset(originalSize, *targetShape, i); in matchAndRewrite()
804 permutedShape[indices.value()] = (*targetShape)[indices.index()]; in matchAndRewrite()