提交 f24d6cd0 编写于 作者: L Liangliang He

Merge branch 'feature_wuch' into 'master'

fix usage message

See merge request !548
......@@ -201,7 +201,9 @@ DEFINE_int32(cpu_affinity_policy, 1,
int Main(int argc, char **argv) {
MACE_CHECK(FLAGS_device != "HEXAGON",
"Model benchmark tool do not support DSP.");
gflags::SetUsageMessage("some usage message");
std::string usage = "benchmark model\nusage: " + std::string(argv[0])
+ " [flags]";
gflags::SetUsageMessage(usage);
gflags::ParseCommandLineFlags(&argc, &argv, true);
LOG(INFO) << "Model name: [" << FLAGS_model_name << "]";
......
......@@ -163,7 +163,9 @@ DEFINE_string(dsp_model_data_file, "", "dsp model data file name");
DEFINE_int32(run_seconds, 10, "run seconds");
int Main(int argc, char **argv) {
gflags::SetUsageMessage("some usage message");
std::string usage = "model throughput test\nusage: " + std::string(argv[0])
+ " [flags]";
gflags::SetUsageMessage(usage);
gflags::ParseCommandLineFlags(&argc, &argv, true);
LOG(INFO) << "mace version: " << MaceVersion();
......
......@@ -27,7 +27,9 @@ DEFINE_int32(cpu_affinity_policy, 1,
"0:AFFINITY_NONE/1:AFFINITY_BIG_ONLY/2:AFFINITY_LITTLE_ONLY");
int main(int argc, char **argv) {
gflags::SetUsageMessage("some usage message");
std::string usage = "run ops benchmark\nusage: " + std::string(argv[0])
+ " [flags]";
gflags::SetUsageMessage(usage);
gflags::ParseCommandLineFlags(&argc, &argv, true);
// config runtime
......
......@@ -258,7 +258,9 @@ bool RunModel(const std::vector<std::string> &input_names,
}
int Main(int argc, char **argv) {
gflags::SetUsageMessage("some usage message");
std::string usage = "example run\nusage: " + std::string(argv[0])
+ " [flags]";
gflags::SetUsageMessage(usage);
gflags::ParseCommandLineFlags(&argc, &argv, true);
LOG(INFO) << "mace version: " << MaceVersion();
......
......@@ -423,7 +423,9 @@ bool RunModel(const std::string &model_name,
}
int Main(int argc, char **argv) {
gflags::SetUsageMessage("some usage message");
std::string usage = "mace run model\nusage: " + std::string(argv[0])
+ " [flags]";
gflags::SetUsageMessage(usage);
gflags::ParseCommandLineFlags(&argc, &argv, true);
LOG(INFO) << "model name: " << FLAGS_model_name;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册