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

Function GetFunctionBody

tensorflow/compiler/tf2xla/const_analysis.cc:35–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33namespace {
34
35Status GetFunctionBody(FunctionLibraryRuntime* flib_runtime,
36 const NodeDef& node, StringPiece func_attr_name,
37 const FunctionBody** fbody) {
38 NameAttrList name_attr_list;
39 TF_RETURN_IF_ERROR(GetNodeAttr(node, func_attr_name, &name_attr_list));
40 FunctionLibraryRuntime::Handle func_handle;
41 TF_RETURN_IF_ERROR(flib_runtime->Instantiate(
42 name_attr_list.name(), AttrSlice(&name_attr_list.attr()), &func_handle));
43 *fbody = flib_runtime->GetFunctionBody(func_handle);
44 return Status::OK();
45}
46
47Status GetFunctionBodies(FunctionLibraryRuntime* flib_runtime,
48 const NodeDef& node, StringPiece func_list_attr_name,

Callers 1

Calls 6

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

Tested by

no test coverage detected