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

Function PrintAllCCOps

tensorflow/cc/framework/cc_op_gen_main.cc:30–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28namespace {
29
30void PrintAllCCOps(const std::string& dot_h, const std::string& dot_cc,
31 bool include_internal,
32 const std::vector<string>& api_def_dirs) {
33 OpList ops;
34 OpRegistry::Global()->Export(include_internal, &ops);
35 ApiDefMap api_def_map(ops);
36 if (!api_def_dirs.empty()) {
37 Env* env = Env::Default();
38 // Only load files that correspond to "ops".
39 for (const auto& op : ops.op()) {
40 for (const auto& api_def_dir : api_def_dirs) {
41 const std::string api_def_file_pattern =
42 io::JoinPath(api_def_dir, "api_def_" + op.name() + ".pbtxt");
43 if (env->FileExists(api_def_file_pattern).ok()) {
44 TF_CHECK_OK(api_def_map.LoadFile(env, api_def_file_pattern));
45 }
46 }
47 }
48 }
49
50 api_def_map.UpdateDocs();
51
52 WriteCCOps(ops, api_def_map, dot_h, dot_cc);
53}
54
55} // namespace
56} // namespace tensorflow

Callers 1

mainFunction · 0.85

Calls 11

DefaultFunction · 0.85
WriteCCOpsFunction · 0.85
ExportMethod · 0.80
LoadFileMethod · 0.80
UpdateDocsMethod · 0.80
nameMethod · 0.65
JoinPathFunction · 0.50
emptyMethod · 0.45
opMethod · 0.45
okMethod · 0.45
FileExistsMethod · 0.45

Tested by

no test coverage detected