| 45 | } |
| 46 | |
| 47 | Status 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 | |
| 62 | Status CondConstInputIndices( |
| 63 | absl::Span<const FunctionBody* const> branch_bodies, |
no test coverage detected