Home
last modified time | relevance | path

Searched refs:fbody (Results 1 – 25 of 46) sorted by relevance

12

/external/tensorflow/tensorflow/core/common_runtime/
Dinline_function_utils.cc274 Status ValidateNoInline(const FunctionBody* fbody) { in ValidateNoInline() argument
275 const auto attr = AttrSlice(&fbody->fdef.attr()); in ValidateNoInline()
335 Status ValidateInlining(const Node* node, const FunctionBody* fbody, in ValidateInlining() argument
345 if (num_node_inputs != fbody->arg_types.size() || in ValidateInlining()
346 num_node_inputs != fbody->arg_nodes.size()) { in ValidateInlining()
349 " arg_types=", fbody->arg_types.size(), in ValidateInlining()
350 " arg_nodes=", fbody->arg_nodes.size()); in ValidateInlining()
353 if (num_node_outputs != fbody->ret_types.size() || in ValidateInlining()
354 num_node_outputs != fbody->ret_nodes.size()) { in ValidateInlining()
357 num_node_outputs, " ret_types=", fbody->ret_types.size(), in ValidateInlining()
[all …]
Dinspecting_placer.cc131 std::unique_ptr<FunctionBody> fbody; in ComputeIOColocationGroups() local
134 &flib_def_, &fbody)); in ComputeIOColocationGroups()
137 IsolatePlacerInspectionRequiredOps(flib_def_, fbody->graph)); in ComputeIOColocationGroups()
149 fbody->graph, stack_.Push(&node, func.name()), &flib_def_, &device_set_, in ComputeIOColocationGroups()
154 converter.AssignGroups(fbody->arg_nodes, &groups->input_groups); in ComputeIOColocationGroups()
155 converter.AssignGroups(fbody->ret_nodes, &groups->output_groups); in ComputeIOColocationGroups()
Dlower_function_call_op.cc83 std::unique_ptr<FunctionBody> fbody; in RewriteFunctionCallNode() local
85 FunctionDefToBodyHelper(*fdef, n->attrs(), &flib_def, &fbody)); in RewriteFunctionCallNode()
88 ValidateInlining(n, fbody.get(), inline_options); in RewriteFunctionCallNode()
91 InlineFunctionBody(flib_def, g, n, fbody.get(), inline_options)); in RewriteFunctionCallNode()
Dfunction.cc441 std::unique_ptr<FunctionBody>* fbody);
598 const FunctionBody* fbody = GetFunctionBody(h); in GetRetTypes() local
599 *ret_types = fbody->ret_types; in GetRetTypes()
646 const FunctionBody* fbody = GetFunctionBody(handle); in CreateKernel() local
647 CHECK_NOTNULL(fbody); in CreateKernel()
654 for (const auto& t : fbody->arg_types) { in CreateKernel()
658 for (const auto& t : fbody->ret_types) { in CreateKernel()
665 &fbody->fdef.signature(), props->node_def, fbody->arg_types, in CreateKernel()
666 fbody->ret_types); in CreateKernel()
680 std::unique_ptr<FunctionBody>* fbody) { in FunctionDefToBody() argument
[all …]
Dfunction_def_utils.cc33 std::unique_ptr<FunctionBody>* fbody) { in FunctionDefToBodyHelper() argument
71 *fbody = std::make_unique<FunctionBody>(fdef, result.arg_types, in FunctionDefToBodyHelper()
78 std::unique_ptr<FunctionBody>* fbody) { in FunctionDefToBodyHelper() argument
82 return FunctionDefToBodyHelper(fdef, attrs, lib_def, get_func_sig, fbody); in FunctionDefToBodyHelper()
Dinline_function_utils_test.cc80 std::unique_ptr<FunctionBody> fbody; in TEST() local
81 TF_ASSERT_OK(FunctionDefToBodyHelper(fdef, {}, &flib_def, &fbody)); in TEST()
84 TF_ASSERT_OK(InlineFunctionBody(flib_def, g.get(), caller, fbody.get(), in TEST()
Dfunction_def_utils.h36 std::unique_ptr<FunctionBody>* fbody);
45 std::unique_ptr<FunctionBody>* fbody);
Dinline_function_utils.h163 Status ValidateInlining(const Node* node, const FunctionBody* fbody,
175 Node* caller, const FunctionBody* fbody,
/external/tensorflow/tensorflow/compiler/tf2xla/
Dconst_analysis.cc38 const FunctionBody** fbody) { in GetFunctionBody() argument
44 *fbody = flib_runtime->GetFunctionBody(func_handle); in GetFunctionBody()
72 for (auto fbody : branch_bodies) { in CondConstInputIndices() local
73 TF_RET_CHECK(fbody != nullptr); in CondConstInputIndices()
75 *(fbody->graph), &compile_time_const_arg_indices, in CondConstInputIndices()
97 const FunctionBody* fbody = nullptr; in GetCompileTimeConstInputs() local
99 TF_RETURN_IF_ERROR(GetFunctionBody(flib_runtime, node, "body", &fbody)); in GetCompileTimeConstInputs()
101 TF_RET_CHECK(fbody); in GetCompileTimeConstInputs()
102 int num_inputs = fbody->fdef.signature().input_arg_size(); in GetCompileTimeConstInputs()
111 *(fbody->graph), &compile_time_const_arg_indices, in GetCompileTimeConstInputs()
[all …]
Drearrange_function_argument.cc310 const FunctionBody* fbody; in MaybeRewriteWhileNode() local
311 TF_RETURN_IF_ERROR(get_function_body_fn(attr_value, &fbody)); in MaybeRewriteWhileNode()
320 for (int i = 0, end = fbody->ret_nodes.size(); i < end; i++) { in MaybeRewriteWhileNode()
321 Node* n = fbody->ret_nodes[i]; in MaybeRewriteWhileNode()
350 RearrangeArgNodes(&fbody->arg_nodes, index_mapping); in MaybeRewriteWhileNode()
352 for (int i = 0, end = fbody->ret_nodes.size(); i < end; i++) { in MaybeRewriteWhileNode()
353 Node* n = fbody->ret_nodes[i]; in MaybeRewriteWhileNode()
359 fbody->graph->RemoveNode(n); in MaybeRewriteWhileNode()
368 TF_RETURN_IF_ERROR(GraphToFunctionDef(*fbody->graph, new_name, &new_fdef)); in MaybeRewriteWhileNode()
436 const FunctionBody* fbody; in MaybeRewriteIfNode() local
[all …]
Dxla_compiler.cc547 const FunctionBody** fbody) { in GetFunctionBody() argument
552 *fbody = flib_runtime->GetFunctionBody(handle); in GetFunctionBody()
553 TF_RET_CHECK(*fbody); in GetFunctionBody()
558 const FunctionBody** fbody, in FindFunctionBody() argument
563 auto status = GetFunctionBody(function, local_flib_runtime_, fbody); in FindFunctionBody()
569 GetFunctionBody(function, flib_runtime_, fbody), in FindFunctionBody()
584 std::unique_ptr<Graph> XlaCompiler::GetGraph(const FunctionBody* fbody) { in GetGraph() argument
586 CopyGraph(*fbody->graph, graph.get()); in GetGraph()
589 TryGetNodeAttr(AttrSlice(&fbody->fdef.attr()), kXlaMustCompileAttr, in GetGraph()
745 const FunctionBody* fbody; in CompileFunction() local
[all …]
Dresource_util.cc132 const FunctionBody& fbody, in UpdateResourceUsageFromFunctionBodyAnalysis() argument
143 fbody.graph->BuildNodeNameIndex(); in UpdateResourceUsageFromFunctionBodyAnalysis()
210 const FunctionBody* fbody = lib_runtime->GetFunctionBody(handle); in PropagateThroughCallOp() local
217 fbody->graph, n.type_string(), call_depth + 1, resource_arg_indices, in PropagateThroughCallOp()
221 n, function_name, *fbody, called_function_source_to_path, user_to_source, in PropagateThroughCallOp()
Dtf2xla_util.cc242 std::unique_ptr<FunctionBody> fbody; in PropagateConstIntoFuncAttr() local
244 *fdef, AttrSlice(&func_attr.attr()), lookup_fld, &fbody)); in PropagateConstIntoFuncAttr()
247 Graph* func_graph = fbody->graph; in PropagateConstIntoFuncAttr()
325 std::unique_ptr<FunctionBody> fbody; in FindOrInsert() local
327 lookup_fld, &fbody); in FindOrInsert()
330 *body_func, AttrSlice(&body_attr.attr()), fallback_fld, &fbody)); in FindOrInsert()
332 value = std::move(fbody); in FindOrInsert()
358 FunctionBody * fbody, in TraverseUnmodifiedPathBackward()
361 IsLoopInvariant(fbody, e->src_output(), lookup_fld, in TraverseUnmodifiedPathBackward()
419 std::unique_ptr<FunctionBody> fbody; in PropagateConstIntoAndAroundWhileNode() local
[all …]
/external/tensorflow/tensorflow/compiler/jit/
Dxla_kernel_creator.cc57 const FunctionBody* fbody = nullptr; in CreateXlaKernel() local
61 flr, function, &fbody, &constant_arg_indices, &resource_arg_indices)); in CreateXlaKernel()
64 GetInputMemoryTypes(fbody, constant_arg_indices, resource_arg_indices); in CreateXlaKernel()
65 MemoryTypeVector output_memory_types = GetOutputMemoryTypes(fbody); in CreateXlaKernel()
71 &fbody->fdef.signature(), node_def, fbody->arg_types, fbody->ret_types); in CreateXlaKernel()
Dcompilability_check_util.cc344 const FunctionBody* fbody = lib_runtime->GetFunctionBody(handle); in IsCompilableCall() local
346 for (const Node* node : fbody->graph->op_nodes()) { in IsCompilableCall()
633 const FunctionBody** fbody, in GetBodyAndConstantsAndResources() argument
639 *fbody = flr->GetFunctionBody(handle); in GetBodyAndConstantsAndResources()
640 CHECK(*fbody); // Can't be nullptr since we just instantiated it. in GetBodyAndConstantsAndResources()
641 const DataTypeVector& arg_types = (*fbody)->arg_types; in GetBodyAndConstantsAndResources()
645 BackwardsConstAnalysis(*((*fbody)->graph), &const_args, in GetBodyAndConstantsAndResources()
667 const tensorflow::FunctionBody* fbody, in GetInputMemoryTypes() argument
671 tensorflow::MemoryTypeVector input_memory_types(fbody->arg_types.size(), in GetInputMemoryTypes()
682 for (size_t i = 0; i < fbody->arg_types.size(); ++i) { in GetInputMemoryTypes()
[all …]
Dforce_xla_constants_on_host_pass.cc37 const FunctionBody* fbody = nullptr; in Run() local
46 flr, function, &fbody, &constant_arg_indices, &resource_arg_indices)); in Run()
Dget_compiler_ir.cc93 const FunctionBody* fbody = nullptr; in GetCompilerIr() local
97 flr, function, &fbody, &constant_arg_indices, &resource_arg_indices)); in GetCompilerIr()
100 GetInputMemoryTypes(fbody, constant_arg_indices, resource_arg_indices); in GetCompilerIr()
101 MemoryTypeVector output_memory_types = GetOutputMemoryTypes(fbody); in GetCompilerIr()
Dcompilability_check_util.h290 const FunctionBody** fbody,
322 const tensorflow::FunctionBody* fbody,
331 const tensorflow::FunctionBody* fbody);
Dextract_outside_compilation_pass.cc838 std::unique_ptr<FunctionBody> fbody; in PostprocessLiftedArgsForCall() local
839 TF_RETURN_IF_ERROR(FunctionDefToBodyHelper(*fdef, n->attrs(), fld, &fbody)); in PostprocessLiftedArgsForCall()
841 int original_arg_count = fbody->arg_nodes.size(); in PostprocessLiftedArgsForCall()
845 *fbody, outside_compilation_attr_to_node)); in PostprocessLiftedArgsForCall()
876 AddOutsideCompilationInputArgToFunctionBody(*fbody, i, data_types[i])); in PostprocessLiftedArgsForCall()
878 ReplaceLiftedArgNodePlaceholderWithArg(*fbody, original_arg_count, i, in PostprocessLiftedArgsForCall()
883 TF_RETURN_IF_ERROR(GraphToFunctionDef(*fbody->graph, n->type_string(), in PostprocessLiftedArgsForCall()
1138 std::unique_ptr<FunctionBody> fbody; in ExpandHostGraphIntoMainGraph() local
1142 AttrSlice(&attrs), fld, &fbody)); in ExpandHostGraphIntoMainGraph()
1143 Graph* host_graph = fbody->graph; in ExpandHostGraphIntoMainGraph()
[all …]
Drearrange_function_argument_pass_test.cc114 [&](const NameAttrList &function, const FunctionBody **fbody) { in TEST() argument
119 *fbody = new_fbody.get(); in TEST()
225 [&](const NameAttrList &function, const FunctionBody **fbody) { in TEST() argument
230 *fbody = new_fbody.get(); in TEST()
/external/tensorflow/tensorflow/core/tfrt/eager/
Dfunction_cache.cc71 std::unique_ptr<tensorflow::FunctionBody> fbody; in GetOrAddFunction() local
73 *fdef, tensorflow::AttrSlice(), func_lib_def, &fbody)); in GetOrAddFunction()
76 auto graph = std::unique_ptr<tensorflow::Graph>(fbody->graph); in GetOrAddFunction()
77 fbody->graph = nullptr; in GetOrAddFunction()
86 compile_options.enable_grappler, &fbody, std::move(graph), input_devices, in GetOrAddFunction()
99 op_name, fbody.get(), reachable_lib_def, device_names, compile_options, in GetOrAddFunction()
124 for (const auto& arg_type : fbody->arg_types) { in GetOrAddFunction()
128 for (const auto& ret_type : fbody->ret_types) { in GetOrAddFunction()
/external/tensorflow/tensorflow/core/grappler/optimizers/
Dfunction_optimizer.cc882 const FunctionBody& fbody, OutputControlSource output_control_source, in ValidateSideEffectsExecution() argument
889 fbody.graph->nodes(), std::back_inserter(fbody_side_effects), in ValidateSideEffectsExecution()
913 control_sources = {fbody.ret_nodes.begin(), fbody.ret_nodes.end()}; in ValidateSideEffectsExecution()
915 control_sources = {fbody.control_ret_nodes.begin(), in ValidateSideEffectsExecution()
916 fbody.control_ret_nodes.end()}; in ValidateSideEffectsExecution()
933 DFSFrom(*fbody.graph, {side_effect}, /*enter=*/is_control_source, in ValidateSideEffectsExecution()
949 const FunctionBody& fbody) { in ValidateNoDeadOutputs() argument
950 absl::flat_hash_set<const Node*> output_nodes = {fbody.ret_nodes.begin(), in ValidateNoDeadOutputs()
951 fbody.ret_nodes.end()}; in ValidateNoDeadOutputs()
955 for (const Node* n : fbody.graph->nodes()) { in ValidateNoDeadOutputs()
[all …]
/external/tensorflow/tensorflow/core/grappler/utils/
Dfunctions.cc242 std::unique_ptr<FunctionBody> fbody; in MakeGrapplerFunctionItem() local
244 FunctionDefToBodyHelper(func, func_instantiation_attr, &flib, &fbody)); in MakeGrapplerFunctionItem()
247 fbody->graph->ToGraphDef(&function_body); in MakeGrapplerFunctionItem()
259 const int num_instantiated_inputs = fbody->arg_types.size(); in MakeGrapplerFunctionItem()
260 const int num_instantiated_outputs = fbody->ret_types.size(); in MakeGrapplerFunctionItem()
266 const Node* node = fbody->arg_nodes[in_id]; in MakeGrapplerFunctionItem()
267 const DataType& dtype = fbody->arg_types[in_id]; in MakeGrapplerFunctionItem()
275 const Node* node = fbody->ret_nodes[out_id]; in MakeGrapplerFunctionItem()
276 const DataType& dtype = fbody->ret_types[out_id]; in MakeGrapplerFunctionItem()
/external/tensorflow/tensorflow/core/tfrt/utils/
Dtfrt_graph_execution_state.cc778 std::unique_ptr<FunctionBody> fbody; in OptimizeFunctions() local
780 FunctionDefToBodyHelper(fdef, AttrSlice(), &flib, &fbody)); in OptimizeFunctions()
782 tensorflow::Graph* graph = fbody->graph; in OptimizeFunctions()
800 args.reserve(fbody->arg_nodes.size()); in OptimizeFunctions()
801 for (const auto& arg : fbody->arg_nodes) args.push_back(arg->name()); in OptimizeFunctions()
803 rets.reserve(fbody->ret_nodes.size()); in OptimizeFunctions()
804 for (const auto& ret : fbody->ret_nodes) rets.push_back(ret->name()); in OptimizeFunctions()
806 control_rets.reserve(fbody->control_ret_nodes.size()); in OptimizeFunctions()
807 for (const auto& control_ret : fbody->control_ret_nodes) { in OptimizeFunctions()
/external/tensorflow/tensorflow/core/tpu/graph_rewrite/
Dencapsulate_tpu_computations_pass.cc1643 std::unique_ptr<FunctionBody> fbody; in InstantiateAssociatedFunction() local
1652 *fdef, AttrSlice(&func_attr_list.attr()), fld, &fbody)); in InstantiateAssociatedFunction()
1653 return fbody; in InstantiateAssociatedFunction()
1804 Node* call_node, const FunctionBody& fbody) { in FindArgsToLiftForCallNode() argument
1817 for (int i = 0; i < fbody.arg_nodes.size(); i++) { in FindArgsToLiftForCallNode()
1818 const Node* arg_node = fbody.arg_nodes[i]; in FindArgsToLiftForCallNode()
1839 const FunctionBody& fbody, FunctionLibraryRuntime* flr, in LiftOutsideCompilationOnlyArgsAndReplaceFunctionDef() argument
1844 fbody.graph, flr, fld, lifted_arg_count, rewritten)); in LiftOutsideCompilationOnlyArgsAndReplaceFunctionDef()
1849 *(fbody.graph), fbody.fdef.signature().name(), &rewritten_fdef)); in LiftOutsideCompilationOnlyArgsAndReplaceFunctionDef()
1855 fld->ReplaceFunction(fbody.fdef.signature().name(), rewritten_fdef)); in LiftOutsideCompilationOnlyArgsAndReplaceFunctionDef()
[all …]

12