test(integration-tests): port GTest categorization to shared YAML filters - #10243
Open
adickin-amd wants to merge 2 commits into
Open
test(integration-tests): port GTest categorization to shared YAML filters#10243adickin-amd wants to merge 2 commits into
adickin-amd wants to merge 2 commits into
Conversation
Switch dnn-providers/integration-tests' two local GTest binaries (hipdnn_integration_tests_unit_tests, hipdnn_gpu_ref_tests) from the mixed add_unit_test_target()/add_tiered_test_target() scheme to the shared GTest-filter test_categories.yaml applied via apply_test_category_labels(), matching miopen-provider. - dnn-providers/cmake/Tests.cmake: broaden the raw add_test() suppression gate in _add_test_target_internal to also fire on DNN_PROVIDER_TEST_CATEGORY_YAMLS (integration-tests has no external plugin ctest entry, so it never sets DNN_PROVIDER_CTEST_CATEGORIES_YAML). Verified no-op for existing providers, which set both variables. - dnn-providers/integration-tests/test_categories.yaml: full rewrite reproducing add_tiered_test_target()'s quick/standard/comprehensive/ full cascade as GTest filters instead of a CTest-name-regex file. - dnn-providers/integration-tests/tests/CMakeLists.txt: register hipdnn_gpu_ref_tests via add_integration_test_target() instead of the now-unused add_tiered_test_target(). - dnn-providers/integration-tests/CMakeLists.txt: enable YAML categorization before add_subdirectory(gpu-ref|tests), then apply apply_test_category_labels() to both binaries after finalize_test_targets(), with install staging mirroring miopen-provider. Creates the working directory (CMAKE_BINARY_DIR/bin) up front since it does not exist yet on a from-scratch configure and apply_test_category_labels() validates it eagerly. Verified via the miopen-provider superbuild preset: configure enables categorization for both hipdnn-integration-tests and miopen-provider with no warnings; `ctest -N` lists exactly the 9 expected suites (no legacy add_tiered_test_target names, no unfiltered entries); -L quick/standard/full label cascades match spec; generated suite --gtest_filter/TIMEOUT/LABELS match the YAML. Regression-checked the shared Tests.cmake gate: miopen-provider's 28-suite set is unchanged with vs. without the OR. Ran hipdnn_gpu_ref_tests_standard_suite for real on GPU (gfx1151): 606/606 tests passed, all Standard/*, zero Smoke/Quick leakage.
adickin-amd
commented
Jul 31, 2026
adickin-amd
commented
Jul 31, 2026
adickin-amd
commented
Jul 31, 2026
adickin-amd
commented
Jul 31, 2026
✅ All Checks Passed — Ready for Review
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
|
🎉 All checks passed! This PR is ready for review. |
… fixture - dnn-providers/cmake/Tests.cmake: remove add_tiered_test_target() and its TIERED_TEST_INSTALL_STAGING install-staging path — dead code now that integration-tests (its only caller) uses apply_test_category_labels() instead. Simplify _add_test_target_internal's YAML gate from `DNN_PROVIDER_CTEST_CATEGORIES_YAML OR DNN_PROVIDER_TEST_CATEGORY_YAMLS` to just `DNN_PROVIDER_TEST_CATEGORY_YAMLS`: every existing caller that sets the former (miopen-provider, hipblaslt-provider, hip-kernel-provider) also folds that same YAML path into the latter, so checking one variable covers both GTest-filter-only projects and providers with an external CTest-name YAML. - dnn-providers/integration-tests/CMakeLists.txt: drop the hipdnn_clear_miopen_test_cache FIXTURES_REQUIRED wiring — neither hipdnn_integration_tests_unit_tests nor hipdnn_gpu_ref_tests link against or call MIOpen, so the ASAN-only cache-clear fixture doesn't apply to them. - dnn-providers/integration-tests/README.md: update the two stale add_tiered_test_target() references (timeout-override note, new-op registration example) left over from the port. Reconfigured and re-verified: integration-tests still enables categorization and produces the identical 9-suite set with matching labels/timeouts; miopen-provider's 28-suite set is unchanged after the gate simplification.
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
Ports
dnn-providers/integration-tests' two local GTest binaries (hipdnn_integration_tests_unit_tests,hipdnn_gpu_ref_tests) from the mixedadd_unit_test_target()/add_tiered_test_target()scheme to the shared GTest-filtertest_categories.yamlapplied viaapply_test_category_labels(), matching howmiopen-providercategorizesmiopen_plugin_tests/miopen_plugin_integration_tests. The hardcoded gpu-ref tiers (quick/standard/comprehensive/full) move into the YAML with identical selection/label semantics;add_tiered_test_target()is no longer used by integration-tests. The externally-drivenhipdnn_integration_testsbundle binary is unaffected — it stays categorized by each provider's owntest_categories_integration.yaml.JIRA ID : ALMIOPEN-2278
Risk Assessment
Low risk. This is build/test-infrastructure plumbing confined to CTest registration and category labeling — it does not touch product source, kernel dispatch, or default runtime behavior. The shared-gate broadening in
Tests.cmakewas verified as a no-op for the three existing providers (they already set both YAML variables); the new categorization was verified end-to-end including a real GPU test run.ASIC Coverage
ASIC-independent plumbing. The change only affects which CTest suites are generated and how they filter GTest cases by name pattern; it does not add, remove, or alter any op, kernel, or dispatch path. Passing standard PR CI is sufficient — no dedicated multi-arch sweep is required.
Testing Summary
miopen-providerpreset, includes hipDNN + miopen-provider + integration-tests) and confirmed categorization enables cleanly with no warnings.--gtest_filter/TIMEOUT/LABELS.Tests.cmakegate change againstmiopen-provider's existing suites (stash/diff comparison).standardsuite on GPU hardware to confirm the GTest filter actually selects only the intended tier.Testing Checklist
git commit- Status: Passedmiopen-providerpreset) -cmake --preset miopen-provider -B build- Status: Passed (prints "YAML-based CTest categorization enabled" for both hipdnn-integration-tests and miopen-provider, zero warnings)ctest -N- Status: Passed (9 suites:hipdnn-integration-tests_test_name_validation+ 4hipdnn_integration_tests_unit_tests_*_suite+ 4hipdnn_gpu_ref_tests_*_suite; no legacyadd_tiered_test_targetnames, no unfiltered entries)ctest -N -L quick|standard|full- Status: Passed (3/4/8 tests respectively, matching the YAML's cumulative labels)ctest --show-only=json-v1- Status: Passed (--gtest_filter=Standard*-*DISABLED*,TIMEOUT=1800,LABELS=comprehensive,full,slow,standardfor the standard suite; all four tiers matchtest_categories.yaml)Tests.cmakechange, reconfigured, diffedmiopen-provider's suite name set with vs. without the change - Status: Passed (byte-identical 28-suite set)hipdnn_gpu_ref_tests.exe --gtest_filter=Standard*-*DISABLED*viahipdnn-superbuild-test'scmake_run.py- ASICs: gfx1151 - Status: Passed (606/606 tests, allStandard/*, zeroSmoke/Quickleakage)Technical Changes
dnn-providers/cmake/Tests.cmake: broaden_add_test_target_internal's rawadd_test()suppression gate to fire onDNN_PROVIDER_CTEST_CATEGORIES_YAML OR DNN_PROVIDER_TEST_CATEGORY_YAMLS, since integration-tests only sets the latter (it has no external plugin ctest entry).dnn-providers/integration-tests/test_categories.yaml: full rewrite from a CTest-name-regex file to a GTest-filter categories file reproducingadd_tiered_test_target()'s quick/standard/comprehensive/full cascade and timeouts.dnn-providers/integration-tests/tests/CMakeLists.txt: registerhipdnn_gpu_ref_testsviaadd_integration_test_target()instead of the now-unusedadd_tiered_test_target().dnn-providers/integration-tests/CMakeLists.txt: enable YAML categorization beforeadd_subdirectory(gpu-ref|tests), applyapply_test_category_labels()to both binaries afterfinalize_test_targets()(with install-tree CTestTestfile staging mirroringmiopen-provider), and create the working directory up front since it doesn't exist yet on a from-scratch configure.