Home
last modified time | relevance | path

Searched refs:genericOp (Results 1 – 7 of 7) sorted by relevance

/external/llvm-project/mlir/lib/Conversion/LinalgToSPIRV/
DLinalgToSPIRV.cpp55 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()
[all …]
/external/llvm-project/mlir/lib/Dialect/Linalg/Transforms/
DBufferize.cpp115 GenericOpTy genericOp, ValueRange inputs, in finalizeBufferAllocationForGenericOp() argument
119 genericOp.getLoc(), in finalizeBufferAllocationForGenericOp()
123 /*initTensors=*/llvm::None, genericOp.indexing_maps(), in finalizeBufferAllocationForGenericOp()
124 genericOp.iterator_types(), genericOp.docAttr(), in finalizeBufferAllocationForGenericOp()
125 genericOp.library_callAttr(), genericOp.sparseAttr()); in finalizeBufferAllocationForGenericOp()
128 Block *oldBlock = genericOp.getBody(); in finalizeBufferAllocationForGenericOp()
134 for (Value v : ValueRange(outputs).drop_front(genericOp.getNumInitTensors())) in finalizeBufferAllocationForGenericOp()
149 rewriter.replaceOp(genericOp, outputs); in finalizeBufferAllocationForGenericOp()
209 if (auto genericOp = dyn_cast<linalg::GenericOp>(op)) { in matchAndRewrite() local
211 rewriter, genericOp, adaptor.inputs(), newOutputBuffers); in matchAndRewrite()
[all …]
DGeneralization.cpp79 linalg::GenericOp genericOp = pattern->createGenericOp(rootOp, rewriter); in matchAndRewrite() local
80 if (!genericOp) in matchAndRewrite()
83 rewriter.replaceOp(rootOp, genericOp.getResults()); in matchAndRewrite()
84 marker.replaceLinalgMarker(rewriter, genericOp.getOperation()); in matchAndRewrite()
120 linalg::GenericOp genericOp = in matchAndRewrite() local
122 if (!genericOp) in matchAndRewrite()
125 rewriter.replaceOp(rootOp, genericOp.getResults()); in matchAndRewrite()
126 marker.replaceLinalgMarker(rewriter, genericOp.getOperation()); in matchAndRewrite()
DVectorization.cpp75 auto genericOp = dyn_cast<linalg::GenericOp>(op); in isContraction() local
76 if (!genericOp) in isContraction()
79 auto mapRange = genericOp.indexing_maps().getAsValueRange<AffineMapAttr>(); in isContraction()
81 genericOp.getNumInputs() == 2 && genericOp.getNumOutputs() == 1 && in isContraction()
84 hasMultiplyAddBody(genericOp.region())); in isContraction()
102 auto genericOp = dyn_cast<linalg::GenericOp>(op); in isElementwise() local
103 if (!genericOp) in isElementwise()
105 if (genericOp.getNumLoops() != genericOp.getNumParallelLoops()) in isElementwise()
108 for (unsigned i = 0, e = genericOp.getNumOutputs(); i < e; i++) { in isElementwise()
109 if (!genericOp.getOutputIndexingMap(i).isIdentity()) in isElementwise()
[all …]
DFusionOnTensors.cpp751 LogicalResult matchAndRewrite(GenericOpTy genericOp, in matchAndRewrite()
753 LinalgOp linalgOp = cast<LinalgOp>(genericOp.getOperation()); in matchAndRewrite()
773 rewriter.replaceOp(genericOp, replacementValues.getValue()); in matchAndRewrite()
/external/tensorflow/tensorflow/compiler/mlir/tools/kernel_gen/transforms/
Dbuffer_reuse_pass.cc88 f.walk([&](linalg::GenericOp genericOp) { in build() argument
89 auto operand_buffers = genericOp.getShapedOperands(); in build()
99 AffineMap map_i = genericOp.getIndexingMap(i); in build()
100 AffineMap map_j = genericOp.getIndexingMap(j); in build()
/external/llvm-project/mlir/lib/Dialect/StandardOps/Transforms/
DExpandOps.cpp57 auto genericOp = in matchAndRewrite() local
60 OpBuilder::atBlockEnd(genericOp.getBody(), rewriter.getListener()); in matchAndRewrite()
62 Value lhs = genericOp.getCurrentValue(); in matchAndRewrite()
68 rewriter.replaceOp(op, genericOp.getResult()); in matchAndRewrite()