Skip to content

test(hipdnn): trim ffm-quick: skip tests that cannot run on FFM, mirror quick for miopen - #14657

Merged
adickin-amd merged 5 commits into
developfrom
users/addickin/sdpa_ffm_quick_investigation
Nov 3, 2026
Merged

adickin-amd merged 5 commits into
developfrom
users/addickin/sdpa_ffm_quick_investigation

Conversation

@adickin-amd

@adickin-amd adickin-amd commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Keep tests that cannot finish or pass on the FFM simulator out of the ffm-quick tier. The quick-tier SDPA golden-data GPU-reference cases take minutes each on FFM (hours for the largest bundles), and StallGateExcludesHostSubmissionDelay asserts a timing property FFM does not provide. Real-GPU lanes are unchanged. Separately, the miopen-provider ffm-quick tier now selects the same tests as its quick tier instead of a hand-kept list of sweep-case ids.

JIRA ID : ROCM-33200

Risk Assessment

Risk level 2. Test selection and CTest registration only; no product code is touched. The one shared-code change is an additive, optional key in shared/ctest/parse_ctest_categories.py that no existing yaml uses. The check targets in hipDNN now match their label exactly.

ASIC Coverage

No ASIC-specific behavior changes. PR CI is sufficient: every other tier and lane selects the same tests as before. Only ffm-quick selects fewer tests. The FFM lane itself was not run for this change.

Testing Summary

  • Filter generation: parse_test_categories.py emits --gtest_filter=…:quick_SdpaFwd_*_GpuRef.* for the ffm-quick suite of the integration-tests binaries.
  • Build tree (Windows, hipdnn preset, configure + hipdnn_backend_tests build): ctest -L '^ffm-quick$' selects hipdnn_backend_tests_ffm-quick_suite and not the plain hipdnn_backend_tests. The suite ran 3678 tests and passed; the plain binary lists 3679, including the stall-gate test.
  • Installed CTestTestfile.cmake: the generated install file has the same split: plain entry without the ffm-quick labels, suite entry with the gtest filter and labels ffm-quick;ffm-full, timeout 7200.
  • Check targets: generated commands are -L "^quick$" and -L "^ffm-quick$".
  • Shared parser: new test_parse_ctest_categories.py (3 tests) and the existing test_parse_test_categories.py (42 tests) pass. Disabling the skip logic makes the build-tree test fail.

Testing Checklist

  • Shared ctest parser unit tests - python -m unittest discover -s shared/ctest/tests - Status: Passed
  • hipDNN configure + hipdnn_backend_tests build, label selection and suite run - ctest -N -L '^ffm-quick$', ctest -R hipdnn_backend_tests_ffm-quick_suite - Status: Passed
  • pre-commit (black, cmake-lint, check-yaml) - Status: Passed
  • FFM lane run of ffm-quick - Status: Not run
  • PR CI - GitHub PR checks - Status: Pending

Technical Changes

  • dnn-providers/integration-tests/test_categories.yaml: ffm-quick excludes quick_SdpaFwd_*_GpuRef.*. The GPU SDPA reference recomputes QK^T per output element. On FFM the smallest quick bundle (1x8x256x128, 36 ms on MI300X) took 329 s, and the 2x32x2048x128 bundle had not finished after 40 minutes. referenceShapeIsAffordable() gates only the CPU reference, assuming the GPU reference is fast. Real-GPU lanes still run these cases and the CpuRef lane still validates the same bundles.
  • projects/hipdnn/test_categories_gtest.yaml (new) and add_hipdnn_test(... GTEST_CATEGORIES): test_categories.yaml labels whole CTest entries by name, so it cannot drop one gtest from a binary. A target that opts in also gets <target>_<category>_suite entries with a --gtest_filter, generated in the build tree and in the installed CTestTestfile.cmake. hipdnn_backend_tests opts in for ffm-quick and excludes TestGpuProfilingControlDescriptor.StallGateExcludesHostSubmissionDelay (stalled timing reported 100-112 ms against an expected < 5 ms on FFM).
  • exclude_tests in shared/ctest/parse_ctest_categories.py: per-category key; matching tests receive none of that category's labels. hipdnn_backend_tests is listed under ffm-quick so the plain entry does not also run the excluded test.
  • Exact label match in the check targets: ctest -L is a regex search, so hipdnn-quick-check (-L quick) also selected every ffm-quick test and would have run hipdnn_backend_tests twice. The label is now anchored, with VERBATIM so the anchors survive cmd.exe, where ^ is the escape character.
  • dnn-providers/miopen-provider/test_categories_integration.yaml: ffm-quick selects quick_*, Smoke/* and Quick/*, the same as the quick tier. It used to name six sweep-case ids, which are renamed whenever a sweep is regenerated, and the FFM run only exercised three of them. This enlarges the miopen ffm-quick selection; its FFM run time has not been measured.
  • Docs: projects/hipdnn/docs/TESTING.md describes the gtest-filter categories; the dnn-providers/integration-tests/docs passages about the exact-id list are removed.

…ases from ffm-quick

The GPU SDPA reference recomputes QK^T per output element. On the FFM simulator the smallest quick SdpaFwd bundle took 329 s and the 2x32x2048x128 bundle had not finished after 40 minutes. referenceShapeIsAffordable() gates only the CPU reference, assuming the GPU reference is fast; that does not hold on FFM. Real-GPU lanes still run these cases and the CpuRef lane still validates the same bundles.
…filter suite

StallGateExcludesHostSubmissionDelay asserts that a stalled start event leaves a 20 ms host delay out of the measured span. The FFM simulator does not honour the stall gate (112 ms stalled vs < 5 ms expected), so the test cannot pass there.

test_categories.yaml labels whole CTest entries by name and hipdnn_backend_tests is one entry, so it could not drop one gtest. add_hipdnn_test() takes a GTEST_CATEGORIES flag that also generates <target>_<category>_suite entries from the new test_categories_gtest.yaml, in the build tree and in the installed CTestTestfile.cmake. hipdnn_backend_tests opts in for ffm-quick.

The plain entry must not keep the ffm-quick label, or it still runs the excluded test. parse_ctest_categories.py gains a per-category exclude_tests key: matching tests receive none of that category's labels.

ctest -L is a regex search, so hipdnn-quick-check (-L quick) also selected every ffm-quick test and would run hipdnn_backend_tests twice. The check targets now anchor the label, with VERBATIM so the anchors survive cmd.exe, where ^ is the escape character.
ffm-quick named six sweep-case ids, one per op. Those ids are renamed whenever a sweep is regenerated, and the FFM run only exercised three of them; the other three skipped. Select quick_* and Smoke/* instead, so FFM gets the same bundle coverage as the quick tier without a list to maintain. Drop the doc passages that described the exact-id list.
@adickin-amd adickin-amd changed the title test(hipdnn): keep tests that cannot run on FFM out of ffm-quick test(hipdnn): trim ffm-quick: skip tests that cannot run on FFM, mirror quick for miopen Oct 29, 2026
@therock-pr-bot

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

Copy link
Copy Markdown

✅ All Checks Passed — Ready for Review

Check Status Details
📝 PR Description ✅ Pass —
⛔ Forbidden Files ✅ Pass —
🧪 Unit Test ✅ Pass —
🔎 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.

…test categories

add_hipdnn_test(... GTEST_CATEGORIES) ended configure with FATAL_ERROR when shared/ctest was absent. The hipDNN Superbuild CI sparse checkout, and the standalone projects/hipdnn checkout that Building.md documents, have no shared/, and the rest of Tests.cmake already treats that as 'skip CTest categories'. Skip the gtest-filter suites the same way. A missing test_categories_gtest.yaml next to a present shared/ctest is a warning, because it drops the target out of the categories that file defines.
Comment thread projects/hipdnn/cmake/Tests.cmake Resolved
@codecov

codecov Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #14657      +/-   ##
===========================================
- Coverage    77.51%   77.40%   -0.11%     
===========================================
  Files         2903     2902       -1     
  Lines       490383   488594    -1789     
  Branches     74218    73851     -367     
===========================================
- Hits        380081   378158    -1923     
- Misses       85389    85591     +202     
+ Partials     24913    24845      -68     
Flag Coverage Δ *Carryforward flag
TensileLite-CPP 50.82% <ø> (-0.14%) ⬇️ Carriedforward from 159725d
TensileLite-Unit 84.14% <ø> (-0.19%) ⬇️ Carriedforward from 159725d
hipBLAS 90.62% <ø> (ø) Carriedforward from 159725d
hipBLASLt 68.55% <ø> (-0.22%) ⬇️ Carriedforward from 159725d
hipCUB 82.68% <ø> (ø) Carriedforward from 159725d
hipDNN 87.25% <ø> (ø)
hipFFT 38.02% <ø> (-4.44%) ⬇️ Carriedforward from 159725d
hipRAND 76.12% <ø> (ø) Carriedforward from 159725d
hipSOLVER 69.67% <ø> (ø) Carriedforward from 159725d
hipSPARSE 87.03% <ø> (ø) Carriedforward from 159725d
rocBLAS 68.95% <ø> (-0.25%) ⬇️ Carriedforward from 159725d
rocFFT 47.34% <ø> (+0.06%) ⬆️ Carriedforward from 159725d
rocRAND 57.31% <ø> (-0.01%) ⬇️ Carriedforward from 159725d
rocSOLVER 76.74% <ø> (ø) Carriedforward from 159725d
rocSPARSE 83.54% <ø> (-<0.01%) ⬇️ Carriedforward from 159725d
rocThrust 93.15% <ø> (ø) Carriedforward from 159725d

*This pull request uses carry forward flags. Click here to find out more.
see 174 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@adickin-amd
adickin-amd marked this pull request as ready for review November 3, 2026 15:20
@adickin-amd
adickin-amd requested a review from a team as a code owner November 3, 2026 15:20

@mousdahl-amd mousdahl-amd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, after deep review analysis

@adickin-amd
adickin-amd merged commit 10dc0c5 into develop Nov 3, 2026
486 of 494 checks passed
@adickin-amd
adickin-amd deleted the users/addickin/sdpa_ffm_quick_investigation branch November 3, 2026 22:08
@assistant-librarian

Copy link
Copy Markdown
Contributor

TheRock Submodule Bump Activity

Newest first

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.

2 participants