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

Function main

lite/load_and_run/src/main.cpp:31–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29)";
30
31int main(int argc, char** argv) {
32 mgb::set_log_level(mgb::LogLevel::INFO);
33 lite::set_log_level(LiteLogLevel::INFO);
34 std::string usage = "load_and_run <model_path> [options Flags...]";
35 if (argc < 2) {
36 printf("usage: %s\n", simple_usage.c_str());
37 return -1;
38 }
39 gflags::SetUsageMessage(usage);
40 gflags::SetVersionString("1.0");
41 gflags::ParseCommandLineFlags(&argc, &argv, true);
42 std::string model_path = argv[1];
43 auto strategy = lar::StrategyBase::create_strategy(model_path);
44 strategy->run();
45 gflags::ShutDownCommandLineFlags();
46
47 return 0;
48}
49
50// vim: syntax=cpp.doxygen foldmethod=marker foldmarker=f{{{,f}}}

Callers

nothing calls this directly

Calls 2

set_log_levelFunction · 0.50
runMethod · 0.45

Tested by

no test coverage detected