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

Function ValidateFunctionDef

tensorflow/compiler/tf2xla/xla_compiler.cc:1070–1081  ·  view source on GitHub ↗

Check that the ops of all non-functional nodes have been registered.

Source from the content-addressed store, hash-verified

1068
1069// Check that the ops of all non-functional nodes have been registered.
1070Status ValidateFunctionDef(const FunctionDef* fdef,
1071 const FunctionLibraryDefinition& flib_def) {
1072 for (const NodeDef& node : fdef->node_def()) {
1073 const string& op = node.op();
1074 if (op == FunctionLibraryDefinition::kGradientOp || flib_def.Find(op)) {
1075 continue;
1076 }
1077 const OpDef* op_def;
1078 TF_RETURN_IF_ERROR(OpRegistry::Global()->LookUpOpDef(op, &op_def));
1079 }
1080 return Status::OK();
1081}
1082
1083// If node is PartitionedCall or StatefulPartitionedCall, returns the
1084// name from the "f" attr, else returns node.def().op().

Callers 1

ValidateGraphFunction · 0.85

Calls 4

LookUpOpDefMethod · 0.80
node_defMethod · 0.45
opMethod · 0.45
FindMethod · 0.45

Tested by

no test coverage detected