Repository navigation
[miopen-provider] Add test filter standardization - #7901
Merged
Merged
Conversation
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>
Pre-commit's check-yaml hook (ruamel.yaml strict load) failed on PR #7901 with: while constructing a mapping in "dnn-providers/miopen-provider/test_categories.yaml", line 24, column 1 found duplicate key "exclude_gpu" with value "{}" (original value: "{}") in "dnn-providers/miopen-provider/test_categories.yaml", line 120, column 1 When commit 5e7616b ("[miopen-provider] Add Windows+gfx110X exclusion for integration tests") replaced the unscoped exclude_gpu block with an OS-scoped variant (exclude_gpu_gfx110X_windows), it appended the new block instead of replacing the old one, leaving two top-level `exclude_gpu:` mappings in the document. YAML 1.2 (and the ruamel.yaml loader used by pre-commit's check-yaml) forbid duplicate mapping keys. Drop the older unscoped `exclude_gpu:` block (with the bare `exclude_gpu_gfx110X` inner key) and keep only the OS-suffixed `exclude_gpu_gfx110X_windows` block, which is what was intended in 5e7616b: the parser's OS-suffix support (added in this PR's shared/ctest/parse_test_categories.py change) makes the entry skip Linux configures entirely, matching the legacy test_miopenprovider.py TEST_TO_IGNORE map's Windows-only scope. Verified locally: - `ruamel.yaml` strict-load succeeds (top-level keys: _common_excludes, test_categories, exclude_gpu, execution_settings). - Parser dry-run on Linux: 4 base add_test entries, 0 ex_gpu_gfx110X entries (block correctly skipped). - Parser dry-run on Windows: 4 base + 4 ex_gpu_gfx110X entries = 8 total; ex_gpu_gfx110X-labeled suites carry --gtest_filter=*Integration* for runtime ex-clusion of the integration binary on gfx110X hosts, exactly matching the legacy --exclude-regex carve-out. Co-authored-by: Cursor <cursoragent@cursor.com>
geomin12
reviewed
Jun 16, 2026
adickin-amd
reviewed
Jun 17, 2026
adickin-amd
reviewed
Jun 17, 2026
…ble-install Consolidate the install-tree CTestTestfile.cmake to a single install, run after the external integration test target so its staged add_test() snippet is folded into the labeled file (fixes the labeled file being overwritten by a second install_provider_ctest_files() call). Categorize miopen-provider-external-integration-check through a dedicated test_categories_external.yaml driven by apply_ctest_category_labels(), placed in the quick tier so it runs in all categories (matching legacy test_miopenprovider.py). Apply labels to both the install tree and build tree. Emit the staged external add_test() name double-quoted instead of as a [=[ ]=] bracket argument so the shared category parser can discover it. Co-authored-by: Cursor <cursoragent@cursor.com>
adickin-amd
approved these changes
Jun 19, 2026
adickin-amd
left a comment
Contributor
There was a problem hiding this comment.
looks like the tests are running as expected for the CI so approved!
aalabsi-amd
approved these changes
Jun 23, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
dileepr1
added a commit
to ROCm/TheRock
that referenced
this pull request
Jun 26, 2026
## Motivation Add test filter standardisation for miopen-provider. This works with the companion PR ROCm/rocm-libraries#7901 ## Technical Details - `fetch_test_configurations.py`: miopenprovider `test_script` -> `test_runner.py` so the generic runner drives `ctest` from `THEROCK_BIN_DIR/miopen_plugin` using the quick/standard/comprehensive/full category labels (replacing the legacy `test_miopenprovider.py` one-off). - `test_runner.py`: add `miopenprovider -> miopen_plugin` to `COMPONENT_DIR_MAPPING` so the job name maps to the actual install dir name under `THEROCK_BIN_DIR`. - `ml-libs/artifact-miopenprovider.toml`: broaden the test-component include to `bin/miopen_plugin/**` so the YAML-generated install-tree `CTestTestfile.cmake` (and the binaries it references via relative paths) ship in the artifact. The companion rocm-libraries change in `users/dravindr/tf_miopen_prov` writes that file to `bin/miopen_plugin/CTestTestfile.cmake`. ## Test Plan Confirm that the CI tests for miopen-provider work once ROCm/rocm-libraries#7901 is merged. ## Submission Checklist - [ ] Look over the contributing guidelines at https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests. Made with [Cursor](https://cursor.com) Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 installedbin/miopen_plugin/tree via the generictest_runner.py(replacing the legacytest_miopenprovider.pyone-off).More details available at test_filtering.md.
Paired TheRock branch:
users/dravindr/tr_miopen_prov(PR forthcoming) — switches themiopenproviderjob'stest_scripttotest_runner.py, addsmiopenprovider -> miopen_plugintoCOMPONENT_DIR_MAPPING, and broadensartifact-miopenprovider.toml's test include tobin/miopen_plugin/**.Reference (canonical pattern):
ROCm/rocm-libraries#3513+ROCm/TheRock#3097(miopen).Changes
dnn-providers/miopen-provider/test_categories.yaml(new)Added the test_categories.yaml for test selection
dnn-providers/miopen-provider/CMakeLists.txtROCM_LIBRARIES_ROOT(guardedif NOT DEFINED) soshared/ctest/TestCategories.cmakeis discoverable from the monorepo root.finalize_test_targets(...), callapply_test_category_labels()once per test binary, writing both sets of_quick_suite/_standard_suite/_comprehensive_suite/_full_suiteentries into a single install-timeCTestTestfile.cmakewith relative paths (../miopen_plugin_tests,../miopen_plugin_integration_tests).CTestTestfile.cmaketobin/miopen_plugin/when shared/ctest is available; otherwise fall back to the project's existinginstall_provider_ctest_files()so standalone / sparse checkouts that lackshared/ctest/keep working with their current unlabeled install file..github/actions/ci-env/action.yml(WIP — revert before merge)Bumps the
therock-refoutput from the pinned 2026-05-29 SHA (685f8c3b890063...) to the paired TheRock branchusers/dravindr/tr_miopen_prov. This file is the single source of truth fortherock-ci-linux.yml,therock-ci-windows.yml,therock-ci.yml,therock-test-component.yml, andtherock-test-packages.yml, so this one edit replaces what would otherwise be four parallel diffs.Must be reverted to a pinned
ROCm/TheRockSHA before merge, once the paired TheRock PR lands and gives us a stable commit onmain.Test plan
users/dravindr/tr_miopen_provproduces amiopenproviderartifact whosebin/miopen_plugin/CTestTestfile.cmakelists all 8*_suiteentries with labels.therock-test-component.yml/therock-test-packages.ymlruns of themiopenproviderjob invoketest_runner.pywithTEST_COMPONENT=miopenproviderandTEST_TYPE=quickand pass..github/actions/ci-env/action.ymlto a pinnedROCm/TheRockSHA once the paired TheRock PR is merged.Made with Cursor