| 503 | } |
| 504 | |
| 505 | bool HasOptionalAttrs( |
| 506 | const ApiDef& api_def, |
| 507 | const std::unordered_map<string, string>& inferred_input_attrs) { |
| 508 | for (int i = 0; i < api_def.attr_size(); ++i) { |
| 509 | const auto& attr(api_def.attr(i)); |
| 510 | if ((inferred_input_attrs.find(attr.name()) == |
| 511 | inferred_input_attrs.end()) && |
| 512 | attr.has_default_value()) { |
| 513 | return true; |
| 514 | } |
| 515 | } |
| 516 | return false; |
| 517 | } |
| 518 | |
| 519 | struct OpInfo { |
| 520 | // graph_op_def: The OpDef used by the runtime, has the names that |
no test coverage detected