← Back to Pull requests

test(miopen): name gtest prefixes after test_categories tiers #15490

Closed
unknown closed this pull request without merging on Nov 23, 2026 23:46 UTC
View on GitHub
unknown unknown commented on Nov 10, 2026 17:19 UTC
Author

JIRA ID : ALMIOPEN-1197

Motivation

The prefix on a MIOpen gtest name (Smoke/, Full/, Standard/, Perf/, Unit/) did not say where the test runs:

  • 276 Full/ suites run on every PR (standard tier). Full/GPU_Softmax alone is about 30% of standard time.

  • Full/ was also used for suites that run only nightly, only in full, or in no tier at all.

  • The Smoke<Variant>/ suites (SmokeNhwc/, SmokeDense/, …) never ran in quick, because Smoke/ does not match them.

  • test_categories.yaml worked by hand-kept lists:

  • - about 95 family globs to select tests;
    - long Full/... exclude lists to drop the slower instantiations from the lower tiers;
    - about 25 unprefixed GPU suites named one by one, repeated in three tiers.

    A new test that missed the right lists ran nowhere, with no error.

  • 152 plain TEST/TEST_F suites had no prefix. Quick needed its own CPU_ pattern, and the -DMIOPEN_TEST_ALL=Off filter (Smoke) did not match them.
  • After this PR, a test's prefix is the tier that first runs it, and every tier selects by prefix only. To add a test you pick its prefix; to move a test to another tier you rename its prefix. No YAML edit is needed.

    Technical Details

    1. Prefix rename (parameterized instantiations)

    Each suite's tier comes from the origin/develop test_categories.yaml on gfx94X Linux, ignoring the per-GPU excludes.

    | Old prefix | New prefix | Suites |
    |---|---|---|
    | Smoke/ | Quick/ | 762 |
    | Smoke/GPU_MIOpenDriverGemmTest_FP16 (excluded from quick) | Standard/ | 1 |
    | Smoke<Variant>/ (all ran in standard) | Standard<Variant>/ | 198 |
    | Full/ that already ran in standard | Standard/ | 276 |
    | Full<Variant>/ (FullSUM, FullSubbatch, …) | Standard<Variant>/ | 25 |
    | Full/ that ran only in comprehensive | Comprehensive/ | 121 |
    | Full/ that ran only in full | Full/ | 31 |
    | Full/ that no tier runs (DeepBench, MIOpenTestConv, ConvGrpActivInfer, Lrn, Reduce_FP64, …) | Full/, still excluded in full | 49 |
    | Perf/GPU_PReLU_bwd_ | StandardPerf/ (Standard/ was taken by the renamed Full/ copy) | 3 |
    | Unit/CPU_SplitKValidation_Parameterized_NONE | Standard/ | 1 |

    X_INSTANTIATE_CAST (binary_tensor_ops.cpp) now takes a TIER argument, because one macro instantiates both Comprehensive and Full type pairs.

    2. Plain TEST/TEST_F suites get a prefix too

  • All 152 non-shim plain suites are now TEST_P on ::testing::TestWithParam<int>, through either a fixture base or a using alias. Each has one INSTANTIATE_TEST_SUITE_P(<Tier>, Suite, ::testing::Values(0)), so a test is named

  • <Tier>/Suite.Test/0.
    - 114 CPU suites → Quick/, except CPU_PerfDb_NONE → Standard/ (quick excluded it before).
    - 25 GPU suites that standard named one by one → Standard/.
    - 13 GPU suites that no tier ran → Full/, excluded by name in full.
  • Six plain suites had the same name as a parameterized fixture. Merging them would run each test once per existing parameter, so they were renamed:

  • - CPU_DBSyncTarget_NONE
    - CPU_WrapperRoutingResolveDefault_NONE
    - CPU_WrapperRoutingDisabledSetReport_NONE
    - GPU_BN_SpatialRegression_FP32
    - GPU_HipBLASLtGEMMTestException_{FP32,FP16,BFP16,FP8,BFP8}
    - GPU_PerfConfig_HipImplicitGemm3DGroupFwdXdlopsSearch_FP16
  • Strings that name a converted test use the new names:

  • - the child-worker filter in perfdb.cpp
    - wrapper_reentry_macro in test/gtest/CMakeLists.txt
    - DEFAULT_FILTER in script/check_plugin_reentry.py
  • The hipDNN shim tests (HipdnnShim) stay plain, because the forwarding_parity entries replay them by name.
  • 3. test_categories.yaml selects by prefix

    | Tier | test_patterns |
    |---|---|
    | quick | Quick
    / |
    | standard | Quick
    /, Standard/ |
    | comprehensive | the standard patterns plus Comprehensive
    / |
    | full | the comprehensive patterns plus Full
    / |

  • Removed:

  • - the family allowlist
    - the list of unprefixed GPU suites
    - every exclude whose only job was to remove higher-tier suites
    - the dead BigTensor exclude
  • Kept, operational only:

  • - the per-GPU quarantines, renamed to the new names
    -
    DISABLED
    - in full: the DeepBench / MIOpenTestConv option gates and the suites that no tier runs
  • Repeated in standard, comprehensive and full: two excludes for quick-only cases, HipdnnShim and the V4R1Fwd_BFP16/0 case. The tiers are cumulative, so every tier above quick has to drop these itself.
  • 4. Guards and other references

  • test/utils/gtest_formating_checks.py (pre-commit) now rejects a plain TEST/TEST_F outside the HipdnnShim surface, because an unprefixed suite runs in no tier.

  • - Both this check and test/gtest/check_names.py (CI) accept only Quick|Standard|Comprehensive|Full, plus an optional suffix, as an instantiation prefix.
  • In test/gtest/CMakeLists.txt, the -DMIOPEN_TEST_ALL=Off prefix is now Quick (it was Smoke), and the add_gtest_negative_filter names use the new prefixes.

  • Docs: test/gtest/README.md, projects/miopen/AGENTS.md, the Jenkinsfile TestSet comment, and the source comments.
  • Behaviour changes

  • TheRock tiers: none. Every tier selects the same tests, under the new names (see Test Result).

  • Jenkins PR stages (MIOPEN_TEST_ALL=On, FP32:NONE): unchanged.

  • -DMIOPEN_TEST_ALL=Off runs (Jenkins debug/UBSan smoke, local make check): they now run exactly the quick tier, including the CPU tests. They no longer run the old Smoke<Variant>/ suites, which are now Standard<Variant>/.

  • Test names: plain tests gain a prefix and a /0 suffix, so their dashboard history starts fresh.
  • Test Plan

  • CI binaries, Linux and Windows filters.

  • - Downloaded miopen_gtest from develop run 44408719040 (602c8b16a2a) and from this PR's run 44424949817.
    - Listed each binary with the exact --gtest_filter of every suite in its installed bin/MIOpen/CTestTestfile.cmake. For Windows, the filters were regenerated from each side's YAML.
    - Mapped every develop test name to its new name and compared the name sets, not just the counts.
  • Offline model on the latest rebase. Compared develop's YAML selecting the old names with this branch's YAML selecting the new names, for every tier on 9 GPU/OS combinations: no GPU excludes, gfx942, gfx1101 Linux/Windows, gfx1151

  • Linux/Windows, gfx1201 Linux/Windows, gfx950.
  • Compile: every changed test/gtest source file passes clang++ -fsyntax-only with CI's compile flags.

  • Static checks:

  • - gtest_formating_checks.py passes on the whole test folder; a scratch file confirmed that it rejects a plain TEST/TEST_F and allows shim suites.
    - check_names.py passes on the new names.
    - test_check_plugin_reentry.py: 27 passed.
    - parse_test_categories.py generates the same 21 ctest suites.
    - pre-commit passes.

    Test Result

    CI binaries, develop vs this PR. The sets of test names match in every cell, not just the counts:

    | Tier | Generic | gfx110X | gfx115X Linux / Windows | gfx120X Linux / Windows | gfx950 |
    |---|---|---|---|---|---|
    | quick | 13,819 / 13,819 | 13,693 / 13,693 | 13,694 / 13,694 | 13,694 / 13,694 | 13,805 / 13,805 |
    | standard | 35,064 / 35,064 | 27,191 / 27,191 | 27,243 / 27,243 · 27,245 / 27,245 | 27,245 / 27,245 · 27,247 / 27,247 | 35,050 / 35,050 |
    | comprehensive | 58,173 / 58,173 | 48,093 / 48,093 | 48,142 / 48,142 · 48,136 / 48,136 | 48,146 / 48,146 · 48,148 / 48,148 | 58,160 / 58,160 |
    | full | 62,371 / 62,371 | 52,278 / 52,278 | 52,327 / 52,327 · 52,321 / 52,321 | 52,331 / 52,331 · 52,333 / 52,333 | 62,358 / 62,358 |
    | ffm-quick | 499 / 499 | | | | |

  • Both binaries have 69,562 tests, and every develop test maps to exactly one PR test. The ctest labels are identical.

  • These counts come from listing on a gfx90a host. Some test generators query the GPU at registration, so CI's gfx942 runs list slightly fewer tests. Quick ran 13,449 cases there, the same number on develop and on this PR.

  • After rebasing onto develop d3d350a8a91, the offline model again shows no difference in any tier:
  • Full ran locally:
    The full tier ran locally on gfx942 (MI300X) with no failures, and the tests that changed most behave exactly as they do
    on develop, so there were no failures to trace back to the renaming.

    Builds. I used CI's own builds rather than building locally:
    - This PR: run 44664391473, head 3a3bd7415d8.
    - Develop: run 44659875822, at d3d350a8a91, the commit the PR is based on.

    Full tier on the PR build. It ran the exact miopen_gtest_full_suite filter from the build's CTestTestfile.cmake, split
    across 8 GPUs, about 65 minutes per shard.


    | Tests | Passed | Skipped | Failed |
    |---|---|---|---|
    | 62,384 | 57,309 | 5,075 | 0 |


    Most-changed tests, PR vs develop. These are the 186 suites whose code changed beyond a prefix rename: every
    TEST/TEST_F→TEST_P conversion, the renamed clashing suites, and the X_INSTANTIATE_CAST macro suites. That is 7,792 tests,
    including the converted suites that no tier runs. I ran them on both builds and compared each test's result through the
    old→new name map.


    | Build | Passed | Skipped | Disabled (not run) | Failed |
    |---|---|---|---|---|
    | Develop | 5,385 | 37 | 2,370 | 0 |
    | PR | 5,385 | 37 | 2,370 | 0 |

    No test changed status and none went missing. Specific checks:
    - perfdb.cpp starts child processes by test name. In the full run, 64 child processes ran with the new
    Quick/CPU_PerfDb_ChildWorker_NONE.ProcessWork/0 filter, and none printed "Running 0 tests".
    - The renamed or merged-fixture suites all ran: Standard/GPU_BN_SpatialRegression_FP32 passed,
    Standard/GPU_StreamTracker_FP32 passed 24/24, Comprehensive/GPU_binaryTensorOps_cast_
    passed 2,592/2,592, and
    Quick/CPU_LgbmPcfg matched develop.

    The one failure seen was a setup problem. My first attempt aborted in every shard with "rocBLAS … TensileLibrary.dat not
    found for gfx942". I had downloaded the PR artifacts before CI uploaded blas_lib_gfx942. After re-downloading, the lib
    sets matched develop's and the rerun was clean.

    What didn't run (CI's build doesn't compile these):
    - The hipDNN-wrapper tests: 10 Quick/CPU_WrapperRouting
    suites, Quick/CPU_HipdnnEraseOutsideLock_NONE and
    Full/GPU_HipdnnReentry_FP32. They are only built with -DMIOPEN_ENABLE_HIPDNN_WRAPPER=ON. The repo's flag-on workflow is
    dispatch-only and runs no GPU tests either.
    - Two feature-off stubs: Quick/CPU_CandidateSelectionDisabled_NONE and Quick/CPU_ConvNDKernelTuningDisabled_NONE. They are
    only compiled when the AI feature is disabled.
    - So far these are only syntax-checked and pass the naming check. Running them needs a wrapper-ON build of MIOpen plus
    hipDNN, which takes hours. Say if you want me to do that.

    Selection check. I also listed these two CI binaries with every ctest suite's filter. All 21 suites select the same tests
    on develop and the PR, and both binaries contain 69,575 tests. Generic counts on this commit:

    | Tier | Tests |
    |---|---|
    | quick | 13,830 |
    | standard | 35,077 |
    | comprehensive | 58,186 |
    | full | 62,384 |
    | ffm-quick | 499 |

    Submission Checklist

  • I have added automated tests relevant to the introduced functionality (the new pre-commit rule in gtest_formating_checks.py; selection shown to be identical)

  • I have sufficient test coverage for the changes, and code coverage hasn't decreased as a result of my PR

  • I have ran the tests, and they are all passing locally (not run on a GPU; tier selection verified by listing CI binaries)

  • I have added relevant documentation for the changes (test/gtest/README.md, AGENTS.md, test_categories.yaml header)

  • I have removed the stale documentation which is no longer relevant after this pull request

  • I have ran make format & make check_format to ensure the changes have been formatted (via pre-commit clang-format)
  • Diff: 650 lines (+487 / -163) across 8 files Reviewer: JonathanLichtnerAMD Review duration: 19106m
    All Vouch review confidence checks passed
    Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.52 · 650 lines diff across 8 files
    0.52
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.388
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #15490"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 52% (MEDIUM) · Higher = larger blast radius
    52%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 20.5% · Safe to merge
    20.5%