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

Function main

tensorflow/compiler/aot/tfcompile_main.cc:125–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123} // end namespace tensorflow
124
125int main(int argc, char** argv) {
126 tensorflow::tfcompile::MainFlags flags;
127 flags.target_triple = "x86_64-pc-linux";
128 flags.out_function_object = "out_model.o";
129 flags.out_metadata_object = "out_helper.o";
130 flags.out_header = "out.h";
131 flags.entry_point = "entry";
132
133 std::vector<tensorflow::Flag> flag_list;
134 AppendMainFlags(&flag_list, &flags);
135 xla::AppendDebugOptionsFlags(&flag_list);
136
137 tensorflow::string usage = tensorflow::tfcompile::kUsageHeader;
138 usage += tensorflow::Flags::Usage(argv[0], flag_list);
139 if (argc > 1 && absl::string_view(argv[1]) == "--help") {
140 std::cerr << usage << "\n";
141 return 0;
142 }
143 bool parsed_flags_ok = tensorflow::Flags::Parse(&argc, argv, flag_list);
144 QCHECK(parsed_flags_ok) << "\n" << usage;
145
146 tensorflow::port::InitMain(usage.c_str(), &argc, &argv);
147 QCHECK(argc == 1) << "\nERROR: This command does not take any arguments "
148 "other than flags\n\n"
149 << usage;
150 tensorflow::Status status = tensorflow::tfcompile::Main(flags);
151 if (status.code() == tensorflow::error::INVALID_ARGUMENT) {
152 std::cerr << "INVALID ARGUMENTS: " << status.error_message() << "\n\n"
153 << usage;
154 return 1;
155 } else {
156 TF_QCHECK_OK(status);
157 }
158 return 0;
159}

Callers

nothing calls this directly

Calls 9

AppendMainFlagsFunction · 0.85
AppendDebugOptionsFlagsFunction · 0.85
UsageFunction · 0.85
string_viewClass · 0.85
ParseFunction · 0.85
c_strMethod · 0.80
MainFunction · 0.70
InitMainFunction · 0.50
codeMethod · 0.45

Tested by

no test coverage detected