Skip to content

Commit

Permalink
Update perf tool documentation to reflect the new graph optimization …
Browse files Browse the repository at this point in the history
…enums. Relax constraint for enable_all.
  • Loading branch information
pranavsharma committed Aug 19, 2019
1 parent 946be7a commit a25276d
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions onnxruntime/test/perftest/command_args_parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ namespace perftest {
"\t-v: Show verbose information.\n"
"\t-x [thread_size]: Session thread pool size.\n"
"\t-P: Use parallel executor instead of sequential executor.\n"
"\t-o [optimization level]: 0: disable optimization, 1: basic optimization, 2: extended optimization, 3: extended+layout optimization. \n"
"\t-o [optimization level]:\n"
"\t\t0: disable optimization\n"
"\t\t1: basic optimization\n"
"\t\t2: extended optimization\n"
"\t\t99: extended+layout optimization.\n"
"\t\tPlease see onnxruntime_c_api.h for the complete set of values. \n"
"\t-h: help\n");
}

Expand Down Expand Up @@ -143,8 +148,13 @@ namespace perftest {
case ORT_ENABLE_ALL:
test_config.run_config.optimization_level = ORT_ENABLE_ALL;
break;
default:
return false;
default: {
if (tmp > ORT_ENABLE_ALL) { // relax constraint
test_config.run_config.optimization_level = ORT_ENABLE_ALL;
} else {
return false;
}
}
}
break;
}
Expand Down

0 comments on commit a25276d

Please sign in to comment.