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

Function TestAllApiDefInputArgsAreValid

tensorflow/core/api_def/api_test.cc:82–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80}
81
82void TestAllApiDefInputArgsAreValid(
83 const OpList& ops, const std::unordered_map<string, ApiDef>& api_defs_map) {
84 for (const auto& op : ops.op()) {
85 const auto api_def_iter = api_defs_map.find(op.name());
86 if (api_def_iter == api_defs_map.end()) {
87 continue;
88 }
89 const auto& api_def = api_def_iter->second;
90 for (const auto& api_def_arg : api_def.in_arg()) {
91 bool found_arg = false;
92 for (const auto& op_arg : op.input_arg()) {
93 if (api_def_arg.name() == op_arg.name()) {
94 found_arg = true;
95 break;
96 }
97 }
98 ASSERT_TRUE(found_arg)
99 << "Input argument " << api_def_arg.name()
100 << " (overwritten in api_def_" << op.name()
101 << ".pbtxt) is not defined in OpDef for " << op.name();
102 }
103 }
104}
105
106void TestAllApiDefOutputArgsAreValid(
107 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