Lines Matching refs:genericOp
55 matchAsPerformingReduction(linalg::GenericOp genericOp);
58 matchAndRewrite(linalg::GenericOp genericOp, ArrayRef<Value> operands,
66 linalg::GenericOp genericOp) { in matchAsPerformingReduction() argument
67 Operation *op = genericOp.getOperation(); in matchAsPerformingReduction()
70 if (!genericOp.hasBufferSemantics()) in matchAsPerformingReduction()
74 if (genericOp.getNumInputs() != 1 || genericOp.getNumOutputs() != 1) in matchAsPerformingReduction()
88 if (!genericOp.hasSingleReductionLoop()) in matchAsPerformingReduction()
91 if (genericOp.indexing_maps().getValue().size() != 2) in matchAsPerformingReduction()
96 auto inputMap = genericOp.indexing_maps().getValue()[0].cast<AffineMapAttr>(); in matchAsPerformingReduction()
98 genericOp.indexing_maps().getValue()[1].cast<AffineMapAttr>(); in matchAsPerformingReduction()
108 return linalg::RegionMatcher::matchAsScalarBinaryOp(genericOp); in matchAsPerformingReduction()
112 linalg::GenericOp genericOp, ArrayRef<Value> operands, in matchAndRewrite() argument
114 Operation *op = genericOp.getOperation(); in matchAndRewrite()
118 auto binaryOpKind = matchAsPerformingReduction(genericOp); in matchAndRewrite()
124 DenseIntElementsAttr localSize = spirv::lookupLocalWorkGroupSize(genericOp); in matchAndRewrite()
138 Location loc = genericOp.getLoc(); in matchAndRewrite()
141 Value x = getLocalInvocationDimSize(genericOp, /*dim=*/0, loc, &rewriter); in matchAndRewrite()
196 rewriter.eraseOp(genericOp); in matchAndRewrite()