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

Function TestAllApiDefOutputArgsAreValid

tensorflow/core/api_def/api_test.cc:106–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106void TestAllApiDefOutputArgsAreValid(
107 const OpList& ops, const std::unordered_map<string, ApiDef>& api_defs_map) {
108 for (const auto& op : ops.op()) {
109 const auto api_def_iter = api_defs_map.find(op.name());
110 if (api_def_iter == api_defs_map.end()) {
111 continue;
112 }
113 const auto& api_def = api_def_iter->second;
114 for (const auto& api_def_arg : api_def.out_arg()) {
115 bool found_arg = false;
116 for (const auto& op_arg : op.output_arg()) {
117 if (api_def_arg.name() == op_arg.name()) {
118 found_arg = true;
119 break;
120 }
121 }
122 ASSERT_TRUE(found_arg)
123 << "Output argument " << api_def_arg.name()
124 << " (overwritten in api_def_" << op.name()
125 << ".pbtxt) is not defined in OpDef for " << op.name();
126 }
127 }
128}
129
130void TestAllApiDefAttributeNamesAreValid(
131 const OpList& ops, const std::unordered_map<string, ApiDef>& api_defs_map) {

Callers 1

TEST_FFunction · 0.85

Calls 4

nameMethod · 0.65
opMethod · 0.45
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected