Home
last modified time | relevance | path

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

12

/external/tensorflow/tensorflow/core/common_runtime/
Dinline_function_utils.cc285 Status ValidateNoInline(const FunctionBody* fbody) { in ValidateNoInline() argument
286 const auto attr = AttrSlice(&fbody->fdef.attr()); in ValidateNoInline()
346 Status ValidateInlining(const Node* node, const FunctionBody* fbody, in ValidateInlining() argument
356 if (num_node_inputs != fbody->arg_types.size() || in ValidateInlining()
357 num_node_inputs != fbody->arg_nodes.size()) { in ValidateInlining()
360 " arg_types=", fbody->arg_types.size(), in ValidateInlining()
361 " arg_nodes=", fbody->arg_nodes.size()); in ValidateInlining()
364 if (num_node_outputs != fbody->ret_types.size() || in ValidateInlining()
365 num_node_outputs != fbody->ret_nodes.size()) { in ValidateInlining()
368 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.cc93 std::unique_ptr<FunctionBody> fbody; in RewriteFunctionCallNode() local
95 FunctionDefToBodyHelper(*fdef, n->attrs(), &flib_def, &fbody)); in RewriteFunctionCallNode()
98 ValidateInlining(n, fbody.get(), inline_options); in RewriteFunctionCallNode()
101 InlineFunctionBody(flib_def, g, n, fbody.get(), inline_options)); in RewriteFunctionCallNode()
Dfunction_def_utils.cc33 std::unique_ptr<FunctionBody>* fbody) { in FunctionDefToBodyHelper() argument
71 *fbody = absl::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()
Dfunction.cc435 std::unique_ptr<FunctionBody>* fbody);
593 const FunctionBody* fbody = GetFunctionBody(h); in GetRetTypes() local
594 *ret_types = fbody->ret_types; in GetRetTypes()
641 const FunctionBody* fbody = GetFunctionBody(handle); in CreateKernel() local
642 CHECK_NOTNULL(fbody); in CreateKernel()
649 for (const auto& t : fbody->arg_types) { in CreateKernel()
653 for (const auto& t : fbody->ret_types) { in CreateKernel()
660 &fbody->fdef.signature(), props->node_def, fbody->arg_types, in CreateKernel()
661 fbody->ret_types); in CreateKernel()
675 std::unique_ptr<FunctionBody>* fbody) { in FunctionDefToBody() argument
[all …]
Dfunction_def_utils.h36 std::unique_ptr<FunctionBody>* fbody);
45 std::unique_ptr<FunctionBody>* fbody);
Dinline_function_utils.h159 Status ValidateInlining(const Node* node, const FunctionBody* fbody,
171 Node* caller, const FunctionBody* fbody,
Dprocess_function_library_runtime.cc638 std::unique_ptr<FunctionBody> fbody; in GetGraphAndArgRets() local
640 TF_RETURN_IF_ERROR(FunctionDefToBodyHelper(*fdef, attrs, lib_def, &fbody)); in GetGraphAndArgRets()
641 if (!fbody) { in GetGraphAndArgRets()
646 *graph = std::unique_ptr<Graph>(fbody->graph); in GetGraphAndArgRets()
647 arg_nodes->reserve(fbody->arg_nodes.size()); in GetGraphAndArgRets()
648 std::copy(fbody->arg_nodes.begin(), fbody->arg_nodes.end(), in GetGraphAndArgRets()
650 ret_nodes->reserve(fbody->ret_nodes.size()); in GetGraphAndArgRets()
651 std::copy(fbody->ret_nodes.begin(), fbody->ret_nodes.end(), in GetGraphAndArgRets()
653 fbody->graph = nullptr; in GetGraphAndArgRets()
654 ret_node_names->reserve(fbody->ret_nodes.size()); in GetGraphAndArgRets()
[all …]
/external/tensorflow/tensorflow/compiler/tf2xla/
Dconst_analysis.cc37 const FunctionBody** fbody) { in GetFunctionBody() argument
43 *fbody = flib_runtime->GetFunctionBody(func_handle); in GetFunctionBody()
71 for (auto fbody : branch_bodies) { in CondConstInputIndices() local
72 TF_RET_CHECK(fbody != nullptr); in CondConstInputIndices()
74 *(fbody->graph), &compile_time_const_arg_indices, in CondConstInputIndices()
96 const FunctionBody* fbody = nullptr; in GetCompileTimeConstInputs() local
98 TF_RETURN_IF_ERROR(GetFunctionBody(flib_runtime, node, "body", &fbody)); in GetCompileTimeConstInputs()
100 TF_RET_CHECK(fbody); in GetCompileTimeConstInputs()
101 int num_inputs = fbody->fdef.signature().input_arg_size(); in GetCompileTimeConstInputs()
110 *(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 …]
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()
Dxla_compiler.cc542 const FunctionBody** fbody) { in GetFunctionBody() argument
547 *fbody = flib_runtime->GetFunctionBody(handle); in GetFunctionBody()
548 TF_RET_CHECK(*fbody); in GetFunctionBody()
553 const FunctionBody** fbody, in FindFunctionBody() argument
558 auto status = GetFunctionBody(function, local_flib_runtime_, fbody); in FindFunctionBody()
564 GetFunctionBody(function, flib_runtime_, fbody), in FindFunctionBody()
579 std::unique_ptr<Graph> XlaCompiler::GetGraph(const FunctionBody* fbody) { in GetGraph() argument
581 CopyGraph(*fbody->graph, graph.get()); in GetGraph()
584 TryGetNodeAttr(AttrSlice(&fbody->fdef.attr()), kXlaMustCompileAttr, in GetGraph()
736 const FunctionBody* fbody; in CompileFunction() local
[all …]
Dxla_compiler.h294 const FunctionBody** fbody,
299 std::unique_ptr<Graph> GetGraph(const FunctionBody* fbody);
Dgraph_compiler.cc251 const FunctionBody* fbody; in CompileFunctionalNode() local
252 TF_RETURN_IF_ERROR(compiler->FindFunctionBody(func, &fbody)); in CompileFunctionalNode()
254 auto graph = compiler->GetGraph(fbody); in CompileFunctionalNode()
/external/tensorflow/tensorflow/compiler/jit/
Dxla_kernel_creator.cc95 const FunctionBody* fbody = nullptr; in CreateXlaKernel() local
99 flr, function, &fbody, &constant_arg_indices, &resource_arg_indices)); in CreateXlaKernel()
114 *fbody->graph, config_proto, /*uses_uninitialized_resource_args=*/true); in CreateXlaKernel()
152 GetInputMemoryTypes(fbody, constant_arg_indices, resource_arg_indices); in CreateXlaKernel()
153 MemoryTypeVector output_memory_types = GetOutputMemoryTypes(fbody); in CreateXlaKernel()
159 &fbody->fdef.signature(), node_def, fbody->arg_types, fbody->ret_types); in CreateXlaKernel()
Dcompilability_check_util.cc361 const FunctionBody* fbody = lib_runtime->GetFunctionBody(handle); in IsCompilableCall() local
363 for (const Node* node : fbody->graph->op_nodes()) { in IsCompilableCall()
623 const FunctionBody** fbody, in GetBodyAndConstantsAndResources() argument
629 *fbody = flr->GetFunctionBody(handle); in GetBodyAndConstantsAndResources()
630 CHECK(*fbody); // Can't be nullptr since we just instantiated it. in GetBodyAndConstantsAndResources()
631 const DataTypeVector& arg_types = (*fbody)->arg_types; in GetBodyAndConstantsAndResources()
635 BackwardsConstAnalysis(*((*fbody)->graph), &const_args, in GetBodyAndConstantsAndResources()
657 const tensorflow::FunctionBody* fbody, in GetInputMemoryTypes() argument
661 tensorflow::MemoryTypeVector input_memory_types(fbody->arg_types.size(), in GetInputMemoryTypes()
672 for (size_t i = 0; i < fbody->arg_types.size(); ++i) { in GetInputMemoryTypes()
[all …]
Dget_compiler_ir.cc59 const FunctionBody* fbody = nullptr; in GetCompilerIr() local
63 flr, function, &fbody, &constant_arg_indices, &resource_arg_indices)); in GetCompilerIr()
66 GetInputMemoryTypes(fbody, constant_arg_indices, resource_arg_indices); in GetCompilerIr()
67 MemoryTypeVector output_memory_types = GetOutputMemoryTypes(fbody); in GetCompilerIr()
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()
Dcompilability_check_util.h294 const FunctionBody** fbody,
326 const tensorflow::FunctionBody* fbody,
335 const tensorflow::FunctionBody* fbody);
Dextract_outside_compilation_pass.cc834 std::unique_ptr<FunctionBody> fbody; in PostprocessLiftedArgsForCall() local
835 TF_RETURN_IF_ERROR(FunctionDefToBodyHelper(*fdef, n->attrs(), fld, &fbody)); in PostprocessLiftedArgsForCall()
837 int original_arg_count = fbody->arg_nodes.size(); in PostprocessLiftedArgsForCall()
841 *fbody, outside_compilation_attr_to_node)); in PostprocessLiftedArgsForCall()
870 AddOutsideCompilationInputArgToFunctionBody(*fbody, i, data_types[i])); in PostprocessLiftedArgsForCall()
872 ReplaceLiftedArgNodePlaceholderWithArg(*fbody, original_arg_count, i, in PostprocessLiftedArgsForCall()
877 TF_RETURN_IF_ERROR(GraphToFunctionDef(*fbody->graph, n->type_string(), in PostprocessLiftedArgsForCall()
1132 std::unique_ptr<FunctionBody> fbody; in ExpandHostGraphIntoMainGraph() local
1136 AttrSlice(&attrs), fld, &fbody)); in ExpandHostGraphIntoMainGraph()
1137 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/grappler/optimizers/
Dfunction_optimizer.cc872 const FunctionBody& fbody, OutputControlSource output_control_source, in ValidateSideEffectsExecution() argument
879 fbody.graph->nodes(), std::back_inserter(fbody_side_effects), in ValidateSideEffectsExecution()
903 control_sources = {fbody.ret_nodes.begin(), fbody.ret_nodes.end()}; in ValidateSideEffectsExecution()
905 control_sources = {fbody.control_ret_nodes.begin(), in ValidateSideEffectsExecution()
906 fbody.control_ret_nodes.end()}; in ValidateSideEffectsExecution()
923 DFSFrom(*fbody.graph, {side_effect}, /*enter=*/is_control_source, in ValidateSideEffectsExecution()
939 const FunctionBody& fbody) { in ValidateNoDeadOutputs() argument
940 absl::flat_hash_set<const Node*> output_nodes = {fbody.ret_nodes.begin(), in ValidateNoDeadOutputs()
941 fbody.ret_nodes.end()}; in ValidateNoDeadOutputs()
945 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/tpu/graph_rewrite/
Dencapsulate_tpu_computations_pass.cc1685 std::unique_ptr<FunctionBody> fbody; in InstantiateAssociatedFunction() local
1694 *fdef, AttrSlice(&func_attr_list.attr()), fld, &fbody)); in InstantiateAssociatedFunction()
1695 return fbody; in InstantiateAssociatedFunction()
1846 Node* call_node, const FunctionBody& fbody) { in FindArgsToLiftForCallNode() argument
1859 for (int i = 0; i < fbody.arg_nodes.size(); i++) { in FindArgsToLiftForCallNode()
1860 const Node* arg_node = fbody.arg_nodes[i]; in FindArgsToLiftForCallNode()
1881 const FunctionBody& fbody, FunctionLibraryRuntime* flr, in LiftOutsideCompilationOnlyArgsAndReplaceFunctionDef() argument
1886 fbody.graph, flr, fld, lifted_arg_count, rewritten)); in LiftOutsideCompilationOnlyArgsAndReplaceFunctionDef()
1891 *(fbody.graph), fbody.fdef.signature().name(), &rewritten_fdef)); in LiftOutsideCompilationOnlyArgsAndReplaceFunctionDef()
1897 fld->ReplaceFunction(fbody.fdef.signature().name(), rewritten_fdef)); in LiftOutsideCompilationOnlyArgsAndReplaceFunctionDef()
[all …]
/external/tensorflow/tensorflow/compiler/mlir/python/
Dmlir.cc117 std::unique_ptr<tensorflow::FunctionBody> fbody; in ImportFunction() local
119 &fbody); in ImportFunction()
126 auto module = ConvertFunctionToMlir(fbody.get(), flib_def, &context); in ImportFunction()

12