Skip to content

Commit 3a24ebc

Browse files
authored
Update README.md
1 parent 67f3294 commit 3a24ebc

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@ python3 -m graph_net.torch.test_compiler \
9797
# Note: if --compiler is omitted, PyTorch’s built-in compiler is used by default
9898
```
9999

100+
After that, ```graph_net.torch.test_compiler``` processes as below:
101+
1. Running the original model in eager mode to record a baseline.
102+
2. Compiling the model with the specified backend (e.g., CINN, TorchInductor, TVM).
103+
3. Executing the compiled model and collecting its runtime and outputs.
104+
4. Conduct speedup by comparing the compiled results against the baseline.
105+
100106
**Step 2: Analysis**
101107

102108
After processing, we provide ```graph_net/analysis.py``` to generate [violin plot](https://en.m.wikipedia.org/wiki/Violin_plot) based on the JSON results.
@@ -107,7 +113,7 @@ python3 graph_net/analysis.py \
107113
--output-dir /path/to/save/output/figures/
108114
```
109115

110-
After executing, one summary plot of results on all compilers (as shown below in "Evaluation Results Example"), as well as multiple sub-plots of results in categories (model tasks, Library...) on a single compiler.
116+
After executing, one summary plot of results on all compilers (as shown in "Evaluation Results Example"), as well as multiple sub-plots of results in categories (model tasks, Library...) on a single compiler.
111117

112118
The script is designed to process a file structure as ```/benchmark_path/compiler_name/category_name/``` (for example ```/benchmark_logs/paddle/nlp/```), and items on x-axis are identified by name of the folders. So you can modify ```read_all_speedups``` function to fit the benchmark settings on your demand.
113119

0 commit comments

Comments
 (0)