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

Function main

tensorflow/core/api_def/update_api_def_main.cc:35–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33#include "tensorflow/core/util/command_line_flags.h"
34
35int main(int argc, char** argv) {
36 tensorflow::string api_files_dir;
37 tensorflow::string op_file_pattern;
38 std::vector<tensorflow::Flag> flag_list = {
39 tensorflow::Flag("api_def_dir", &api_files_dir,
40 "Base directory of api_def*.pbtxt files."),
41 tensorflow::Flag("op_file_pattern", &op_file_pattern,
42 "Pattern that matches C++ files containing REGISTER_OP "
43 "calls. If specified, we will try to remove .Doc() "
44 "calls for new ops defined in these files.")};
45 std::string usage = tensorflow::Flags::Usage(argv[0], flag_list);
46 bool parsed_values_ok = tensorflow::Flags::Parse(&argc, argv, flag_list);
47 if (!parsed_values_ok) {
48 std::cerr << usage << std::endl;
49 return 2;
50 }
51 tensorflow::port::InitMain(argv[0], &argc, &argv);
52
53 tensorflow::OpList ops;
54 tensorflow::OpRegistry::Global()->Export(false, &ops);
55 tensorflow::CreateApiDefs(ops, api_files_dir, op_file_pattern);
56}

Callers

nothing calls this directly

Calls 6

UsageFunction · 0.85
ParseFunction · 0.85
CreateApiDefsFunction · 0.85
ExportMethod · 0.80
FlagClass · 0.50
InitMainFunction · 0.50

Tested by

no test coverage detected