Lines Matching refs:CastOp

93 bool mlir::tensor::canFoldIntoConsumerOp(CastOp castOp) {  in canFoldIntoConsumerOp()
123 bool mlir::tensor::canFoldIntoProducerOp(CastOp castOp) { in canFoldIntoProducerOp()
135 auto castOp = operand.get().getDefiningOp<tensor::CastOp>(); in foldTensorCast()
144 bool CastOp::areCastCompatible(TypeRange inputs, TypeRange outputs) { in areCastCompatible()
195 struct ChainedTensorCast : public OpRewritePattern<CastOp> {
196 using OpRewritePattern<CastOp>::OpRewritePattern;
198 LogicalResult matchAndRewrite(CastOp tensorCast, in matchAndRewrite()
200 auto tensorCastOperand = tensorCast.getOperand().getDefiningOp<CastOp>(); in matchAndRewrite()
226 rewriter.replaceOpWithNewOp<CastOp>(tensorCast, resultType, in matchAndRewrite()
244 struct TensorCastExtractSlice : public OpRewritePattern<CastOp> {
245 using OpRewritePattern<CastOp>::OpRewritePattern;
247 LogicalResult matchAndRewrite(CastOp tensorCast, in matchAndRewrite()
283 void CastOp::getCanonicalizationPatterns(RewritePatternSet &results, in getCanonicalizationPatterns()
386 auto castOp = dimOp.getSource().getDefiningOp<CastOp>(); in matchAndRewrite()
665 rewriter.replaceOpWithNewOp<tensor::CastOp>(tensorFromElements, resultType, in matchAndRewrite()
717 auto tensorCast = extract.getTensor().getDefiningOp<tensor::CastOp>(); in matchAndRewrite()
1200 auto castOp = sliceOp.getSource().getDefiningOp<tensor::CastOp>(); in matchAndRewrite()
1217 rewriter.replaceOpWithNewOp<tensor::CastOp>(sliceOp, sliceOp.getType(), in matchAndRewrite()
1368 replacement = rewriter.create<tensor::CastOp>(op.getLoc(), op.getType(), in operator ()()
1626 toInsert = rewriter.create<tensor::CastOp>(insertSliceOp.getLoc(), in matchAndRewrite()
1668 auto castOp = v.getDefiningOp<tensor::CastOp>(); in matchAndRewrite()
1698 replacement = rewriter.create<tensor::CastOp>(insertSliceOp.getLoc(), in matchAndRewrite()
1750 !tensor::CastOp::areCastCompatible(srcType, newSrcType)) in matchAndRewrite()
1764 Value cast = rewriter.create<tensor::CastOp>( in matchAndRewrite()
1964 rewriter.replaceOpWithNewOp<tensor::CastOp>( in matchAndRewrite()
1977 auto castOp = padTensorOp.getSource().getDefiningOp<tensor::CastOp>(); in matchAndRewrite()
2000 rewriter.replaceOpWithNewOp<tensor::CastOp>( in matchAndRewrite()
2017 dyn_cast<tensor::CastOp>(*padTensorOp->getUsers().begin()); in matchAndRewrite()
2330 toInsert = rewriter.create<tensor::CastOp>(insertSliceOp.getLoc(), in matchAndRewrite()