Check that the ops of all non-functional nodes have been registered.
| 1068 | |
| 1069 | // Check that the ops of all non-functional nodes have been registered. |
| 1070 | Status 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(). |
no test coverage detected