MCPcopy Create free account
hub / github.com/MegEngine/MegCC / main

Function main

compiler/tools/mgb-runner/main.cpp:234–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

232}
233
234int main(int argc, char** argv) {
235 cl::AddExtraVersionPrinter(
236 [](raw_ostream& oss) { oss << megcc::getMegccVersionString(); });
237 cl::ParseCommandLineOptions(argc, argv);
238 std::string model_path = InputFile.getValue();
239 std::unique_ptr<serialization::InputFile> inp_file =
240 serialization::InputFile::make_fs(model_path.c_str());
241 auto format = serialization::GraphLoader::identify_graph_dump_format(*inp_file);
242 mgb_assert(format.valid(), "invalid model: unknown model format");
243 auto loader = serialization::GraphLoader::make(std::move(inp_file), format.val());
244 serialization::GraphLoadConfig load_config;
245 auto result = loader->load(load_config, false);
246 run(result, verboseOpt.getValue());
247 return 0;
248}
249
250// vim: syntax=cpp.doxygen

Callers

nothing calls this directly

Calls 2

runFunction · 0.85
validMethod · 0.80

Tested by

no test coverage detected