Commit 742965e
[ALMIOPEN-1856] Simplify dnn-benchmarking engine comparison CLI (#7866)
## Summary
This PR replaces the old A/B-specific dnn-benchmarking workflow with an
explicit ordered multi-engine path. It keeps engine selection on
`--engine`, supports repeated engine IDs as distinct selections, and
allows comma-delimited plugin paths that map positionally to the
selected engines.
## Risk Assessment
Medium risk. This changes CLI behavior and removes legacy A/B flags in a
benchmark tool, but the new path is covered by parser, config,
execution, reporting, full Python tests, and gfx90a hardware smoke
validation.
## Testing Summary
- Static Python compile validation covered the changed source and tests.
- Full dnn-benchmarking pytest coverage ran on Alola gfx90a with Python
3.12 and ROCm PyTorch, including GPU-marked tests.
- Focused regression coverage includes CLI parsing, config validation,
ordered engine/plugin selection, same-engine/different-plugin paths,
absolute per-engine plugin loading, per-engine setup failures, output
shape, internal profiling plugin-path forwarding, and serialization.
- Pre-commit ran on all PR-changed files and passed.
- Alola gfx90a validation used the installed MIOpen provider from
`/opt/rocm/lib/hipdnn_plugins/engines` and ran dnn-benchmarking smoke
tests for single-engine, two-engine, and comma-delimited plugin-path
flows.
## Testing Checklist
- [x] Python compile - `python3 -m compileall -q
projects/hipdnn/tools/dnn-benchmarking/src/dnn_benchmarking
projects/hipdnn/tools/dnn-benchmarking/tests` - Status: Passed
- [x] Pre-commit on PR-changed files - `pre-commit run --files <PR
changed files>` - Status: Passed
- [x] Full dnn-benchmarking test suite -
`workspace/scripts/alola-session run -- 'cd
/home/AMD/sareeder/worktrees/rocmlibs-benchmarking-alola-test/projects/hipdnn/tools/dnn-benchmarking
&& source /workspace/.venv/bin/activate &&
DNN_BENCH_WORKSPACE=/workspace python -m pytest tests'` - ASICs: gfx90a
- Status: Passed, 683 passed, 6 skipped, 8 xfailed
- [x] Alola engine listing - `hipdnn_list_engines --plugin-dir
/opt/rocm/lib/hipdnn_plugins/engines` - ASICs: gfx90a - Status: Passed,
found `MIOPEN_ENGINE` and `MIOPEN_ENGINE_DETERMINISTIC`
- [x] Alola single-engine smoke - `python -m dnn_benchmarking --graph
graphs/sample_conv_fwd.json --warmup 1 --iters 2 --engine
1563989756945604898 --plugin-path /opt/rocm/lib/hipdnn_plugins/engines`
- ASICs: gfx90a - Status: Passed
- [x] Alola two-engine smoke - `python -m dnn_benchmarking --graph
graphs/sample_conv_fwd.json --warmup 1 --iters 5 --engine
1563989756945604898,-6748551569128940061 --plugin-path
/opt/rocm/lib/hipdnn_plugins/engines` - ASICs: gfx90a - Status: Passed
- [x] Alola comma-delimited plugin-path smoke - `python -m
dnn_benchmarking --graph graphs/sample_conv_fwd.json --warmup 1 --iters
1 --engine 1563989756945604898,-6748551569128940061 --plugin-path
/opt/rocm/lib/hipdnn_plugins/engines,/opt/rocm/lib/hipdnn_plugins/engines`
- ASICs: gfx90a - Status: Passed
- [x] PR CI - GitHub PR checks - Status: Pending
Example comparison:
```
Results:
engine status plugin_path kernel_mean_ms kernel_median_ms e2e_mean_ms e2e_median_ms
--------------------------- ------ ------------------------------------ -------------- ---------------- ----------- -------------
MIOPEN_ENGINE passed /opt/rocm/lib/hipdnn_plugins/engines 0.028 0.027 0.069 0.041
MIOPEN_ENGINE_DETERMINISTIC passed /opt/rocm/lib/hipdnn_plugins/engines 0.026 0.026 0.042 0.037
```
## Technical Changes
- Removes legacy A/B runner/configuration code and old `--AId`, `--BId`,
`--APath`, and `--BPath` flags.
- Adds comma-delimited `--plugin-path` parsing with validation for one
shared plugin path or one path per selected engine.
- Preserves duplicate `--engine` IDs and models each requested run as an
ordered engine selection with its own plugin path.
- Uses absolute plugin loading mode for per-engine plugin-path setup so
plugin comparisons are isolated.
- Records per-engine plugin setup and handle creation failures as error
rows instead of aborting the suite.
- Adds per-engine summary rows with raw kernel/E2E means and medians;
percent deltas are intentionally not emitted because they are derivable
from the raw columns.
- Serializes median timing data and plugin paths for JSON consumers.
- Documents `hipdnn_list_engines --plugin-dir <path>` in CLI help so
users can discover engine IDs and names.
- Raises dnn-benchmarking's Python minimum to 3.12 and uses Python 3.12
tarfile data filters directly for tarball graph extraction.
---------
Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>1 parent 0e6337c commit 742965e
23 files changed
Lines changed: 727 additions & 1251 deletions
File tree
- projects/hipdnn/tools/dnn-benchmarking
- src/dnn_benchmarking
- cli
- config
- execution
- graph
- reporting
- validation
- providers
- tests/unit
- cli
- config
- execution
- reporting
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | 16 | | |
20 | 17 | | |
21 | 18 | | |
| |||
Lines changed: 0 additions & 172 deletions
This file was deleted.
Lines changed: 18 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
52 | 62 | | |
53 | | - | |
54 | | - | |
| 63 | + | |
55 | 64 | | |
56 | 65 | | |
57 | 66 | | |
| |||
74 | 83 | | |
75 | 84 | | |
76 | 85 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
82 | 89 | | |
83 | 90 | | |
84 | 91 | | |
| |||
88 | 95 | | |
89 | 96 | | |
90 | 97 | | |
91 | | - | |
| 98 | + | |
92 | 99 | | |
93 | 100 | | |
94 | 101 | | |
95 | | - | |
| 102 | + | |
96 | 103 | | |
97 | 104 | | |
98 | 105 | | |
| |||
101 | 108 | | |
102 | 109 | | |
103 | 110 | | |
| 111 | + | |
104 | 112 | | |
105 | 113 | | |
106 | 114 | | |
| |||
Lines changed: 1 addition & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
| |||
82 | 81 | | |
83 | 82 | | |
84 | 83 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
| 84 | + | |
94 | 85 | | |
95 | 86 | | |
96 | 87 | | |
| |||
0 commit comments