Home
last modified time | relevance | path

Searched refs:flib_def (Results 1 – 25 of 101) sorted by relevance

12345

/external/tensorflow/tensorflow/compiler/tf2xla/
Dresource_util_test.cc50 const GraphDef& graphdef, FunctionLibraryDefinition* flib_def, in AnalyzeAndVerify() argument
53 auto graph = absl::make_unique<Graph>(flib_def); in AnalyzeAndVerify()
59 flib_def, OptimizerOptions()); in AnalyzeAndVerify()
85 FunctionLibraryDefinition flib_def(OpRegistry::Global(), in TEST() local
87 GraphDefBuilder builder(GraphDefBuilder::kFailImmediately, &flib_def); in TEST()
116 AnalyzeAndVerify(graphdef, &flib_def, expected); in TEST()
120 FunctionLibraryDefinition flib_def(OpRegistry::Global(), in TEST() local
122 GraphDefBuilder builder(GraphDefBuilder::kFailImmediately, &flib_def); in TEST()
156 AnalyzeAndVerify(graphdef, &flib_def, expected); in TEST()
160 FunctionLibraryDefinition flib_def(OpRegistry::Global(), in TEST() local
[all …]
Dfunctionalize_control_flow.cc223 options.flib_def); in Run()
229 TF_GRAPH_DEF_VERSION, options.flib_def, in Run()
256 string new_func_name = options.flib_def->UniqueFunctionName( in Run()
260 func.name(), new_func_name, func.attr(), options.flib_def, flr, in Run()
274 options.flib_def); in Run()
277 PruneUnreachableFunctionsFromGraph(*graph, options.flib_def)); in Run()
282 options.flib_def); in Run()
289 return FunctionalizeControlFlow(options.graph->get(), options.flib_def); in Run()
/external/tensorflow/tensorflow/core/common_runtime/
Disolate_placer_inspection_required_ops_pass.cc41 const FunctionLibraryDefinition* flib_def = in Run() local
42 options.flib_def == nullptr ? &graph->flib_def() : options.flib_def; in Run()
43 Status status = IsolatePlacerInspectionRequiredOps(*flib_def, graph); in Run()
Dlower_function_call_op.cc46 const FunctionLibraryDefinition& flib_def, in RewriteFunctionCallNode() argument
81 fdef = flib_def.Find(func.name()); in RewriteFunctionCallNode()
86 fdef = flib_def.Find(n->type_string()); in RewriteFunctionCallNode()
95 FunctionDefToBodyHelper(*fdef, n->attrs(), &flib_def, &fbody)); in RewriteFunctionCallNode()
101 InlineFunctionBody(flib_def, g, n, fbody.get(), inline_options)); in RewriteFunctionCallNode()
Dlower_function_call_op_test.cc62 FunctionLibraryDefinition flib_def((*graph)->flib_def()); in Rewrite() local
67 opt_options.flib_def = &flib_def; in Rewrite()
97 TF_ASSERT_OK(NodeBuilder("F", "PartitionedCall", &root.graph()->flib_def()) in TEST()
162 TF_ASSERT_OK(NodeBuilder("B", "PartitionedCall", &root.graph()->flib_def()) in TEST()
171 TF_ASSERT_OK(NodeBuilder("C", "PartitionedCall", &root.graph()->flib_def()) in TEST()
Dlower_functional_ops.cc100 FunctionLibraryDefinition* flib_def = options.flib_def; in Run() local
101 if (flib_def == nullptr) { in Run()
152 if (IsFunctionCall(*flib_def, *n) && !used_by_xla(n) && in Run()
154 TF_RETURN_IF_ERROR(RewriteFunctionCallNode(n, g, *flib_def, in Run()
Dplacer_inspection_required_ops_utils.cc53 : PlacerInspectionRequiredOpChecker(graph, &graph->flib_def()) {} in PlacerInspectionRequiredOpChecker()
56 const Graph* graph, const FunctionLibraryDefinition* flib_def) in PlacerInspectionRequiredOpChecker() argument
57 : graph_(*graph), flib_def_(*flib_def) { in PlacerInspectionRequiredOpChecker()
85 Status GetFunctionDefAndAttrs(const FunctionLibraryDefinition& flib_def, in GetFunctionDefAndAttrs() argument
90 *fdef = flib_def.Find(function_name); in GetFunctionDefAndAttrs()
94 "\" in function library: ", flib_def.ToProto().DebugString()); in GetFunctionDefAndAttrs()
300 const FunctionLibraryDefinition& flib_def, Graph* graph) { in IsolatePlacerInspectionRequiredOps() argument
301 PlacerInspectionRequiredOpChecker checker(graph, &flib_def); in IsolatePlacerInspectionRequiredOps()
Dplacer_inspection_required_ops_utils.h55 const FunctionLibraryDefinition* flib_def);
77 Status GetFunctionDefAndAttrs(const FunctionLibraryDefinition& flib_def,
154 const FunctionLibraryDefinition& flib_def, Graph* graph);
Dgraph_execution_state.h58 : flib_def(std::move(flib)), in ClientGraph()
59 graph(flib_def.get()), in ClientGraph()
65 std::unique_ptr<FunctionLibraryDefinition> flib_def; member
163 std::unique_ptr<FunctionLibraryDefinition>&& flib_def,
Dlower_if_op_test.cc55 FunctionLibraryDefinition flib_def((*graph)->flib_def()); in Rewrite() local
60 opt_options.flib_def = &flib_def; in Rewrite()
82 NodeBuilder("if", "If", &root.graph()->flib_def()) in TEST()
201 NodeBuilder("if", "If", &root.graph()->flib_def()) in TEST()
289 NodeBuilder("if", "If", &root.graph()->flib_def()) in TEST()
Dlower_while_op_test.cc47 FunctionLibraryDefinition flib_def((*graph)->flib_def()); in Rewrite() local
52 opt_options.flib_def = &flib_def; in Rewrite()
75 NodeBuilder("while", "While", &root.graph()->flib_def()) in TEST()
194 NodeBuilder("while", "While", &root.graph()->flib_def()) in TEST()
308 NodeBuilder("while", "While", &root.graph()->flib_def()) in TEST()
Disolate_placer_inspection_required_ops_pass_test.cc43 FunctionLibraryDefinition* flib_def = nullptr) { in RunPass() argument
50 options.flib_def = flib_def; in RunPass()
153 FunctionLibraryDefinition flib_def(OpRegistry::Global(), {}); in TEST() local
154 TF_ASSERT_OK(flib_def.AddFunctionDef(func)); in TEST()
156 RunPass(original, &rewritten, &flib_def); in TEST()
Dlower_functional_ops_test.cc58 FunctionLibraryDefinition flib_def((*graph)->flib_def()); in Rewrite() local
63 opt_options.flib_def = &flib_def; in Rewrite()
163 TF_ASSERT_OK(NodeBuilder("while", "While", &root.graph()->flib_def()) in TEST()
268 TF_ASSERT_OK(NodeBuilder("if", "If", &root.graph()->flib_def()) in TEST()
Dgraph_execution_state.cc66 std::unique_ptr<FunctionLibraryDefinition>&& flib_def, in GraphExecutionState() argument
73 flib_def_(std::move(flib_def)), in GraphExecutionState()
88 auto flib_def = absl::make_unique<FunctionLibraryDefinition>( in MakeForBaseGraph() local
91 TF_RETURN_IF_ERROR(AddDefaultAttrsToGraphDef(&graph_def, *flib_def, 0)); in MakeForBaseGraph()
97 absl::make_unique<GraphDef>(std::move(graph_def)), std::move(flib_def), in MakeForBaseGraph()
112 new GraphExecutionState(nullptr, std::move(flib_def), options)); in MakeForBaseGraph()
152 auto flib_def = absl::make_unique<FunctionLibraryDefinition>( in MakeForPrunedGraph() local
154 TF_RETURN_IF_ERROR(AddDefaultAttrsToGraphDef(&temp, *flib_def, 0)); in MakeForPrunedGraph()
156 new GraphExecutionState(nullptr, std::move(flib_def), options)); in MakeForPrunedGraph()
258 auto flib_def = absl::make_unique<FunctionLibraryDefinition>( in Extend() local
[all …]
/external/tensorflow/tensorflow/compiler/jit/
Dmark_for_compilation_pass_test_helper.cc25 std::unique_ptr<Graph>* graph, FunctionLibraryDefinition* flib_def, in MarkForCompilation() argument
52 opt_options.flib_def = flib_def; in MarkForCompilation()
69 FunctionLibraryDefinition flib_def((*graph)->op_registry(), flib); in MarkForCompilation() local
70 return MarkForCompilation(graph, &flib_def, options); in MarkForCompilation()
Dencapsulate_xla_computations_pass_test.cc36 const FunctionLibraryDefinition& flib_def, const string& function) { in MakeOuterGraph() argument
38 TF_EXPECT_OK(scope.graph()->AddFunctionLibrary(flib_def.ToProto())); in MakeOuterGraph()
50 NodeDefBuilder("launch0", function, &flib_def) in MakeOuterGraph()
147 FunctionLibraryDefinition flib_def(OpRegistry::Global(), {}); in TEST() local
148 std::unique_ptr<Graph> graph(new Graph(&flib_def)); in TEST()
181 TF_CHECK_OK(EncapsulateXlaComputationsPass::Encapsulate(&graph, &flib_def)); in TEST()
206 FunctionLibraryDefinition flib_def(OpRegistry::Global(), {}); in TEST() local
207 std::unique_ptr<Graph> graph(new Graph(&flib_def)); in TEST()
254 std::unique_ptr<Graph> graph_copy(new Graph(&flib_def)); in TEST()
257 TF_ASSERT_OK(EncapsulateXlaComputationsPass::Encapsulate(&graph, &flib_def)); in TEST()
[all …]
Dresource_operation_safety_analysis_test.cc76 return ComputeIncompatibleResourceOperationPairs(*g, &g->flib_def(), {}, in ComputeIncompatiblePairs()
243 FunctionDefLibrary flib_def; in CreateFunctionDefLibWithConstFunction() local
249 *flib_def.add_function() = std::move(func); in CreateFunctionDefLibWithConstFunction()
250 return flib_def; in CreateFunctionDefLibWithConstFunction()
264 FunctionDefLibrary flib_def = in TEST() local
266 TF_ASSERT_OK(root.graph()->AddFunctionLibrary(flib_def)); in TEST()
286 FunctionDefLibrary flib_def = in TEST() local
288 TF_ASSERT_OK(root.graph()->AddFunctionLibrary(flib_def)); in TEST()
306 FunctionDefLibrary flib_def = in TEST() local
308 TF_ASSERT_OK(root.graph()->AddFunctionLibrary(flib_def)); in TEST()
[all …]
Dresource_operation_safety_analysis.cc101 const Node& n, const FunctionLibraryDefinition* flib_def, in XlaResourceOpKindForNode() argument
122 if (MayCallFunction(n, flib_def)) { in XlaResourceOpKindForNode()
250 const Graph& g, const FunctionLibraryDefinition* flib_def, in ComputeIncompatibleResourceOperationPairs() argument
269 *n, flib_def, resource_ops_to_ignore, &op_kind)); in ComputeIncompatibleResourceOperationPairs()
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/transforms/
Dtf_graph_optimization_pass.cc60 FunctionLibraryDefinition flib_def(OpRegistry::Global(), in runOnModule() local
63 auto graph = absl::make_unique<Graph>(flib_def); in runOnModule()
64 Status status = ConvertMlirToGraph(module_in, confs, &graph, &flib_def); in runOnModule()
78 options.flib_def = &flib_def; in runOnModule()
95 ConvertGraphToMlir(**options.graph, debug_info, flib_def, specs, &ctx); in runOnModule()
/external/tensorflow/tensorflow/core/kernels/data/
Diterator_ops.h38 std::unique_ptr<FunctionLibraryDefinition> flib_def, in IteratorResource() argument
43 iterator_state_(std::make_shared<State>(std::move(flib_def), in IteratorResource()
73 State(std::shared_ptr<FunctionLibraryDefinition> flib_def, in State()
77 : flib_def(std::move(flib_def)), in State()
91 std::shared_ptr<FunctionLibraryDefinition> flib_def; member
129 std::unique_ptr<FunctionLibraryDefinition>* flib_def,
153 std::unique_ptr<FunctionLibraryDefinition> flib_def,
Diterator_ops.cc136 iterator_state_->flib_def, iterator_state_->pflr, iterator_state_->flr, in Restore()
169 iterator_state_->flib_def, iterator_state_->pflr, iterator_state_->flr, in SetIteratorFromDataset()
397 std::unique_ptr<FunctionLibraryDefinition> flib_def(nullptr); in Compute() local
404 flr = CreatePrivateFLR(context, &device_mgr, &flib_def, &pflr); in Compute()
407 &flib_def, &pflr, &flr, true)); in Compute()
418 [context, flr, &device_mgr, &flib_def, &pflr, in Compute()
423 std::move(flib_def), std::move(pflr), flr); in Compute()
452 std::unique_ptr<FunctionLibraryDefinition>* flib_def, in CreatePrivateFLR() argument
463 *flib_def = absl::make_unique<FunctionLibraryDefinition>( in CreatePrivateFLR()
468 /*config=*/config, graph_def_version_, flib_def->get(), in CreatePrivateFLR()
[all …]
/external/tensorflow/tensorflow/tools/graph_transforms/
Dadd_default_attributes.cc28 std::unique_ptr<FunctionLibraryDefinition> flib_def( in AddDefaultAttributes() local
33 TF_RETURN_IF_ERROR(AddDefaultAttrsToGraphDef(output_graph_def, *flib_def, 0)); in AddDefaultAttributes()
/external/tensorflow/tensorflow/core/grappler/optimizers/
Dfunction_optimizer.cc922 Status ValidateNoDeadOutputs(const FunctionLibraryDefinition& flib_def, in ValidateNoDeadOutputs() argument
938 const FunctionDef* fdef = flib_def.Find(n->type_string()); in ValidateNoDeadOutputs()
945 &flib_def, &nested_fbody)); in ValidateNoDeadOutputs()
947 if (!ValidateNoDeadOutputs(flib_def, *nested_fbody).ok()) { in ValidateNoDeadOutputs()
988 const FunctionLibraryDefinition& flib_def, in MakeFunctionBodyForInlining() argument
993 const auto find_fdef = [&flib_def, &node]( in MakeFunctionBodyForInlining()
996 if ((*fdef = flib_def.Find(name)) == nullptr) { in MakeFunctionBodyForInlining()
1010 const string grad = flib_def.FindGradient(func.name()); in MakeFunctionBodyForInlining()
1020 *grad_fdef, AttrSlice(&func.attr()), &flib_def, fbody)); in MakeFunctionBodyForInlining()
1022 } else if (flib_def.Find(func.name()) == nullptr) { in MakeFunctionBodyForInlining()
[all …]
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/translate/
Dexport_graphdef.h44 std::unique_ptr<Graph>* graph, FunctionLibraryDefinition* flib_def,
52 std::unique_ptr<Graph>* graph, FunctionLibraryDefinition* flib_def);
Dexport_graphdef.cc187 FunctionLibraryDefinition* flib_def,
723 FunctionLibraryDefinition flib_def(&empty_registry, *flib); in ConvertLibFunction() local
725 if (flib_def.Find(function_name)) return Status::OK(); in ConvertLibFunction()
794 FunctionLibraryDefinition* flib_def, in Convert() argument
821 TF_RETURN_IF_ERROR(flib_def->AddFunctionDef(func_def)); in Convert()
824 TF_RETURN_IF_ERROR(flib_def->AddGradientDef(grad_def)); in Convert()
833 FunctionLibraryDefinition* flib_def, in ConvertMlirToGraph() argument
836 return Exporter::Convert(module, configs, graph, flib_def, control_ret_nodes); in ConvertMlirToGraph()
842 FunctionLibraryDefinition* flib_def) { in ConvertMlirToGraph() argument
844 return ConvertMlirToGraph(module, configs, graph, flib_def, in ConvertMlirToGraph()
[all …]

12345