Skip to content

Commit d5d5cd7

Browse files
authored
Add S/ES plot in Analysis and Allowance Config in test_compiler (#299)
* Update utils * Update * Update * Add analysis_GMRS.py and relative JSON config * distinguish eager and compiled exec error * Update precision config format * Update precision config format * Update test compiler on torch * handle fail_type * Update tolerance configurations * Update * Add fake_perf_degrad * Update * Fix * Update * Update * Update * Update * Update * Update * Update * Update * process subgraph * FIx * Fix * Fix correctness examination * Add S and ES plot * Update * Optimize fpd * Optimize fpd * add stats log * Update violin plot * Update violin plot * Update * Update GMRs * Update * Optimize plot * Update * Update * Update gamma cal * Update * Update * Update * Update Readme and regulate args. * Optimize anatations * Add Allowance Config * Clean samples * Process multi models using Config * Update * Update * Modified param name in test compiler * Modified param name in test compiler * Update * Update * Update * Update * Update * Update torch model allow list
1 parent 7d47b79 commit d5d5cd7

File tree

13 files changed

+3855
-325
lines changed

13 files changed

+3855
-325
lines changed

README.md

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ python -m graph_net.torch.test_compiler \
9999
--trials /times/to/test/ \
100100
> $GRAPH_NET_BENCHMARK_PATH/log.log 2>&1
101101

102-
# Note: if --compiler is omitted, PyTorch’s built-in compiler is used by default
102+
# Note: If --compiler is omitted, PyTorch’s built-in compiler is used by default.
103103
```
104104

105105
After executing, `graph_net.torch.test_compiler` will:
@@ -114,24 +114,31 @@ This step is to extract information (including failure) from logs in benchmark.
114114
All the information will be saved to multiple `model_compiler.json` files via:
115115

116116
```bash
117-
python -m graph_net.torch.log2json \
117+
python -m graph_net.log2json \
118118
--log-file $GRAPH_NET_BENCHMARK_PATH/log.log \
119-
--output-dir $GRAPH_NET_BENCHMARK_PATH
119+
--output-dir $GRAPH_NET_BENCHMARK_PATH/JSON_results/
120120
```
121121

122122
**Step 3: Analysis**
123123

124-
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.
124+
After processing, we provide `graph_net.violin_analysis` to generate [violin plot](https://en.m.wikipedia.org/wiki/Violin_plot) and `graph_net.S_analysis` to generate S and ES plot based on the JSON results.
125125

126126
```bash
127-
python -m graph_net.analysis \
128-
--benchmark-path /path/to/read/JSON/result/file/ \
129-
--output-dir /path/to/save/output/figures/
130-
```
127+
python -m graph_net.violin_analysis \
128+
--benchmark-path $GRAPH_NET_BENCHMARK_PATH/JSON_results/ \
129+
--output-dir $GRAPH_NET_BENCHMARK_PATH
131130

132-
After executing, one summary plot of results on all compilers, as well as multiple sub-plots of results in categories (model tasks, Library...) on a single compiler will be exported.
131+
python -m graph_net.S_analysis \
132+
--benchmark-path $GRAPH_NET_BENCHMARK_PATH/JSON_results/ \
133+
--output-dir $GRAPH_NET_BENCHMARK_PATH \
134+
--negative-speedup-penalty penalty/power/for/negative/speedup \
135+
--fpdb base/penalty/for/severe/errors
136+
137+
# Note: If --negative-speedup-penalty is omitted, p=0 is used by default.
138+
# If --fpdb, b=0.1 is used by default.
139+
```
133140

134-
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.
141+
The scripts are designed to process a file structure as `/benchmark_path/category_name/`, and items on x-axis are identified by name of the sub-directories. After executing, several summary plots of result in categories (model tasks, libraries...) will be exported to `$GRAPH_NET_BENCHMARK_PATH`.
135142

136143
## 📌 Roadmap
137144

0 commit comments

Comments
 (0)