Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/actions/ci-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ description: "Single source of truth for shared CI constants (TheRock ref, Docke
outputs:
therock-ref:
description: "TheRock commit hash to use"
value: "685f8c3b89006309b34a7c16de17e841400f0d76" # 2026-05-29 commit
# WIP: revert to a pinned ROCm/TheRock SHA before merge, once paired
# TheRock PR (users/dravindr/tr_hipblaslt_prov) lands.
value: "users/dravindr/tr_hipblaslt_prov"
docker-image:
description: "Docker container image for Linux builds"
value: "ghcr.io/rocm/therock_build_manylinux_x86_64@sha256:48492540591673fdc8d51beb89bde41e7ba13cbb528f643c0a481ba42c4058f2"
Expand Down
61 changes: 59 additions & 2 deletions dnn-providers/hipblaslt-provider/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ dnn_provider_setup_version(hipblaslt_provider ${CMAKE_CURRENT_LIST_DIR})

project(hipblaslt-provider VERSION ${HIPBLASLT_PROVIDER_VERSION} LANGUAGES CXX)

# Root of the rocm-libraries monorepo (for shared infrastructure like CTest categories).
# Used by the YAML-based test categorization wiring further down. Guarded with an EXISTS
# check at the point of use so standalone / sparse checkouts that lack shared/ctest still build.
if(NOT DEFINED ROCM_LIBRARIES_ROOT)
set(ROCM_LIBRARIES_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/../..")
endif()

if(NOT WIN32)
# Only set if not already specified by user
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
Expand Down Expand Up @@ -188,9 +195,59 @@ if(NOT HIPDNN_SKIP_TESTS)
# Finalize test targets with prefix to avoid collisions in superbuild mode
finalize_test_targets("${PROJECT_NAME}")

# For standalone builds we need to install the ctest files
# Optional: YAML-driven CTest test categorization for TheRock CI's test_runner.py.
# Skipped when shared/ctest is not present (e.g. standalone hipblaslt-provider or sparse
# checkout that doesn't include rocm-libraries/shared/), in which case we fall back to
# the project's own install_provider_ctest_files() below.
set(HIPBLASLTPROVIDER_CTEST_INSTALL_FILE "")
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test_categories.yaml"
AND EXISTS "${ROCM_LIBRARIES_ROOT}/shared/ctest/TestCategories.cmake")
include("${ROCM_LIBRARIES_ROOT}/shared/ctest/TestCategories.cmake")
enable_testing()
message(STATUS "hipblaslt-provider: YAML-based test categorization")
file(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/staging")
# Install-time CTestTestfile uses relative paths so `ctest` can run from the
# installed location (bin/hipblaslt_plugin/) and reach ../hipblaslt_plugin_tests etc.
set(HIPBLASLTPROVIDER_CTEST_INSTALL_FILE "${CMAKE_CURRENT_BINARY_DIR}/install_CTestTestfile.cmake")
file(WRITE "${HIPBLASLTPROVIDER_CTEST_INSTALL_FILE}"
[=[
# This is a test file generated by hipblaslt-provider for install time.
# Tests are defined with relative paths to work in the installed location.
]=]
)
# The YAML applies to both test binaries; each call appends its category suites
# (e.g. hipblaslt_plugin_tests_quick_suite, hipblaslt_plugin_integration_tests_quick_suite)
# to the same install-time CTestTestfile.cmake.
apply_test_category_labels(
hipblaslt_plugin_tests
"${CMAKE_CURRENT_SOURCE_DIR}/test_categories.yaml"
"${PROJECT_BINARY_DIR}/staging"
"${HIPBLASLTPROVIDER_CTEST_INSTALL_FILE}"
)
apply_test_category_labels(
hipblaslt_plugin_integration_tests
"${CMAKE_CURRENT_SOURCE_DIR}/test_categories.yaml"
"${PROJECT_BINARY_DIR}/staging"
"${HIPBLASLTPROVIDER_CTEST_INSTALL_FILE}"
)
else()
message(STATUS "hipblaslt-provider: shared/ctest or test_categories.yaml not found, skipping YAML-based CTest categories")
endif()

# For standalone builds we need to install the ctest files.
# When YAML-based categorization is active, install the generated install_CTestTestfile.cmake
# to bin/hipblaslt_plugin/ so TheRock CI's test_runner.py can drive `ctest -L quick`
# (etc.) from the artifact's install tree. Otherwise, fall back to the project's
# own install_provider_ctest_files() which emits an unlabeled CTestTestfile.cmake.
if(NOT ROCM_LIBS_SUPERBUILD)
install_provider_ctest_files("hipblaslt_plugin")
if(HIPBLASLTPROVIDER_CTEST_INSTALL_FILE)
install(FILES "${HIPBLASLTPROVIDER_CTEST_INSTALL_FILE}"
DESTINATION "${CMAKE_INSTALL_BINDIR}/hipblaslt_plugin"
RENAME "CTestTestfile.cmake"
)
else()
install_provider_ctest_files("hipblaslt_plugin")
endif()
endif()
endif()

Expand Down
80 changes: 80 additions & 0 deletions dnn-providers/hipblaslt-provider/test_categories.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Copyright © Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
#
# hipblaslt-provider Test Categories Configuration
# Aligned with Test Filter Standardization (RFC0010).
#
# hipblaslt-provider has two GTest binaries
# (hipblaslt_plugin_tests and hipblaslt_plugin_integration_tests) that share
# this YAML. Tier behaviour mirrors the legacy test_hipblasltprovider.py:
# - quick: GTEST_FILTER="-Full*" (forward-compatible — there are no
# INSTANTIATE_TEST_SUITE_P(Full, ...) entries today, but this matches
# the legacy intent so any future Full* parameterisations are skipped
# in the quick tier automatically).
# - comprehensive/full: run everything (no extra exclusions).
#
# Unit tests in tests/ use TEST/TEST_F with class prefixes Test*; integration
# tests in integration_tests/ use INSTANTIATE_TEST_SUITE_P(IntegrationGpuMatmul*, ...).
# The legacy test_hipblasltprovider.py has no TEST_TO_IGNORE map, so this
# YAML carries no exclude_gpu block. Add one (with the OS-suffixed key shape
# already supported by shared/ctest/parse_test_categories.py via the
# tf_rocprim / tf_miopen_prov work) if a GPU+OS-specific carve-out becomes
# necessary later.

# YAML anchor for the shared exclusion list. *DISABLED* is the standard
# GTest convention for skipped tests.
_common_excludes: &common_excludes
- "*DISABLED*"

test_categories:
quick:
description: "Fast sanity checks (target: < 5 min) - excludes Full* parameterised expansions"
test_patterns:
- "*"
exclude:
- "*DISABLED*"
- "Full*"
labels:
- "quick"
- "pre-commit"
- "smoke"

standard:
description: "Pre-checkin validation (target: < 45 min) - same shape as quick (no Standard* tier exists)"
test_patterns:
- "*"
exclude:
- "*DISABLED*"
- "Full*"
labels:
- "standard"
- "pr"
- "precheckin"

comprehensive:
description: "Nightly comprehensive tests (target: < 7 hours) - includes Full* tier"
test_patterns:
- "*"
exclude: *common_excludes
labels:
- "comprehensive"
- "nightly"
- "extended"

full:
description: "Complete test suite - all tests including Full*"
test_patterns:
- "*"
exclude: *common_excludes
labels:
- "full"
- "all"

execution_settings:
default_timeout: 300
timeout_multiplier: 1
category_timeouts:
quick: 300 # 5 minutes
standard: 2700 # 45 minutes
comprehensive: 25200 # 7 hours
full: 28800 # 8 hours
Loading