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

Function GetFunctionDef

tensorflow/c/c_test_util.cc:412–422  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

410}
411
412bool GetFunctionDef(TF_Function* func, tensorflow::FunctionDef* func_def) {
413 TF_Status* s = TF_NewStatus();
414 TF_Buffer* buffer = TF_NewBuffer();
415 TF_FunctionToFunctionDef(func, buffer, s);
416 bool ret = TF_GetCode(s) == TF_OK;
417 EXPECT_EQ(TF_OK, TF_GetCode(s)) << TF_Message(s);
418 if (ret) ret = func_def->ParseFromArray(buffer->data, buffer->length);
419 TF_DeleteBuffer(buffer);
420 TF_DeleteStatus(s);
421 return ret;
422}
423
424bool GetAttrValue(TF_Operation* oper, const char* attr_name,
425 tensorflow::AttrValue* attr_value, TF_Status* s) {

Callers 7

TEST_FFunction · 0.85
fdefMethod · 0.85
VerifyFDefMethod · 0.85
ReincarnateMethod · 0.85
TEST_FFunction · 0.85
AssertEqualFunction · 0.85
GetNameFunction · 0.85

Calls 7

TF_NewStatusFunction · 0.85
TF_NewBufferFunction · 0.85
TF_FunctionToFunctionDefFunction · 0.85
TF_GetCodeFunction · 0.85
TF_MessageFunction · 0.85
TF_DeleteBufferFunction · 0.85
TF_DeleteStatusFunction · 0.85

Tested by

no test coverage detected