Skip to content

[miopen-provider] Add test filter standardization#7901

Draft
dileepr1 wants to merge 3 commits into
developfrom
users/dravindr/tf_miopen_prov
Draft

[miopen-provider] Add test filter standardization#7901
dileepr1 wants to merge 3 commits into
developfrom
users/dravindr/tf_miopen_prov

Conversation

@dileepr1
Copy link
Copy Markdown
Contributor

Summary

Adds YAML-driven CTest test categorization for the miopen-provider plugin so TheRock CI can drive ctest -L {quick|standard|comprehensive|full} from the installed bin/miopen_plugin/ tree via the generic test_runner.py (replacing the legacy test_miopenprovider.py one-off). Follows the Test Filter Standardization (RFC0010) pattern previously rolled out for miopen, hipsolver, rocblas, etc.

Paired TheRock branch: users/dravindr/tr_miopen_prov (PR forthcoming) — switches the miopenprovider job's test_script to test_runner.py, adds miopenprovider -> miopen_plugin to COMPONENT_DIR_MAPPING, and broadens artifact-miopenprovider.toml's test include to bin/miopen_plugin/**.

Reference (canonical pattern): ROCm/rocm-libraries#3513 + ROCm/TheRock#3097 (miopen).

Changes

dnn-providers/miopen-provider/test_categories.yaml (new)

Tier definitions shared by both miopen_plugin_tests (unit) and miopen_plugin_integration_tests:

  • quick / standard — exclude Full* parameterised expansions, mirroring the legacy GTEST_FILTER=\"-Full*\" filter in TheRock/build_tools/github_actions/test_executable_scripts/test_miopenprovider.py.
  • comprehensive / full — include Full*, exclude only *DISABLED*.

standard is intentionally the same shape as quick because miopen-provider has no Standard* INSTANTIATE_TEST_SUITE_P prefixes — only Smoke* and Full* exist in integration_tests/, and tests/ is mostly bare TEST_F / AllCases.

dnn-providers/miopen-provider/CMakeLists.txt

  • Set ROCM_LIBRARIES_ROOT (guarded if NOT DEFINED) so shared/ctest/TestCategories.cmake is discoverable from the monorepo root.
  • After finalize_test_targets(...), call apply_test_category_labels() once per test binary, writing both sets of _quick_suite / _standard_suite / _comprehensive_suite / _full_suite entries into a single install-time CTestTestfile.cmake with relative paths (../miopen_plugin_tests, ../miopen_plugin_integration_tests).
  • Install the YAML-generated CTestTestfile.cmake to bin/miopen_plugin/ when shared/ctest is available; otherwise fall back to the project's existing install_provider_ctest_files() so standalone / sparse checkouts that lack shared/ctest/ keep working with their current unlabeled install file.

.github/actions/ci-env/action.yml (WIP — revert before merge)

Bumps the therock-ref output from the pinned 2026-05-29 SHA (685f8c3b890063...) to the paired TheRock branch users/dravindr/tr_miopen_prov. This file is the single source of truth for therock-ci-linux.yml, therock-ci-windows.yml, therock-ci.yml, therock-test-component.yml, and therock-test-packages.yml, so this one edit replaces what would otherwise be four parallel diffs.

Must be reverted to a pinned ROCm/TheRock SHA before merge, once the paired TheRock PR lands and gives us a stable commit on main.

Dry-run verification

Ran the shared parser locally against the YAML for both binaries to confirm the generated install-tree entries:

add_test(miopen_plugin_tests_quick_suite \"../miopen_plugin_tests\" --gtest_filter=*-*DISABLED*:Full*)
set_tests_properties(miopen_plugin_tests_quick_suite PROPERTIES LABELS \"quick;pre-commit;smoke\" TIMEOUT 300)
...
add_test(miopen_plugin_integration_tests_full_suite \"../miopen_plugin_integration_tests\" --gtest_filter=*-*DISABLED*)
set_tests_properties(miopen_plugin_integration_tests_full_suite PROPERTIES LABELS \"full;all\" TIMEOUT 28800)

8 entries total (4 tiers × 2 binaries), all labels cumulative as expected. Quick/standard equivalent to the legacy script's filter; comprehensive/full open up the Full* tier.

Test plan

  • CI build (Linux) on users/dravindr/tr_miopen_prov produces a miopenprovider artifact whose bin/miopen_plugin/CTestTestfile.cmake lists all 8 *_suite entries with labels.
  • CI build (Windows) ditto.
  • therock-test-component.yml / therock-test-packages.yml runs of the miopenprovider job invoke test_runner.py with TEST_COMPONENT=miopenprovider and TEST_TYPE=quick and pass.
  • Repeat for TEST_TYPE=standard and confirm scope still excludes Full*.
  • Revert .github/actions/ci-env/action.yml to a pinned ROCm/TheRock SHA once the paired TheRock PR is merged.

Made with Cursor

dileepr1 and others added 2 commits May 29, 2026 16:09
Add YAML-driven CTest test categorization for the miopen-provider plugin
so TheRock CI can drive `ctest -L {quick|standard|comprehensive|full}`
from the installed bin/miopen_plugin/ tree via the generic test_runner.py
(replacing the legacy test_miopenprovider.py one-off).

- dnn-providers/miopen-provider/test_categories.yaml: tier definitions
  shared by both miopen_plugin_tests (unit) and miopen_plugin_integration_tests.
  quick / standard exclude Full* parameterised expansions to match the
  legacy GTEST_FILTER="-Full*" used by test_miopenprovider.py;
  comprehensive / full include them.
- dnn-providers/miopen-provider/CMakeLists.txt:
  - Set ROCM_LIBRARIES_ROOT so shared/ctest/TestCategories.cmake is
    discoverable from the monorepo root (guarded with EXISTS so
    standalone / sparse checkouts keep building).
  - Call apply_test_category_labels() once per test binary, writing both
    sets of suites into a single install-time CTestTestfile.cmake with
    relative paths (../miopen_plugin_tests, ../miopen_plugin_integration_tests).
  - Install the YAML-generated CTestTestfile.cmake to bin/miopen_plugin/
    when available; otherwise fall back to install_provider_ctest_files()
    so standalone builds keep their existing unlabeled install file.

Paired with the TheRock branch users/dravindr/tr_miopen_prov which
switches the miopenprovider job's test_script to test_runner.py, adds
miopenprovider -> miopen_plugin to COMPONENT_DIR_MAPPING, and broadens
artifact-miopenprovider.toml's test include to bin/miopen_plugin/**.

Co-authored-by: Cursor <cursoragent@cursor.com>
…n_prov

Bump the therock-ref output in .github/actions/ci-env/action.yml from
the pinned 2026-05-29 SHA (685f8c3b890063...) to the paired TheRock
branch users/dravindr/tr_miopen_prov, so all therock-* workflows
(therock-ci-linux.yml, therock-ci-windows.yml, therock-ci.yml,
therock-test-component.yml, therock-test-packages.yml) build and test
against the TheRock state that:

- switches the miopenprovider job's test_script to test_runner.py, and
- bundles bin/miopen_plugin/** (including the YAML-generated install-tree
  CTestTestfile.cmake from the previous commit) in the miopenprovider
  artifact.

Without this paired ref, the build artifact would be missing the
install-tree CTestTestfile.cmake and test_runner.py would fail with
"Test directory does not exist: build/bin/miopen_plugin".

WIP: revert to a pinned ROCm/TheRock SHA before merge, once the paired
TheRock PR lands and gives us a stable commit on main.

Co-authored-by: Cursor <cursoragent@cursor.com>
Mirrors the legacy TEST_TO_IGNORE map in
TheRock/build_tools/github_actions/test_executable_scripts/test_miopenprovider.py
which excluded the miopen_plugin_integration_tests ctest entry on
Windows+gfx110X only (TODO #3709).

- shared/ctest/parse_test_categories.py: teach the parser an optional
  `_(windows|linux)` suffix on exclude_gpu_* keys. Keys without a suffix
  (e.g. exclude_gpu_gfx950) stay OS-agnostic and behave exactly as
  before, so every existing YAML continues to parse identically. Keys
  with a suffix are skipped at YAML-parse time on the wrong OS, so the
  entry never reaches the install file for that platform. The runtime
  label stays `ex_gpu_<arch>` so test_runner.py's GPU-arch matching
  needs no changes. Same change is independently being landed via
  users/dravindr/tf_rocprim (commit ef8eee2); whichever PR merges
  first, the other will be a clean no-op.

- dnn-providers/miopen-provider/test_categories.yaml: add
  exclude_gpu_gfx110X_windows with test_patterns: ["*Integration*"].
  All TEST_P classes in integration_tests/ are named IntegrationGpu*
  and none in tests/ contain "Integration", so the filter is a no-op
  on miopen_plugin_tests and a full exclusion on
  miopen_plugin_integration_tests, matching the legacy script's
  ctest --exclude-regex "miopen_plugin_integration_tests" exactly.

Co-authored-by: Cursor <cursoragent@cursor.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.

1 participant