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

Function GetFunc

tensorflow/python/eager/pywrap_tfe_src.cc:421–430  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

419}
420
421TFE_Op* GetFunc(TFE_Context* ctx, const tensorflow::NameAttrList& func,
422 TF_Status* status) {
423 TFE_Op* func_op = TFE_NewOp(ctx, func.name().data(), status);
424 for (const auto& attr : func.attr()) {
425 if (TF_GetCode(status) != TF_OK) return nullptr;
426 SetOpAttrValueScalar(ctx, func_op, attr.second, attr.first.data(), status);
427 if (TF_GetCode(status) != TF_OK) return nullptr;
428 }
429 return func_op;
430}
431
432void SetOpAttrListDefault(
433 TFE_Context* ctx, TFE_Op* op, const tensorflow::OpDef::AttrDef& attr,

Callers 1

SetOpAttrListDefaultFunction · 0.70

Calls 6

TFE_NewOpFunction · 0.85
TF_GetCodeFunction · 0.85
SetOpAttrValueScalarFunction · 0.85
attrMethod · 0.80
nameMethod · 0.65
dataMethod · 0.45

Tested by

no test coverage detected