Home
last modified time | relevance | path

Searched refs:FuncOp (Results 1 – 25 of 392) sorted by relevance

12345678910>>...16

/external/tensorflow/tensorflow/compiler/mlir/tensorflow/transforms/
Dpasses.h33 std::unique_ptr<OperationPass<FuncOp>>
38 std::unique_ptr<OperationPass<FuncOp>>
44 std::unique_ptr<OperationPass<FuncOp>> CreateDropWhileShapeInvariantPass();
48 std::unique_ptr<OperationPass<FuncOp>> CreateTFFunctionalControlFlowToCFG();
62 std::unique_ptr<OperationPass<FuncOp>> CreateMaterializePassthroughOpPass();
71 std::unique_ptr<OperationPass<FuncOp>> CreateUnrollBatchMatMulPassPass();
74 std::unique_ptr<OperationPass<FuncOp>> CreateBatchMatMulToEinsumPass();
77 std::unique_ptr<OperationPass<FuncOp>> CreateTFOptimizePass();
81 std::unique_ptr<OperationPass<FuncOp>> CreateRewriteTPUEmbeddingOpsPass();
84 std::unique_ptr<OperationPass<FuncOp>> CreateGpuOpFusionPass();
[all …]
Dresource_op_lifting_cleanup.cc119 FuncOp CloneFunctionIfNeeded(FuncOp func) { in CloneFunctionIfNeeded()
124 FuncOp cloned = func.clone(); in CloneFunctionIfNeeded()
135 void EliminateUnusedResultsForIfCase(Operation *op, ArrayRef<FuncOp> branches) { in EliminateUnusedResultsForIfCase()
137 SmallVector<FuncOp, 2> cloned_branches; in EliminateUnusedResultsForIfCase()
139 for (FuncOp func : branches) { in EliminateUnusedResultsForIfCase()
140 FuncOp cloned = CloneFunctionIfNeeded(func); in EliminateUnusedResultsForIfCase()
158 for (FuncOp func : cloned_branches) in EliminateUnusedResultsForIfCase()
166 for (FuncOp func : branches) { in EliminateUnusedResultsForIfCase()
178 for (FuncOp func : cloned_branches) func.eraseArgument(idx); in EliminateUnusedResultsForIfCase()
186 for (FuncOp func : cloned_branches) { in EliminateUnusedResultsForIfCase()
[all …]
Dtpu_identity_pruning.cc49 SmallVector<FuncOp, 4> CollectReachableFunctions(Region& region) { in CollectReachableFunctions()
50 llvm::SmallPtrSet<FuncOp, 4> reachable_funcs; in CollectReachableFunctions()
53 [&reachable_funcs](Region& src, SmallVectorImpl<FuncOp>& funcs_to_visit) { in CollectReachableFunctions()
55 auto func = dyn_cast_or_null<FuncOp>(call_op.resolveCallable()); in CollectReachableFunctions()
61 SmallVector<FuncOp, 4> funcs_to_visit; in CollectReachableFunctions()
65 SmallVector<FuncOp, 4> new_funcs_to_visit; in CollectReachableFunctions()
66 for (FuncOp func_to_visit : funcs_to_visit) { in CollectReachableFunctions()
96 for (FuncOp reachable_func : reachable_funcs) in runOnOperation()
Dbridge.cc45 pm.addNestedPass<FuncOp>(std::move(pass)); in AddGraphExportLoweringPasses()
53 pm.addNestedPass<FuncOp>(CreateTPUDevicePropagationPass()); in AddGraphExportLoweringPasses()
91 pm.addNestedPass<FuncOp>( in CreateTPUBridgePipeline()
96 pm.addNestedPass<FuncOp>(CreateExecutorDialectToFunctionalConversionPass()); in CreateTPUBridgePipeline()
100 pm.addNestedPass<FuncOp>(CreateTPUReorderReplicateAndPartitionedInputsPass()); in CreateTPUBridgePipeline()
105 OpPassManager &func_pm = pm.nest<FuncOp>(); in CreateTPUBridgePipeline()
120 pm.addNestedPass<FuncOp>(createCSEPass()); in CreateTPUBridgePipeline()
125 pm.addNestedPass<FuncOp>(TFDevice::CreateClusterConstantSinkingPass()); in CreateTPUBridgePipeline()
131 pm.addNestedPass<FuncOp>(CreateTPUResourceReadsWritesPartitioningPass()); in CreateTPUBridgePipeline()
135 pm.addNestedPass<FuncOp>(TFDevice::CreateReplicateInvariantOpHoistingPass()); in CreateTPUBridgePipeline()
[all …]
/external/tensorflow/tensorflow/compiler/mlir/lite/
Dtf_tfl_passes.cc35 std::unique_ptr<OperationPass<FuncOp>>
47 pass_manager->addNestedPass<mlir::FuncOp>( in AddQuantizationPasses()
51 pass_manager->addNestedPass<mlir::FuncOp>( in AddQuantizationPasses()
57 pass_manager->addNestedPass<mlir::FuncOp>( in AddQuantizationPasses()
61 pass_manager->addNestedPass<mlir::FuncOp>( in AddQuantizationPasses()
72 pass_manager->addNestedPass<mlir::FuncOp>( in AddTFToTFLConversionPasses()
116 pass_manager->addNestedPass<mlir::FuncOp>( in AddTFToTFLConversionPasses()
161 pass_manager->addNestedPass<mlir::FuncOp>( in AddTFToTFLConversionPasses()
166 pass_manager->addNestedPass<mlir::FuncOp>(mlir::createCanonicalizerPass()); in AddTFToTFLConversionPasses()
167 pass_manager->addNestedPass<mlir::FuncOp>(mlir::createCSEPass()); in AddTFToTFLConversionPasses()
[all …]
/external/tensorflow/tensorflow/compiler/xla/service/mlir_gpu/
Dkernel_lowering.cc73 pm.addNestedPass<mlir::FuncOp>(::mlir::createBufferHoistingPass()); in LowerLHLOToGPU()
74 pm.addNestedPass<mlir::FuncOp>(::mlir::createBufferDeallocationPass()); in LowerLHLOToGPU()
76 pm.addNestedPass<mlir::FuncOp>(createFusionOpRemoverPass()); in LowerLHLOToGPU()
78 pm.addNestedPass<mlir::FuncOp>(::mlir::createCopyRemovalPass()); in LowerLHLOToGPU()
80 pm.addNestedPass<mlir::FuncOp>(::mlir::lmhlo::createLegalizeToGpuPass()); in LowerLHLOToGPU()
82 pm.addNestedPass<mlir::FuncOp>( in LowerLHLOToGPU()
85 pm.addNestedPass<mlir::FuncOp>(::mlir::lmhlo::createLhloFuseLinalgPass( in LowerLHLOToGPU()
89 pm.addNestedPass<mlir::FuncOp>( in LowerLHLOToGPU()
93 pm.addNestedPass<::mlir::FuncOp>(::mlir::createCanonicalizerPass()); in LowerLHLOToGPU()
94 pm.addNestedPass<::mlir::FuncOp>(::mlir::createCSEPass()); in LowerLHLOToGPU()
[all …]
/external/llvm-project/mlir/include/mlir/Dialect/SPIRV/
DSPIRVOps.h55 struct DenseMapInfo<mlir::spirv::FuncOp> {
56 static mlir::spirv::FuncOp getEmptyKey() {
58 return mlir::spirv::FuncOp::getFromOpaquePointer(pointer);
60 static mlir::spirv::FuncOp getTombstoneKey() {
62 return mlir::spirv::FuncOp::getFromOpaquePointer(pointer);
64 static unsigned getHashValue(mlir::spirv::FuncOp val) {
67 static bool isEqual(mlir::spirv::FuncOp LHS, mlir::spirv::FuncOp RHS) {
74 struct PointerLikeTypeTraits<mlir::spirv::FuncOp> {
76 static inline void *getAsVoidPointer(mlir::spirv::FuncOp I) {
79 static inline mlir::spirv::FuncOp getFromVoidPointer(void *P) {
[all …]
/external/llvm-project/mlir/include/mlir/Dialect/Affine/
DPasses.h27 std::unique_ptr<OperationPass<FuncOp>> createSimplifyAffineStructuresPass();
31 std::unique_ptr<OperationPass<FuncOp>>
36 std::unique_ptr<OperationPass<FuncOp>> createAffineParallelizePass();
39 std::unique_ptr<OperationPass<FuncOp>> createAffineLoopNormalizePass();
44 std::unique_ptr<OperationPass<FuncOp>> createAffineDataCopyGenerationPass(
49 std::unique_ptr<OperationPass<FuncOp>> createAffineDataCopyGenerationPass();
52 std::unique_ptr<OperationPass<FuncOp>>
55 std::unique_ptr<OperationPass<FuncOp>> createLoopTilingPass();
63 std::unique_ptr<OperationPass<FuncOp>> createLoopUnrollPass(
71 std::unique_ptr<OperationPass<FuncOp>>
[all …]
/external/tensorflow/tensorflow/compiler/mlir/tools/kernel_gen/
Dkernel_creator.cc202 pm.addNestedPass<mlir::FuncOp>(mlir::mhlo::createLegalizeTFPass( in LowerTFtoLoops()
204 pm.addNestedPass<mlir::FuncOp>(mlir::createTransformUnrankedHloPass()); in LowerTFtoLoops()
205 pm.addNestedPass<mlir::FuncOp>(mlir::mhlo::createChloLegalizeToHloPass()); in LowerTFtoLoops()
206 pm.addNestedPass<mlir::FuncOp>(mlir::mhlo::createLowerComplexPass()); in LowerTFtoLoops()
207 pm.addNestedPass<mlir::FuncOp>(mlir::createCanonicalizerPass()); in LowerTFtoLoops()
208 pm.addNestedPass<mlir::FuncOp>(mlir::createCSEPass()); in LowerTFtoLoops()
209 pm.addNestedPass<mlir::FuncOp>(mlir::createCanonicalizerPass()); in LowerTFtoLoops()
212 pm.addNestedPass<mlir::FuncOp>(::mlir::mhlo::createLegalizeHloToLinalgPass()); in LowerTFtoLoops()
214 pm.addNestedPass<mlir::FuncOp>(mlir::createCSEPass()); in LowerTFtoLoops()
216 pm.addNestedPass<mlir::FuncOp>(mlir::createLinalgFusionOfTensorOpsPass()); in LowerTFtoLoops()
[all …]
/external/llvm-project/mlir/include/mlir/IR/
DBuiltinOps.h49 struct DenseMapInfo<mlir::FuncOp> {
50 static mlir::FuncOp getEmptyKey() {
52 return mlir::FuncOp::getFromOpaquePointer(pointer);
54 static mlir::FuncOp getTombstoneKey() {
56 return mlir::FuncOp::getFromOpaquePointer(pointer);
58 static unsigned getHashValue(mlir::FuncOp val) {
61 static bool isEqual(mlir::FuncOp lhs, mlir::FuncOp rhs) { return lhs == rhs; }
66 struct PointerLikeTypeTraits<mlir::FuncOp> {
67 static inline void *getAsVoidPointer(mlir::FuncOp val) {
70 static inline mlir::FuncOp getFromVoidPointer(void *p) {
[all …]
/external/llvm-project/mlir/include/mlir/Dialect/Linalg/
DPasses.h19 std::unique_ptr<OperationPass<FuncOp>> createConvertElementwiseToLinalgPass();
21 std::unique_ptr<OperationPass<FuncOp>> createLinalgFoldUnitExtentDimsPass();
26 std::unique_ptr<OperationPass<FuncOp>>
29 std::unique_ptr<OperationPass<FuncOp>>
32 std::unique_ptr<OperationPass<FuncOp>>
34 std::unique_ptr<OperationPass<FuncOp>> createLinalgPromotionPass();
38 std::unique_ptr<OperationPass<FuncOp>> createConvertLinalgToLoopsPass();
42 std::unique_ptr<OperationPass<FuncOp>> createConvertLinalgToParallelLoopsPass();
47 std::unique_ptr<OperationPass<FuncOp>> createConvertLinalgToAffineLoopsPass();
51 std::unique_ptr<OperationPass<FuncOp>> createLinalgBufferizePass();
[all …]
/external/tensorflow/tensorflow/compiler/mlir/lite/transforms/
Dpasses.h24 class FuncOp; variable
36 std::unique_ptr<OperationPass<FuncOp>> CreateLegalizeTFPass(
40 std::unique_ptr<OperationPass<FuncOp>> CreateOptimizePass();
43 std::unique_ptr<OperationPass<FuncOp>> CreatePrepareTFPass(
51 std::unique_ptr<OperationPass<FuncOp>> CreateQuantizePass(
55 std::unique_ptr<OperationPass<FuncOp>> CreatePrepareQuantizePass(
59 std::unique_ptr<OperationPass<FuncOp>> CreatePostQuantizePass(
72 std::unique_ptr<OperationPass<FuncOp>> CreateSplitMergedOperandsPass();
79 std::unique_ptr<OperationPass<FuncOp>> CreateDefaultQuantParamsPass(
84 std::unique_ptr<OperationPass<FuncOp>> CreateDenseToSparsePass();
[all …]
Dprepare_composite_functions_tf.cc73 explicit ConvertEmbeddedLookupFunc(FuncOp func) : func_(func) {} in ConvertEmbeddedLookupFunc()
103 FuncOp func_;
124 void ConvertTFImplements(FuncOp func, StringAttr attr);
125 void ConvertTFImplementsWithAttributes(FuncOp func, FuncAttr attr);
126 void ConvertTFAPIImplements(FuncOp func, StringAttr attr, ModuleOp module);
130 LogicalResult CheckFusableLayerNormalizedLstmCellSimple(FuncOp lstm_func) { in CheckFusableLayerNormalizedLstmCellSimple()
145 LogicalResult CheckFusableLstmCellSimple(FuncOp lstm_func) { in CheckFusableLstmCellSimple()
176 LogicalResult CheckFusableKerasLstm(FuncOp lstm_func, ModuleOp module) { in CheckFusableKerasLstm()
177 for (auto func : module.getOps<FuncOp>()) { in CheckFusableKerasLstm()
180 if (dyn_cast<FuncOp>(op.resolveCallable()) == lstm_func) { in CheckFusableKerasLstm()
[all …]
Dinitialize_variables.cc52 T op, FuncOp func) { in GetGlobalTensor()
74 void InitializeVariable(int var_id, ElementsAttr value, FuncOp session_init) { in InitializeVariable()
89 FuncOp func) { in GetGlobalTensorOp()
103 FuncOp session_init_func = nullptr; in InitializeVariables()
104 for (auto func : module.getOps<FuncOp>()) { in InitializeVariables()
120 for (auto func : module.getOps<FuncOp>()) { in InitializeVariables()
136 FuncOp CreateSessionInitFunc() { in CreateSessionInitFunc()
142 auto func = builder.create<FuncOp>(module->getLoc(), kSessionInitFuncName, in CreateSessionInitFunc()
146 func.setVisibility(mlir::FuncOp::Visibility::Public); in CreateSessionInitFunc()
Doptimize_functional_ops.cc45 void UpdateFuncType(FuncOp func) { in UpdateFuncType()
58 bool IsSideEffectFree(FuncOp func) { in IsSideEffectFree()
82 FuncOp parent_op = op->getParentOfType<FuncOp>(); in matchAndRewrite()
86 FuncOp then_func = op.then_function(); in matchAndRewrite()
87 FuncOp else_func = op.else_function(); in matchAndRewrite()
111 FuncOp func = cond_value ? then_func : else_func; in matchAndRewrite()
/external/tensorflow/tensorflow/compiler/mlir/hlo/include/mlir-hlo/Dialect/mhlo/transforms/
Dpasses.h25 class FuncOp; variable
39 std::unique_ptr<OperationPass<FuncOp>> createLegalizeControlFlowPass();
42 std::unique_ptr<OperationPass<FuncOp>> createControlFlowToScfPass();
45 std::unique_ptr<OperationPass<FuncOp>> createLegalizeToStdPass();
56 std::unique_ptr<OperationPass<FuncOp>> createLegalizeHloToLinalgPass();
60 std::unique_ptr<OperationPass<FuncOp>> createSinkConstantsToControlFlowPass();
63 std::unique_ptr<OperationPass<FuncOp>> createMhloFusionPass();
67 std::unique_ptr<OperationPass<FuncOp>>
80 std::unique_ptr<OperationPass<FuncOp>> createLhloLegalizeToAffinePass();
83 std::unique_ptr<OperationPass<FuncOp>> createLegalizeLhloToLinalgPass();
[all …]
Dmhlo_passes.td32 def LegalizeControlFlowPass : Pass<"mhlo-legalize-control-flow", "FuncOp"> {
37 def LegalizeControlFlowToScfPass : Pass<"mhlo-control-flow-to-scf", "FuncOp"> {
42 …galizeGatherToTorchIndexSelectPass : Pass<"mhlo-legalize-gather-to-torch-index-select", "FuncOp"> {
48 def LegalizeTanhToApproximationPass : Pass<"mhlo-legalize-trigonometric-to-approximation", "FuncOp"…
54 def HloLegalizeToLinalgPass : Pass<"hlo-legalize-to-linalg", "FuncOp"> {
60 def LegalizeToStandardPass : Pass<"mhlo-legalize-to-std", "FuncOp"> {
65 def LowerComplexPass : Pass<"mhlo-test-lower-complex", "FuncOp"> {
71 def LegalizeGeneralDotPass : Pass<"mhlo-test-lower-general-dot", "FuncOp"> {
77 def TestMaterializeBroadcastsPass : Pass<"mhlo-test-materialize-broadcasts", "FuncOp"> {
83 def MhloFusionPass : Pass<"mhlo-fusion", "FuncOp"> {
[all …]
/external/llvm-project/mlir/lib/IR/
DBuiltinDialect.cpp74 FuncOp FuncOp::create(Location location, StringRef name, FunctionType type, in create()
78 FuncOp::build(builder, state, name, type, attrs); in create()
79 return cast<FuncOp>(Operation::create(state)); in create()
81 FuncOp FuncOp::create(Location location, StringRef name, FunctionType type, in create()
86 FuncOp FuncOp::create(Location location, StringRef name, FunctionType type, in create()
89 FuncOp func = create(location, name, type, attrs); in create()
94 void FuncOp::build(OpBuilder &builder, OperationState &state, StringRef name, in build()
123 static void print(FuncOp op, OpAsmPrinter &p) { in print()
129 static LogicalResult verify(FuncOp op) { in verify()
151 void FuncOp::cloneInto(FuncOp dest, BlockAndValueMapping &mapper) { in cloneInto()
[all …]
/external/llvm-project/mlir/lib/Transforms/
DNormalizeMemRefs.cpp34 void normalizeFuncOpMemRefs(FuncOp funcOp, ModuleOp moduleOp);
35 bool areMemRefsNormalizable(FuncOp funcOp);
36 void updateFunctionSignature(FuncOp funcOp, ModuleOp moduleOp);
37 void setCalleesAndCallersNonNormalizable(FuncOp funcOp, ModuleOp moduleOp,
38 DenseSet<FuncOp> &normalizableFuncs);
39 Operation *createOpResultsNormalized(FuncOp funcOp, Operation *oldOp);
56 DenseSet<FuncOp> normalizableFuncs; in runOnOperation()
58 moduleOp.walk([&](FuncOp funcOp) { normalizableFuncs.insert(funcOp); }); in runOnOperation()
66 moduleOp.walk([&](FuncOp funcOp) { in runOnOperation()
84 for (FuncOp &funcOp : normalizableFuncs) in runOnOperation()
[all …]
/external/tensorflow/tensorflow/compiler/mlir/lite/utils/
Dnms_utils.h36 explicit ConvertNMSPaddedFunc(FuncOp func) : func_(func) {} in ConvertNMSPaddedFunc()
43 FuncOp func_;
50 explicit ConvertSSDPostProcessFunc(FuncOp func, mlir::TF::FuncAttr attr) in ConvertSSDPostProcessFunc()
58 LogicalResult CreateNMSCustomOptions(FuncOp func, DictionaryAttr attrs,
61 LogicalResult AddIntAttr(FuncOp func, DictionaryAttr attrs,
65 LogicalResult AddFloatAttr(FuncOp func, DictionaryAttr attrs,
69 FuncOp func_;
/external/llvm-project/mlir/test/lib/IR/
DTestFunc.cpp21 for (FuncOp func : module.getOps<FuncOp>()) { in runOnOperation()
45 for (FuncOp func : module.getOps<FuncOp>()) { in runOnOperation()
70 for (FuncOp func : module.getOps<FuncOp>()) { in runOnOperation()
74 func.setType(symbolTable.lookup<FuncOp>(sym.getValue()).getType()); in runOnOperation()
/external/llvm-project/mlir/unittests/Pass/
DPassManagerTest.cpp21 GenericAnalysis(Operation *op) : isFunc(isa<FuncOp>(op)) {} in GenericAnalysis()
27 OpSpecificAnalysis(FuncOp op) : isSecret(op.getName() == "secret") {} in OpSpecificAnalysis()
34 : public PassWrapper<AnnotateFunctionPass, OperationPass<FuncOp>> {
36 FuncOp op = getOperation(); in runOnOperation()
54 FuncOp func = in TEST()
55 FuncOp::create(builder.getUnknownLoc(), name, in TEST()
63 pm.addNestedPass<FuncOp>(std::make_unique<AnnotateFunctionPass>()); in TEST()
68 for (FuncOp func : module->getOps<FuncOp>()) { in TEST()
/external/tensorflow/tensorflow/compiler/xla/service/gpu/
Dir_emission_utils_test.cc41 mlir::FuncOp func = mlir::cast<mlir::FuncOp>(module->lookupSymbol("foo")); in TEST()
58 mlir::FuncOp func = mlir::cast<mlir::FuncOp>(module->lookupSymbol("foo")); in TEST()
75 mlir::FuncOp func = mlir::cast<mlir::FuncOp>(module->lookupSymbol("foo")); in TEST()
/external/llvm-project/mlir/include/mlir/Dialect/Async/
DPasses.h20 std::unique_ptr<OperationPass<FuncOp>> createAsyncParallelForPass();
22 std::unique_ptr<OperationPass<FuncOp>>
25 std::unique_ptr<OperationPass<FuncOp>> createAsyncRefCountingPass();
27 std::unique_ptr<OperationPass<FuncOp>> createAsyncRefCountingOptimizationPass();
/external/tensorflow/tensorflow/compiler/mlir/tosa/transforms/
Dpasses.h26 std::unique_ptr<OperationPass<FuncOp>> createLegalizeTFPass();
27 std::unique_ptr<OperationPass<FuncOp>> createFuseBiasTFPass();
28 std::unique_ptr<OperationPass<FuncOp>> createLegalizeTFLPass();
29 std::unique_ptr<OperationPass<FuncOp>> createConvertTFLUint8Pass();

12345678910>>...16