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

Function GetFunc

tensorflow/c/eager/c_api.cc:978–987  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

976
977namespace {
978TFE_Op* GetFunc(TFE_Context* ctx, const tensorflow::NameAttrList& func,
979 TF_Status* status) {
980 TFE_Op* func_op = TFE_NewOp(ctx, func.name().data(), status);
981 for (const auto& attr : func.attr()) {
982 if (TF_GetCode(status) != TF_OK) return nullptr;
983 SetOpAttrValueScalar(ctx, func_op, attr.second, attr.first.data(), status);
984 if (TF_GetCode(status) != TF_OK) return nullptr;
985 }
986 return func_op;
987}
988} // namespace
989
990void TFE_ContextStartStep(TFE_Context* ctx) { ctx->context->StartStep(); }

Callers 1

SetOpAttrValueScalarFunction · 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