Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update perf tool documentation to reflect the new graph optimization enums. Relax constraint for enable_all. #1650

Merged
merged 15 commits into from
Aug 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
b03dc6f
Mention OrtCreateSessionFromArray in C API doc
pranavsharma Jul 22, 2019
cc5b316
Merge branch 'master' of https://github.com/Microsoft/onnxruntime
pranavsharma Jul 23, 2019
4ef6284
Merge branch 'master' of https://github.com/Microsoft/onnxruntime
pranavsharma Jul 25, 2019
85bd0dc
Merge branch 'master' of https://github.com/Microsoft/onnxruntime
pranavsharma Jul 25, 2019
42aa76c
Merge branch 'master' of https://github.com/Microsoft/onnxruntime
pranavsharma Jul 31, 2019
27ac7f1
Merge branch 'master' of https://github.com/Microsoft/onnxruntime
pranavsharma Aug 7, 2019
8fdbd2e
Merge branch 'master' of https://github.com/Microsoft/onnxruntime
pranavsharma Aug 8, 2019
704934b
Merge branch 'master' of https://github.com/Microsoft/onnxruntime
pranavsharma Aug 13, 2019
10f46b4
Merge branch 'master' of https://github.com/Microsoft/onnxruntime
pranavsharma Aug 14, 2019
3c64f87
Merge branch 'master' of https://github.com/Microsoft/onnxruntime
pranavsharma Aug 15, 2019
d4d3008
Merge branch 'master' of https://github.com/Microsoft/onnxruntime
pranavsharma Aug 16, 2019
d06cfbd
Merge branch 'master' of https://github.com/Microsoft/onnxruntime
pranavsharma Aug 17, 2019
946be7a
Merge branch 'master' of https://github.com/Microsoft/onnxruntime
pranavsharma Aug 19, 2019
a25276d
Update perf tool documentation to reflect the new graph optimization …
pranavsharma Aug 19, 2019
cd0f20d
Update one more doc
pranavsharma Aug 19, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/ONNX_Runtime_Perf_Tuning.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ sess_options.set_graph_optimization_level(2)
```
* sess_options.session_thread_pool_size=2 controls how many thread do you want to use to run your model
* sess_options.enable_sequential_execution=True controls whether you want to run operators in your graph sequentially or in parallel. Usually when your model has many branches, set this option to false will give you better performance.
* sess_options.set_graph_optimization_level(2). There are three levels, 0 means disable optimization, 1 means enable optimizations before graph partition, 2 means enable all optimization.
* sess_options.set_graph_optimization_level(2). Please see onnxruntime_c_api.h (enum GraphOptimizationLevel) for the full list of all optimization levels.

### MKL_DNN/nGraph/MKL_ML Execution Provider
MKL_DNN, MKL_ML and nGraph all depends on openmp for parallization. For those execution providers, we need to use openmp enviroment variable to tune the performance.
Expand Down
11 changes: 8 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,7 @@ 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]: Please see onnxruntime_c_api.h (enum GraphOptimizationLevel) for the full list of all optimization levels. \n"
"\t-h: help\n");
}

Expand Down Expand Up @@ -143,8 +143,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