Skip to content

fix(integration-tests): move two misfiled Batchnorm runtime sweep cases to the bundles they match - #13747

Merged
bghimireamd merged 5 commits into
developfrom
users/bghimire/ALMIOPEN-2332/drop-dead-batchnorm-sweep-cases
Oct 17, 2026
Merged

bghimireamd merged 5 commits into
developfrom
users/bghimire/ALMIOPEN-2332/drop-dead-batchnorm-sweep-cases

Conversation

@bghimireamd

@bghimireamd bghimireamd commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Two runtime pass-by-value sweep cases from #9600 were filed under the wrong bundle. The harness rejects their tensor uids, reports them as INVALID_SWEEP_CASE, and skips them, so neither has ever run. This PR moves each one to the bundle whose template it was actually written for, so both load and run for the first time.

JSON only, no code changes. Split out of #11659 (support-matrix renderer), which is based on this branch so it can stay Python-only.

How to review

Review commit by commit. Commit 1 only deletes lines and commit 2 only adds lines. The combined "Files changed" view for BatchnormPointwise/Default/sweep.json pairs unrelated neighbouring cases, so it looks as though four case ids were edited. No id changes.

Comparing each moved case field by field against develop:

  • runtime_epsilon_momentum (Default → Variant2) is byte-for-byte identical.
  • runtime_epsilon (BatchnormBackward/Default → BatchnormPointwise/Default) is identical except for one added block, attributes: {relu_lower_clip: null, relu_lower_clip_slope: null, relu_upper_clip: null}. BatchnormPointwise/Default's template reads those three attributes. All 11 cases in that bundle carry an attributes block, and 8 of them use exactly these nulls. BatchnormBackward's template has no relu clip, which is why the case never needed them before.

Details

Case Was in Problem Now in
runtime_epsilon BatchnormBackward/Default Lists case tensors 6 and 7; the template only has uids 0-5, and BatchnormBackward has no epsilon. Its own metadata already says "BatchnormPointwise". BatchnormPointwise/Default (8 tensors, epsilon at uid 6)
runtime_epsilon_momentum BatchnormPointwise/Default Lists 13 tensors; Default only has uids 0-7 (uid 7 is scale). BatchnormPointwise/Variant2 (13 tensors, momentum at uid 7)
  • buildCaseTensorMap() rejects a case tensor uid that isn't in the template. That is why both were silently skipped and develop's CI stayed green.
  • The case data and uids are unchanged. The only addition is null relu-clip attributes on runtime_epsilon, because the BatchnormPointwise/Default template reads relu_lower_clip, relu_lower_clip_slope, and relu_upper_clip.
  • Two commits: the first removes the cases from the wrong bundles, the second adds them to the right ones. Reviewing them in order makes the move obvious.
  • No support claims are added for either case. Claims can be harvested once CI shows which engines pass.

What to watch in CI: these cases now check, for the first time, that a provider reads epsilon (and momentum) from the variant pack at execute time. If one fails, the failure origin says whether the engine or the CPU reference is at fault.

  • Engine at fault: that's a real provider bug. I'll file a ticket and reduce this PR to the deletion commit.
  • Reference at fault: that's a harness fix, which goes in its own PR.

Test plan

🤖 Generated with Claude Code

bghimireamd and others added 2 commits October 15, 2026 12:21
…(ALMIOPEN-2332)

Two runtime pass-by-value cases from #9600 were written against another
template's uids:

- BatchnormBackward/Default `runtime_epsilon` lists case tensors 6 and 7
  (a BatchnormPointwise tensor set; its metadata says so), but the
  template holds uids 0-5, and BatchnormBackward has no epsilon at all.
- BatchnormPointwise/Default `runtime_epsilon_momentum` lists the 13
  tensors of Variant2's template (momentum at uid 7), but Default holds
  uids 0-7, where 7 is scale.

buildCaseTensorMap() rejects a case tensor uid the template lacks, so
the harness reports both as INVALID_SWEEP_CASE and skips them: neither
has ever run. Removing them changes nothing the harness executes. The
runtime epsilon + momentum coverage the second one meant to add for
Batchnorm + pointwise still needs a case on Variant2.

Co-Authored-By: Claude <noreply@anthropic.com>
…he bundles they match (ALMIOPEN-2332)

The previous commit dropped two cases from #9600 because the harness
could not load them. Their uids were right; their bundle was wrong. Each
matches another bundle's template exactly:

- `runtime_epsilon` (filed under BatchnormBackward/Default, which has no
  epsilon) lists the 8 tensors of BatchnormPointwise/Default, epsilon at
  uid 6; its metadata already said "BatchnormPointwise". It gains the
  null relu-clip attributes that template reads.
- `runtime_epsilon_momentum` (filed under BatchnormPointwise/Default)
  lists the 13 tensors of BatchnormPointwise/Variant2, momentum at uid 7.

Both now load, so for the first time they check that a provider reads
epsilon (and momentum) from the variant pack at execute time. They carry
no claims yet. An engine that takes either graph and ignores the runtime
value fails the test regardless.

Co-Authored-By: Claude <noreply@anthropic.com>
@therock-pr-bot

therock-pr-bot Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

✅ All Checks Passed — Ready for Review

Check Status Details
📝 PR Description ✅ Pass —
⛔ Forbidden Files ✅ Pass —
🧪 Unit Test ✅ Pass PR does not contain code files — Unit Test auto-passed
🔎 pre-commit ✅ Pass —
🚫 Draft PR 🔜 To Be Enabled —
🚩 Feature Flag 🔜 To Be Enabled —
📊 Code Coverage 🔜 To Be Enabled —
🤖 therock-pr-bot ✅ Pass —

🎉 All checks passed! This PR is ready for review.

📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

🙋 Wish to Override Policy?

@therock-pr-bot

Copy link
Copy Markdown

🎉 All checks passed! This PR is ready for review.

@bghimireamd
bghimireamd marked this pull request as ready for review October 15, 2026 17:04
@bghimireamd
bghimireamd requested a review from a team as a code owner October 15, 2026 17:04
@bghimireamd bghimireamd changed the title fix(integration-tests): move two misfiled Batchnorm runtime sweep cases to the bundles they match (ALMIOPEN-2332) fix(integration-tests): move two misfiled Batchnorm runtime sweep cases to the bundles they match Oct 15, 2026
@adickin-amd

Copy link
Copy Markdown
Contributor

updated branch. looks like you still had the rocke failures that were fixed

@bghimireamd
bghimireamd requested a review from a team as a code owner October 16, 2026 21:19
@bghimireamd
bghimireamd enabled auto-merge (squash) October 16, 2026 21:19
@bghimireamd
bghimireamd merged commit 7cde711 into develop Oct 17, 2026
101 checks passed
@bghimireamd
bghimireamd deleted the users/bghimire/ALMIOPEN-2332/drop-dead-batchnorm-sweep-cases branch October 17, 2026 00:34
@assistant-librarian

Copy link
Copy Markdown
Contributor

TheRock Submodule Bump Activity

Newest first

adickin-amd added a commit that referenced this pull request Oct 22, 2026
…rs (#11659)

JIRA ID : ALMIOPEN-2332

> **Based on #13747** (the two Batchnorm sweep-case moves), so this PR
stays Python and docs only. Once #13747 merges, this PR retargets to
`develop`.

## Summary

- **`render_support_matrix.py`:** builds the engine support matrix
purely from committed data (RFC 0015 §11). It needs no GPU, no plugin
and no DVC pull.
- **Full matrix:** `SUPPORT_MATRIX.md` is **generated, not committed**
(git-ignored). Run the script to get a local copy.
- **Overview:** `SUPPORT_MATRIX_OVERVIEW.md` (`--overview-only`) **is
committed**. CI fails when it is stale (the
`hipdnn_support_matrix_renderer_python_tests` ctest re-renders it from
the committed sidecars), so it is regenerated in the same commit as the
sidecar change. There is no bot job.
- **`bundle_discovery.py`:** the renderer and `verify_support_claims.py`
share one Python copy of `BundleDiscovery.hpp`, so they agree on what a
bundle is.
- **`support_features/`:** feature coverage per op. The matrix counts
graphs; this counts the share of each op's API features (catalogued from
the flatbuffers schema) that some bundle graph exercises, and that some
claimed graph exercises per arch. `feature_matrix.py` lays the same
shares out like the support matrix.

```bash
python3 dnn-providers/integration-tests/scripts/render_support_matrix.py                  # full matrix
python3 dnn-providers/integration-tests/scripts/render_support_matrix.py --overview-only  # committed overview
python3 dnn-providers/integration-tests/scripts/support_features/coverage.py             # feature coverage per op
python3 dnn-providers/integration-tests/scripts/support_features/feature_matrix.py --output feature_matrix.md
```

## Details

- **Sections and columns:** every `(arch, platform)` target gets its own
section, and every engine is a column. Every op is a row, claimed or
not.
- **Variant tags:** rows split by variant using feature tags read off
the graph (`multi_batch`, `grouped`, `stride`, `dilation`, `padding`)
and by dtype.
- **Bundles without a sidecar:** they count in the denominator and in no
numerator. That gap is what once reported `Sdpa 12/12` for 35 graphs.
- **Tier-independent:**
- Bundles are found by walking the tree recursively. The first path
segment is the tier and the second is the op; nothing is hardcoded.
- A bundle's identity doesn't include its tier, so moving a case between
tiers changes only the tier list in its provenance comment.
- Copies of the same bundle in two tiers are merged; copies holding
different graphs are an error.
- **Fails loudly on:**
  - an orphan sidecar;
  - a sidecar with the wrong shape;
  - an unknown sidecar `version`;
  - a bundle that doesn't sit under `<tier>/<op>/`;
- a sweep case naming a tensor uid its template doesn't have (mirrors
`buildCaseTensorMap()`);
- a graph using a value its feature catalog doesn't name, such as a new
dtype or an uncatalogued head dim (`support_features/`).
- **Nothing hardcoded:** arch headings are the bare gfx target, and the
regenerate command is derived from where the script lives.

## Test plan

- [x] 193 renderer and bundle-discovery tests and 1715 feature-coverage
tests pass, including:
  - tier-move, deduplication, conflict, orphan, shape and version tests;
  - an independent recount of every overview cell.
- [x] All three suites are registered as ctests
(`hipdnn_bundle_discovery_python_tests`,
`hipdnn_support_matrix_renderer_python_tests`,
`hipdnn_support_features_python_tests`), so `hipdnn-superbuild-ci` runs
them on Linux and Windows. A planted failure in the renderer suite makes
its ctest fail.
- [x] Real-tree checks: the tree renders with 0 errors, two renders
agree byte for byte, and the committed overview matches a fresh render.
Removing one claim from a sidecar without regenerating fails the test
with the regenerate command.
- [x] Pre-commit passes. The top-level exclude hides
`integration-test-bundles/` from every hook, so bundle data is checked
by the ctest; the hooks fire on script changes.
- [ ] CI

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Adam Dickin <adam.dickin@amd.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants