MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / GetFunctionBodies

Function GetFunctionBodies

tensorflow/compiler/tf2xla/const_analysis.cc:47–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47Status GetFunctionBodies(FunctionLibraryRuntime* flib_runtime,
48 const NodeDef& node, StringPiece func_list_attr_name,
49 std::vector<const FunctionBody*>* fbodies) {
50 std::vector<NameAttrList> name_attr_lists;
51 TF_RETURN_IF_ERROR(GetNodeAttr(node, func_list_attr_name, &name_attr_lists));
52 for (const NameAttrList& name_attr_list : name_attr_lists) {
53 FunctionLibraryRuntime::Handle func_handle;
54 TF_RETURN_IF_ERROR(flib_runtime->Instantiate(
55 name_attr_list.name(), AttrSlice(&name_attr_list.attr()),
56 &func_handle));
57 fbodies->push_back(flib_runtime->GetFunctionBody(func_handle));
58 }
59 return Status::OK();
60}
61
62Status CondConstInputIndices(
63 absl::Span<const FunctionBody* const> branch_bodies,

Callers 1

Calls 7

AttrSliceClass · 0.85
attrMethod · 0.80
GetFunctionBodyMethod · 0.80
nameMethod · 0.65
GetNodeAttrFunction · 0.50
InstantiateMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected