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

Function InstantiateFunctionForTest

tensorflow/compiler/tf2xla/test_util.cc:23–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21namespace tensorflow {
22
23Status InstantiateFunctionForTest(const string& name,
24 const FunctionLibraryDefinition& library,
25 InstantiationResultForTest* result) {
26 const FunctionDef* fdef = library.Find(name);
27 TF_RET_CHECK(fdef != nullptr);
28
29 auto get_func_sig = [&library](const string& op, const OpDef** sig) {
30 return library.LookUpOpDef(op, sig);
31 };
32 InstantiationResult inst;
33 TF_RETURN_IF_ERROR(
34 InstantiateFunction(*fdef, AttrSlice(), get_func_sig, &inst));
35 result->arg_types = inst.arg_types;
36 result->ret_types = inst.ret_types;
37 for (NodeDef& n : inst.nodes) {
38 *result->gdef.add_node() = std::move(n);
39 }
40 return Status::OK();
41}
42
43} // namespace tensorflow

Callers 2

TESTFunction · 0.85
TESTFunction · 0.85

Calls 4

InstantiateFunctionFunction · 0.85
AttrSliceClass · 0.85
LookUpOpDefMethod · 0.80
FindMethod · 0.45

Tested by

no test coverage detected