| 219 | const NodeDef& node); |
| 220 | |
| 221 | Status IsFunctionStateful(const FunctionLibraryDefinition& library, |
| 222 | const FunctionDef& function_def) { |
| 223 | if (!function_def.signature().is_stateful()) { |
| 224 | return Status::OK(); |
| 225 | } |
| 226 | |
| 227 | for (const NodeDef& node_def : function_def.node_def()) { |
| 228 | TF_RETURN_IF_ERROR(IsNodeStateful(library, node_def)); |
| 229 | } |
| 230 | return Status::OK(); |
| 231 | } |
| 232 | |
| 233 | // Returns whether an op has been whitelisted as stateless. Uses a heuristic to |
| 234 | // whitelist source dataset ops which have been marked stateful due to |
no test coverage detected