| 33 | namespace { |
| 34 | |
| 35 | Status 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 | |
| 47 | Status GetFunctionBodies(FunctionLibraryRuntime* flib_runtime, |
| 48 | const NodeDef& node, StringPiece func_list_attr_name, |
no test coverage detected