Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Commit

Permalink
Add document for ONNX Runtime latency profiling and JSON file viewing. (
Browse files Browse the repository at this point in the history
  • Loading branch information
ybrnathan authored Jun 27, 2019
1 parent b8d3700 commit a79ab5e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/ONNX_Runtime_Perf_Tuning.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,20 @@ whether next task is ready or not. Use PASSIVE if your CPU usage already high, u
Yes, we have created a tool named onnxruntime_perf_test.exe, and you find it at the build drop.
You can use this tool to test all those knobs easily. Please find the usage of this tool by onnxruntime_perf_test.exe -h

## How to enable profiling and view the generated JSON file?

You can enable ONNX Runtime latency profiling in code:

```python
import onnxruntime as rt

sess_options = rt.SessionOptions()
enable_profiling.enable_profiling = True
```
Or, if you are using the onnxruntime_perf_test.exe tool, you can add -p [profile_file] to enable performance profiling.

In both ways, you will get a JSON file, which contains the detailed performance data (threading, latency of each operator, etc). This file is a standard performance tracing file, and to view it in a user friendly way, you can open it by using chrome://tracing:
* Open chrome browser
* Type chrome://tracing in the address bar
* Load the generated JSON file

0 comments on commit a79ab5e

Please sign in to comment.