Commit cf070e7
fix(hipdnn): wire golden harness into TOML tolerance + skip chain (#8738)
JIRA ID: ALMIOPEN-1969
## Summary
Extract shared `TomlGuards.hpp` and wire the non-golden and golden GPU
harnesses through it so TOML-based tolerance overrides and test skips
work uniformly. Fix `toleranceForNodeAttributes` missing SDPA cases.
## Motivation
Tolerance-override and test-skip logic was duplicated in the non-golden
harness and absent from the golden GPU harness
(`IntegrationGraphGoldenReferenceVerificationHarness`). TOML
`[[test_skips]]` and `[[tolerance_overrides]]` entries were silently
ignored for bundle tests. Additionally, `toleranceForNodeAttributes` had
no `SdpaAttributes`/`SdpaBackwardAttributes` cases, so SDPA bundles fell
through to the 1e-3 default instead of using
`tol::sdpa::getToleranceFwd<T>()`.
## Technical Details
- **New `TomlGuards.hpp`** -- three shared free functions:
`currentTestName()`, `applyTomlToleranceOverride()`, `checkTomlSkip()`.
- **Non-golden harness** -- replaced inline skip/override blocks with
`TomlGuards` calls (net -25 lines). `checkTomlSkip()` is inlined in
`SetUp()` so `GTEST_SKIP()` returns from `SetUp()` directly.
- **Golden GPU harness** -- added `checkTomlSkip()` inline in `SetUp()`
before `applyMetadataGuards()`. TOML tolerance override resolved once
before the per-tensor comparison loop in `compareEach()`, applied
per-tensor after `resolveTolerances()`.
- **SDPA tolerance** -- added `SdpaAttributes`/`SdpaBackwardAttributes`
cases to `toleranceForNodeAttributes<T>()`.
### Why `TestGoldenReferenceCpu` is intentionally excluded
`TestGoldenReferenceCpu` validates the CPU reference executor against
golden data — it does not run the GPU engine. The TOML `[[test_skips]]`
and `[[tolerance_overrides]]` are engine-specific (per-arch,
per-engine). Applying them here would mask CPU reference regressions: if
the oracle drifts from golden data, every GPU engine test that falls
back to the CPU reference (auto mode) silently compares against a broken
oracle and passes green. The CPU reference is deterministic and must
always run with its hardcoded per-op tolerances.
## Test Plan
- [x] Existing `TestTestConfig`, `TestTestSettings`,
`TestVerificationModePaths`, `TestGoldenVerificationHarness`,
`TestSynthesisTracker`, `TestSynthesizeInputs` all pass
- [x] Pre-commit hooks clean (clang-format, cmake-lint)
- [x] Bundle tests still gated behind `--allow-bundles`
## Test Result
All unit tests pass.
## Submission Checklist
- [x] Follows [contributing
guidelines](https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests)
- [x] No new warnings
- [x] All existing tests pass
cat: cd: No such file or directory
cat: /home/AMD/bghimire/worktrees/rocm-libraries-wt-1969: Is a directory
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 329358b commit cf070e7
6 files changed
Lines changed: 168 additions & 25 deletions
File tree
- dnn-providers/integration-tests
- src/harness
- golden
- tests
Lines changed: 4 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
61 | | - | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
| 64 | + | |
70 | 65 | | |
71 | 66 | | |
72 | 67 | | |
| |||
254 | 249 | | |
255 | 250 | | |
256 | 251 | | |
257 | | - | |
258 | 252 | | |
259 | 253 | | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
| 254 | + | |
276 | 255 | | |
277 | 256 | | |
278 | 257 | | |
| |||
Lines changed: 55 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
490 | 491 | | |
491 | 492 | | |
492 | 493 | | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
493 | 502 | | |
494 | 503 | | |
495 | 504 | | |
| |||
502 | 511 | | |
503 | 512 | | |
504 | 513 | | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
505 | 520 | | |
506 | 521 | | |
507 | 522 | | |
| |||
672 | 687 | | |
673 | 688 | | |
674 | 689 | | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
675 | 694 | | |
676 | 695 | | |
677 | 696 | | |
| |||
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
56 | 67 | | |
57 | 68 | | |
58 | 69 | | |
| |||
81 | 92 | | |
82 | 93 | | |
83 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
84 | 100 | | |
85 | 101 | | |
86 | 102 | | |
| |||
244 | 260 | | |
245 | 261 | | |
246 | 262 | | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
247 | 266 | | |
248 | 267 | | |
249 | 268 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
0 commit comments