From 9bff41ddc4c3b2d5b0ff7640e76b87da2a59e3e7 Mon Sep 17 00:00:00 2001 From: archana-ramalingam Date: Fri, 29 May 2026 00:23:28 +0000 Subject: [PATCH 01/13] Add `tensilelite` to blas `projects_to_test` in TheRock CI matrix TheRock PR #4991 added the tensilelite test component configuration (test script, artifact config, fetch config). Now that it's merged, enable the component in `therock_matrix.py` so tensilelite/rocisa tests run in TheRock CI alongside hipblaslt. Co-Authored-By: Claude Opus 4.6 --- .github/scripts/therock_matrix.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/therock_matrix.py b/.github/scripts/therock_matrix.py index 013ae6ba491e..6dacb16b37b9 100644 --- a/.github/scripts/therock_matrix.py +++ b/.github/scripts/therock_matrix.py @@ -48,7 +48,7 @@ }, "blas": { "cmake_options": ["-DTHEROCK_ENABLE_BLAS=ON"], - "projects_to_test": ["hipblaslt", "rocblas", "hipblas", "rocroller"], + "projects_to_test": ["hipblaslt", "rocblas", "hipblas", "rocroller", "tensilelite"], }, "miopen": { "cmake_options": [ From 53aa694fe66f1ba64929833b0adc444dc5a7dbb8 Mon Sep 17 00:00:00 2001 From: archana-ramalingam Date: Fri, 29 May 2026 00:38:37 +0000 Subject: [PATCH 02/13] Fix black formatting for `projects_to_test` list Co-Authored-By: Claude Opus 4.6 --- .github/scripts/therock_matrix.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/scripts/therock_matrix.py b/.github/scripts/therock_matrix.py index 6dacb16b37b9..34fc467de115 100644 --- a/.github/scripts/therock_matrix.py +++ b/.github/scripts/therock_matrix.py @@ -48,7 +48,13 @@ }, "blas": { "cmake_options": ["-DTHEROCK_ENABLE_BLAS=ON"], - "projects_to_test": ["hipblaslt", "rocblas", "hipblas", "rocroller", "tensilelite"], + "projects_to_test": [ + "hipblaslt", + "rocblas", + "hipblas", + "rocroller", + "tensilelite", + ], }, "miopen": { "cmake_options": [ From 3690c6503c56327f8c408225d5136714656fe82f Mon Sep 17 00:00:00 2001 From: archana-ramalingam Date: Fri, 29 May 2026 21:00:23 +0000 Subject: [PATCH 03/13] Add Python version guard for rocisa stable ABI extension Gives a clear error message when _rocisa.abi3.so is loaded under Python < 3.12 instead of the cryptic 'undefined symbol: PyType_FromMetaclass' from the dynamic linker. Co-Authored-By: Claude Opus 4.6 --- .../hipblaslt/tensilelite/rocisa/rocisa/__init__.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/projects/hipblaslt/tensilelite/rocisa/rocisa/__init__.py b/projects/hipblaslt/tensilelite/rocisa/rocisa/__init__.py index 7eb21cd9e888..bf68c6fa21c7 100644 --- a/projects/hipblaslt/tensilelite/rocisa/rocisa/__init__.py +++ b/projects/hipblaslt/tensilelite/rocisa/rocisa/__init__.py @@ -3,6 +3,19 @@ import sys import types + +if getattr(sys, "abiflags", None) is not None: + _abi3 = __import__("importlib.util", fromlist=["util"]).util.find_spec( + "rocisa._rocisa" + ) + if _abi3 and _abi3.origin and ".abi3." in _abi3.origin and sys.version_info < (3, 12): + raise ImportError( + f"rocisa stable-ABI extension requires Python >= 3.12 " + f"(running {sys.version_info.major}.{sys.version_info.minor}). " + f"Install a non-stable-ABI build or upgrade Python." + ) + del _abi3 + from ._rocisa import * from . import _rocisa From 9f7b8ef3a249a8e7d4da16581749b57af6f08ebf Mon Sep 17 00:00:00 2001 From: archana-ramalingam Date: Fri, 29 May 2026 21:24:54 +0000 Subject: [PATCH 04/13] Fix importlib.util usage in rocisa Python version guard Co-Authored-By: Claude Opus 4.6 --- .../tensilelite/rocisa/rocisa/__init__.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/projects/hipblaslt/tensilelite/rocisa/rocisa/__init__.py b/projects/hipblaslt/tensilelite/rocisa/rocisa/__init__.py index bf68c6fa21c7..8db883e497c3 100644 --- a/projects/hipblaslt/tensilelite/rocisa/rocisa/__init__.py +++ b/projects/hipblaslt/tensilelite/rocisa/rocisa/__init__.py @@ -4,17 +4,15 @@ import sys import types -if getattr(sys, "abiflags", None) is not None: - _abi3 = __import__("importlib.util", fromlist=["util"]).util.find_spec( - "rocisa._rocisa" +from pathlib import Path as _Path + +if any(_Path(__file__).parent.glob("_rocisa.abi3.*")) and sys.version_info < (3, 12): + raise ImportError( + f"rocisa stable-ABI extension requires Python >= 3.12 " + f"(running {sys.version_info.major}.{sys.version_info.minor}). " + f"Install a non-stable-ABI build or upgrade Python." ) - if _abi3 and _abi3.origin and ".abi3." in _abi3.origin and sys.version_info < (3, 12): - raise ImportError( - f"rocisa stable-ABI extension requires Python >= 3.12 " - f"(running {sys.version_info.major}.{sys.version_info.minor}). " - f"Install a non-stable-ABI build or upgrade Python." - ) - del _abi3 +del _Path from ._rocisa import * from . import _rocisa From 3f7fd450b729408f65ec1fed44a09ee4ccbe60e6 Mon Sep 17 00:00:00 2001 From: archana-ramalingam Date: Thu, 4 Jun 2026 21:13:37 +0000 Subject: [PATCH 05/13] [tensilelite] Move hip import inside `run_on_gpu()` in `gpu_test_helpers.py` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bare `from hip import hip` at module level crashes pytest collection in environments without hip-python (e.g. FFM Docker containers). hip is only used in `run_on_gpu()` — move the import there. hiprtc was unused. Co-Authored-By: Claude Opus 4.6 --- .../tensilelite/Tensile/Tests/unit/gpu_test_helpers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/hipblaslt/tensilelite/Tensile/Tests/unit/gpu_test_helpers.py b/projects/hipblaslt/tensilelite/Tensile/Tests/unit/gpu_test_helpers.py index 6fa9e7886f43..03bb4cefc51e 100644 --- a/projects/hipblaslt/tensilelite/Tensile/Tests/unit/gpu_test_helpers.py +++ b/projects/hipblaslt/tensilelite/Tensile/Tests/unit/gpu_test_helpers.py @@ -26,8 +26,6 @@ TENSILE_ROOT = os.path.abspath(os.path.join(SCRIPT_DIR, "..", "..", "..")) sys.path.insert(0, TENSILE_ROOT) -from hip import hip, hiprtc # type: ignore - from unittest.mock import MagicMock from types import SimpleNamespace from dataclasses import dataclass @@ -586,6 +584,8 @@ def run_on_gpu(co_path, output_size, inputs=(), scalars=(), lds_size=0, num_thre Returns: bytes: Raw output buffer contents. """ + from hip import hip # type: ignore + if num_threads is None: num_threads = NUM_THREADS hip_check(hip.hipInit(0)) From e6924db8a2ea431aaf84976df879d88b19dd3a5d Mon Sep 17 00:00:00 2001 From: therockbot Date: Wed, 3 Jun 2026 12:59:52 +0000 Subject: [PATCH 06/13] Update TheRock ref to 84b3ab1 --- .github/workflows/therock-ci-linux.yml | 2 +- .github/workflows/therock-ci-nightly.yml | 2 +- .github/workflows/therock-ci-windows.yml | 2 +- .github/workflows/therock-ci.yml | 2 +- .github/workflows/therock-test-component.yml | 2 +- .github/workflows/therock-test-packages.yml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/therock-ci-linux.yml b/.github/workflows/therock-ci-linux.yml index 0948b1e4ee59..e910b11d8406 100644 --- a/.github/workflows/therock-ci-linux.yml +++ b/.github/workflows/therock-ci-linux.yml @@ -54,7 +54,7 @@ jobs: with: repository: "ROCm/TheRock" path: TheRock - ref: ${{ inputs.therock_ref }} + ref: 84b3ab155f3faf64c5f7f783a7a35f315e0969c7 # 2026-06-03 commit - name: Install python deps run: | diff --git a/.github/workflows/therock-ci-nightly.yml b/.github/workflows/therock-ci-nightly.yml index f7e7411f7878..10350cb12ceb 100644 --- a/.github/workflows/therock-ci-nightly.yml +++ b/.github/workflows/therock-ci-nightly.yml @@ -44,7 +44,7 @@ jobs: with: repository: "ROCm/TheRock" path: TheRock - ref: ${{ steps.ci-env.outputs.therock-ref }} + ref: 84b3ab155f3faf64c5f7f783a7a35f315e0969c7 # 2026-06-03 commit - name: Set up Python uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 diff --git a/.github/workflows/therock-ci-windows.yml b/.github/workflows/therock-ci-windows.yml index 7496fb3fc2ad..9b4744f69f2a 100644 --- a/.github/workflows/therock-ci-windows.yml +++ b/.github/workflows/therock-ci-windows.yml @@ -55,7 +55,7 @@ jobs: with: repository: "ROCm/TheRock" path: "TheRock" - ref: ${{ inputs.therock_ref }} + ref: 84b3ab155f3faf64c5f7f783a7a35f315e0969c7 # 2026-06-03 commit - name: Set up Python uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 diff --git a/.github/workflows/therock-ci.yml b/.github/workflows/therock-ci.yml index 53a935397edc..27e7756ee4b3 100644 --- a/.github/workflows/therock-ci.yml +++ b/.github/workflows/therock-ci.yml @@ -72,7 +72,7 @@ jobs: with: repository: "ROCm/TheRock" path: TheRock - ref: ${{ steps.ci-env.outputs.therock-ref }} + ref: 84b3ab155f3faf64c5f7f783a7a35f315e0969c7 # 2026-06-03 commit - name: Set up Python uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 diff --git a/.github/workflows/therock-test-component.yml b/.github/workflows/therock-test-component.yml index e7c8b85e45c8..3e664b542ce9 100644 --- a/.github/workflows/therock-test-component.yml +++ b/.github/workflows/therock-test-component.yml @@ -77,7 +77,7 @@ jobs: uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: repository: "ROCm/TheRock" - ref: ${{ inputs.therock_ref }} + ref: 84b3ab155f3faf64c5f7f783a7a35f315e0969c7 # 2026-06-03 commit - name: Configure git for long paths on Windows if: ${{ runner.os == 'Windows' }} diff --git a/.github/workflows/therock-test-packages.yml b/.github/workflows/therock-test-packages.yml index 78c80080df5c..1094e2a1cc72 100644 --- a/.github/workflows/therock-test-packages.yml +++ b/.github/workflows/therock-test-packages.yml @@ -46,7 +46,7 @@ jobs: uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: repository: "ROCm/TheRock" - ref: ${{ inputs.therock_ref }} + ref: 84b3ab155f3faf64c5f7f783a7a35f315e0969c7 # 2026-06-03 commit - name: Setting up Python uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 From ca436808db870c5bd9d269e89b942250d9fb839e Mon Sep 17 00:00:00 2001 From: archana-ramalingam Date: Thu, 4 Jun 2026 18:04:18 +0000 Subject: [PATCH 07/13] Restore workflow TheRock ref expressions and update ci-env The bump automation bot incorrectly hardcoded the TheRock SHA in 6 workflow files instead of only updating ci-env/action.yml. This restores the original ${{ inputs.therock_ref }} and ${{ steps.ci-env.outputs.therock-ref }} expressions and updates ci-env/action.yml to the new ref. Co-Authored-By: Claude Opus 4.6 --- .github/actions/ci-env/action.yml | 2 +- .github/workflows/therock-ci-linux.yml | 2 +- .github/workflows/therock-ci-nightly.yml | 2 +- .github/workflows/therock-ci-windows.yml | 2 +- .github/workflows/therock-ci.yml | 2 +- .github/workflows/therock-test-component.yml | 2 +- .github/workflows/therock-test-packages.yml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/actions/ci-env/action.yml b/.github/actions/ci-env/action.yml index e2557746306d..ecc78976a076 100644 --- a/.github/actions/ci-env/action.yml +++ b/.github/actions/ci-env/action.yml @@ -4,7 +4,7 @@ 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 + value: "84b3ab155f3faf64c5f7f783a7a35f315e0969c7" # 2026-06-03 commit docker-image: description: "Docker container image for Linux builds" value: "ghcr.io/rocm/therock_build_manylinux_x86_64@sha256:48492540591673fdc8d51beb89bde41e7ba13cbb528f643c0a481ba42c4058f2" diff --git a/.github/workflows/therock-ci-linux.yml b/.github/workflows/therock-ci-linux.yml index e910b11d8406..0948b1e4ee59 100644 --- a/.github/workflows/therock-ci-linux.yml +++ b/.github/workflows/therock-ci-linux.yml @@ -54,7 +54,7 @@ jobs: with: repository: "ROCm/TheRock" path: TheRock - ref: 84b3ab155f3faf64c5f7f783a7a35f315e0969c7 # 2026-06-03 commit + ref: ${{ inputs.therock_ref }} - name: Install python deps run: | diff --git a/.github/workflows/therock-ci-nightly.yml b/.github/workflows/therock-ci-nightly.yml index 10350cb12ceb..f7e7411f7878 100644 --- a/.github/workflows/therock-ci-nightly.yml +++ b/.github/workflows/therock-ci-nightly.yml @@ -44,7 +44,7 @@ jobs: with: repository: "ROCm/TheRock" path: TheRock - ref: 84b3ab155f3faf64c5f7f783a7a35f315e0969c7 # 2026-06-03 commit + ref: ${{ steps.ci-env.outputs.therock-ref }} - name: Set up Python uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 diff --git a/.github/workflows/therock-ci-windows.yml b/.github/workflows/therock-ci-windows.yml index 9b4744f69f2a..7496fb3fc2ad 100644 --- a/.github/workflows/therock-ci-windows.yml +++ b/.github/workflows/therock-ci-windows.yml @@ -55,7 +55,7 @@ jobs: with: repository: "ROCm/TheRock" path: "TheRock" - ref: 84b3ab155f3faf64c5f7f783a7a35f315e0969c7 # 2026-06-03 commit + ref: ${{ inputs.therock_ref }} - name: Set up Python uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 diff --git a/.github/workflows/therock-ci.yml b/.github/workflows/therock-ci.yml index 27e7756ee4b3..53a935397edc 100644 --- a/.github/workflows/therock-ci.yml +++ b/.github/workflows/therock-ci.yml @@ -72,7 +72,7 @@ jobs: with: repository: "ROCm/TheRock" path: TheRock - ref: 84b3ab155f3faf64c5f7f783a7a35f315e0969c7 # 2026-06-03 commit + ref: ${{ steps.ci-env.outputs.therock-ref }} - name: Set up Python uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 diff --git a/.github/workflows/therock-test-component.yml b/.github/workflows/therock-test-component.yml index 3e664b542ce9..e7c8b85e45c8 100644 --- a/.github/workflows/therock-test-component.yml +++ b/.github/workflows/therock-test-component.yml @@ -77,7 +77,7 @@ jobs: uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: repository: "ROCm/TheRock" - ref: 84b3ab155f3faf64c5f7f783a7a35f315e0969c7 # 2026-06-03 commit + ref: ${{ inputs.therock_ref }} - name: Configure git for long paths on Windows if: ${{ runner.os == 'Windows' }} diff --git a/.github/workflows/therock-test-packages.yml b/.github/workflows/therock-test-packages.yml index 1094e2a1cc72..78c80080df5c 100644 --- a/.github/workflows/therock-test-packages.yml +++ b/.github/workflows/therock-test-packages.yml @@ -46,7 +46,7 @@ jobs: uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: repository: "ROCm/TheRock" - ref: 84b3ab155f3faf64c5f7f783a7a35f315e0969c7 # 2026-06-03 commit + ref: ${{ inputs.therock_ref }} - name: Setting up Python uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 From 90fb0da938741f8da14e86557795dd265ee09f03 Mon Sep 17 00:00:00 2001 From: archana-ramalingam Date: Thu, 4 Jun 2026 18:28:09 +0000 Subject: [PATCH 08/13] Trigger CI on ci-env/action.yml changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The path filter in therock_configure_ci.py only checked .github/workflows/ and .github/scripts/ — changes to .github/actions/ci-env/ (the single source of truth for the TheRock ref) were not detected, causing CI to skip builds on TheRock ref bump PRs. Co-Authored-By: Claude Opus 4.6 --- .github/scripts/therock_configure_ci.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/scripts/therock_configure_ci.py b/.github/scripts/therock_configure_ci.py index d9e60c5f5110..916fb0b920db 100644 --- a/.github/scripts/therock_configure_ci.py +++ b/.github/scripts/therock_configure_ci.py @@ -198,14 +198,19 @@ def get_modified_paths(base_ref: str) -> Optional[Iterable[str]]: "therock*", ] +GITHUB_ACTIONS_CI_PATTERNS = [ + "ci-env/action.yml", +] + def is_path_workflow_file_related_to_ci(path: str) -> bool: return any( - fnmatch.fnmatch(path, ".github/workflows/" + pattern) + fnmatch.fnmatch(path, prefix + pattern) + for prefix in [".github/workflows/", ".github/scripts/"] for pattern in GITHUB_WORKFLOWS_CI_PATTERNS ) or any( - fnmatch.fnmatch(path, ".github/scripts/" + pattern) - for pattern in GITHUB_WORKFLOWS_CI_PATTERNS + fnmatch.fnmatch(path, ".github/actions/" + pattern) + for pattern in GITHUB_ACTIONS_CI_PATTERNS ) From df7aaeb04abd27ef0b32547725f2d5295f369d39 Mon Sep 17 00:00:00 2001 From: Archana Ramalingam Date: Fri, 5 Jun 2026 05:30:17 +0000 Subject: [PATCH 09/13] Install tensilelite-client to libexec for CI test artifacts The common GEMM tests need the prebuilt client binary at libexec/hipblaslt/tensilelite/tensilelite-client, matching the artifact-blas.toml pattern in TheRock. Without this, FFM gfx1250 tests fail with FileNotFoundError. Co-Authored-By: Claude Opus 4.6 --- projects/hipblaslt/CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/projects/hipblaslt/CMakeLists.txt b/projects/hipblaslt/CMakeLists.txt index 18ab1aac530c..3216b8f2dc23 100644 --- a/projects/hipblaslt/CMakeLists.txt +++ b/projects/hipblaslt/CMakeLists.txt @@ -647,8 +647,13 @@ if(HIPBLASLT_INSTALL_TENSILELITE_TEST_ARTIFACTS AND NOT WIN32) OPTIONAL ) - # TODO: Add C++ test tools (tensilelite-client, cpu-gemm-driver) when - # common/generator tests are enabled in CI. + if(TARGET tensilelite-client) + install( + TARGETS tensilelite-client + DESTINATION "${CMAKE_INSTALL_LIBEXECDIR}/hipblaslt/tensilelite" + COMPONENT tests + ) + endif() endif() if(HIPBLASLT_ENABLE_CLIENT AND HIPBLASLT_ENABLE_SAMPLES) From 01d71ea519443c9af0570805449108a1d958a3c6 Mon Sep 17 00:00:00 2001 From: Archana Ramalingam Date: Fri, 5 Jun 2026 15:31:21 -0500 Subject: [PATCH 10/13] Guard hip import and add requires_gpu marker for GPU unit tests Prevents ImportError on systems without hip by using a try/except guard at module level and a combined requires_gpu skip marker that checks both hip availability and gfx950 architecture. Co-Authored-By: Claude Opus 4.6 --- .../Tensile/Tests/unit/gpu_test_helpers.py | 16 ++++++++++++++-- .../Tensile/Tests/unit/test_gr_lr_roundtrip.py | 3 ++- .../Tests/unit/test_gr_lr_roundtrip_fp8.py | 3 ++- .../Tensile/Tests/unit/test_gr_offset.py | 3 ++- .../Tensile/Tests/unit/test_mfma_fp8.py | 3 ++- .../Tensile/Tests/unit/test_storeD_roundtrip.py | 7 +++---- 6 files changed, 25 insertions(+), 10 deletions(-) diff --git a/projects/hipblaslt/tensilelite/Tensile/Tests/unit/gpu_test_helpers.py b/projects/hipblaslt/tensilelite/Tensile/Tests/unit/gpu_test_helpers.py index 03bb4cefc51e..5fd57a13432e 100644 --- a/projects/hipblaslt/tensilelite/Tensile/Tests/unit/gpu_test_helpers.py +++ b/projects/hipblaslt/tensilelite/Tensile/Tests/unit/gpu_test_helpers.py @@ -21,6 +21,16 @@ import subprocess import tempfile +import pytest + +hip = None +try: + from hip import hip +except ImportError: + pass + +requires_hip = pytest.mark.skipif(hip is None, reason="hip module not installed") + # Add tensilelite to path SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) TENSILE_ROOT = os.path.abspath(os.path.join(SCRIPT_DIR, "..", "..", "..")) @@ -76,6 +86,10 @@ def _detect_gfx_target(): # ---- Constants ---- GFX_TARGET = _detect_gfx_target() HAS_GFX950 = GFX_TARGET == "gfx950" +requires_gpu = pytest.mark.skipif( + hip is None or not HAS_GFX950, + reason=f"requires hip module and gfx950 (found hip={'yes' if hip else 'no'}, arch={GFX_TARGET})", +) WAVESIZE = 64 NUM_WAVES = 4 NUM_THREADS = WAVESIZE * NUM_WAVES # 256 @@ -584,8 +598,6 @@ def run_on_gpu(co_path, output_size, inputs=(), scalars=(), lds_size=0, num_thre Returns: bytes: Raw output buffer contents. """ - from hip import hip # type: ignore - if num_threads is None: num_threads = NUM_THREADS hip_check(hip.hipInit(0)) diff --git a/projects/hipblaslt/tensilelite/Tensile/Tests/unit/test_gr_lr_roundtrip.py b/projects/hipblaslt/tensilelite/Tensile/Tests/unit/test_gr_lr_roundtrip.py index a972b8d5eac2..4f78c855a01e 100644 --- a/projects/hipblaslt/tensilelite/Tensile/Tests/unit/test_gr_lr_roundtrip.py +++ b/projects/hipblaslt/tensilelite/Tensile/Tests/unit/test_gr_lr_roundtrip.py @@ -26,6 +26,7 @@ setup_roundtrip_writer, build_roundtrip_inner_asm, alloc_export_vgprs, + requires_gpu, ) @@ -320,7 +321,7 @@ def print_grid_diff(label, actual, expected): # Pytest tests # --------------------------------------------------------------------------- -@pytest.mark.skipif(not HAS_GFX950, reason=f"GPU tests require gfx950, found {GFX_TARGET}") +@requires_gpu class TestGrLrRoundtrip: @pytest.fixture(params=CONFIGS, ids=lambda c: c.label) diff --git a/projects/hipblaslt/tensilelite/Tensile/Tests/unit/test_gr_lr_roundtrip_fp8.py b/projects/hipblaslt/tensilelite/Tensile/Tests/unit/test_gr_lr_roundtrip_fp8.py index 7c25d9ee1265..76344794bfdb 100644 --- a/projects/hipblaslt/tensilelite/Tensile/Tests/unit/test_gr_lr_roundtrip_fp8.py +++ b/projects/hipblaslt/tensilelite/Tensile/Tests/unit/test_gr_lr_roundtrip_fp8.py @@ -36,6 +36,7 @@ setup_roundtrip_writer, build_roundtrip_inner_asm, alloc_export_vgprs, + requires_gpu, ) BPE = 1 # fp8: 1 byte per element @@ -271,7 +272,7 @@ def compare_tiles_fp8(actual_bytes, expected_tiles, tileInfoA, tileInfoB, wave_i # Pytest tests # --------------------------------------------------------------------------- -@pytest.mark.skipif(not HAS_GFX950, reason=f"GPU tests require gfx950, found {GFX_TARGET}") +@requires_gpu class TestGrLrRoundtripFP8: @pytest.fixture(params=TILE_CONFIGS_FP8, ids=lambda c: c.label) diff --git a/projects/hipblaslt/tensilelite/Tensile/Tests/unit/test_gr_offset.py b/projects/hipblaslt/tensilelite/Tensile/Tests/unit/test_gr_offset.py index 52b967432465..8524b9d012a6 100644 --- a/projects/hipblaslt/tensilelite/Tensile/Tests/unit/test_gr_offset.py +++ b/projects/hipblaslt/tensilelite/Tensile/Tests/unit/test_gr_offset.py @@ -27,6 +27,7 @@ assemble_and_run, generate_kernel_asm, generate_load_params, + requires_gpu, ) from Tensile.Components.Subtile.SubtileGREmit import graTileAssignment @@ -319,7 +320,7 @@ def verify_gr_output(output_bytes, ti, kernel, dest_vgprs, mt, stride, debug=Fal # Pytest tests # --------------------------------------------------------------------------- -@pytest.mark.skipif(not HAS_GFX950, reason=f"GPU tests require gfx950, found {GFX_TARGET}") +@requires_gpu class TestGrOffset: @pytest.fixture(params=CONFIGS, ids=lambda c: c.label) diff --git a/projects/hipblaslt/tensilelite/Tensile/Tests/unit/test_mfma_fp8.py b/projects/hipblaslt/tensilelite/Tensile/Tests/unit/test_mfma_fp8.py index 4df6a78611ca..5a0972203efd 100644 --- a/projects/hipblaslt/tensilelite/Tensile/Tests/unit/test_mfma_fp8.py +++ b/projects/hipblaslt/tensilelite/Tensile/Tests/unit/test_mfma_fp8.py @@ -42,6 +42,7 @@ setup_roundtrip_writer, build_roundtrip_inner_asm, collect_tile_vgprs, + requires_gpu, ) # --------------------------------------------------------------------------- @@ -380,7 +381,7 @@ def compare_mfma_output(actual_bytes, expected_pairs, debug=False): # Pytest tests # --------------------------------------------------------------------------- -@pytest.mark.skipif(not HAS_GFX950, reason=f"GPU tests require gfx950, found {GFX_TARGET}") +@requires_gpu class TestMfmaFP8: """GPU tests for FP8 GR->LDS->LR->MFMA roundtrip.""" diff --git a/projects/hipblaslt/tensilelite/Tensile/Tests/unit/test_storeD_roundtrip.py b/projects/hipblaslt/tensilelite/Tensile/Tests/unit/test_storeD_roundtrip.py index c617c68230a3..46a84d0322fe 100644 --- a/projects/hipblaslt/tensilelite/Tensile/Tests/unit/test_storeD_roundtrip.py +++ b/projects/hipblaslt/tensilelite/Tensile/Tests/unit/test_storeD_roundtrip.py @@ -22,8 +22,6 @@ TENSILE_ROOT = os.path.abspath(os.path.join(SCRIPT_DIR, "..", "..", "..")) sys.path.insert(0, TENSILE_ROOT) -from hip import hip # type: ignore - from unittest.mock import MagicMock from rocisa.code import Module, TextBlock @@ -39,7 +37,6 @@ from gpu_test_helpers import ( TileConfig, - HAS_GFX950, GFX_TARGET, WAVESIZE, NUM_THREADS, @@ -47,11 +44,13 @@ generate_kernel_asm, assemble_and_run, assemble_kernel, + hip, hip_check, init_rocisa, + requires_gpu, ) -pytestmark = pytest.mark.skipif(not HAS_GFX950, reason=f"GPU tests require gfx950, found {GFX_TARGET}") +pytestmark = requires_gpu # --------------------------------------------------------------------------- # Test configurations: (mt_a, mt_b, depth_u) From be17310e093f02c141fe9b2c106834537ef86a7d Mon Sep 17 00:00:00 2001 From: Archana Ramalingam Date: Fri, 5 Jun 2026 17:26:51 -0500 Subject: [PATCH 11/13] Move makeIsaInfoMap() to pytest fixture to fix singleton poisoning Module-level `validateToolchain()`/`makeIsaInfoMap()` calls in `test_MatrixInstructionConversion.py` poison the rocisa singleton cache at collection time, breaking common tests when collected together. Move to a `scope="module"` fixture so initialization is deferred to test execution time. Co-Authored-By: Claude Opus 4.6 --- .../unit/test_MatrixInstructionConversion.py | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/projects/hipblaslt/tensilelite/Tensile/Tests/unit/test_MatrixInstructionConversion.py b/projects/hipblaslt/tensilelite/Tensile/Tests/unit/test_MatrixInstructionConversion.py index 864ddba28b27..25083c49dab2 100644 --- a/projects/hipblaslt/tensilelite/Tensile/Tests/unit/test_MatrixInstructionConversion.py +++ b/projects/hipblaslt/tensilelite/Tensile/Tests/unit/test_MatrixInstructionConversion.py @@ -22,6 +22,7 @@ # # SPDX-License-Identifier: MIT ################################################################################ +import pytest import yaml from pprint import pformat @@ -33,10 +34,14 @@ from Tensile.SolutionStructs.Validators.MatrixInstruction import matrixInstructionToMIParameters, validateMIParameters from Tensile.SolutionStructs.Validators.WorkGroup import validateWorkGroup -cxxCompiler = validateToolchain("amdclang++") -isaInfoMap = makeIsaInfoMap(SUPPORTED_ISA, cxxCompiler) -def test_convert_9_item_custom_kernel_config(): +@pytest.fixture(scope="module") +def isa_info_map(): + cxxCompiler = validateToolchain("amdclang++") + return makeIsaInfoMap(SUPPORTED_ISA, cxxCompiler) + + +def test_convert_9_item_custom_kernel_config(isa_info_map): input_conf = yaml.load( """ ProblemType: @@ -76,7 +81,7 @@ def test_convert_9_item_custom_kernel_config(): wavefrontSize, ptype, workgroup, - isaInfoMap, + isa_info_map, ) input = { @@ -108,7 +113,7 @@ def test_convert_9_item_custom_kernel_config(): solution.update(input_conf) solution.update(outputConf) - assert validateMIParameters(solution, isaInfoMap, True) + assert validateMIParameters(solution, isa_info_map, True) assert validateWorkGroup(solution) mi4 = solution["MatrixInstruction"] @@ -122,7 +127,7 @@ def test_convert_9_item_custom_kernel_config(): assert format9 == mi -def testConvert9ItemCustomKernelConfig(): +def testConvert9ItemCustomKernelConfig(isa_info_map): inputConf = yaml.load( """ @@ -178,7 +183,7 @@ def testConvert9ItemCustomKernelConfig(): wavefrontSize, inputConf["ProblemType"], workGroup, - isaInfoMap, + isa_info_map, ) input = { @@ -210,4 +215,4 @@ def testConvert9ItemCustomKernelConfig(): solution.update(inputConf) solution.update(outputConf) - assert validateMIParameters(solution, isaInfoMap, True) == True + assert validateMIParameters(solution, isa_info_map, True) == True From 14a0b64eb2a308da96cdcfa6ddcf7c9fb236c42b Mon Sep 17 00:00:00 2001 From: Archana Ramalingam Date: Tue, 9 Jun 2026 13:51:34 -0500 Subject: [PATCH 12/13] Revert PR #8014 changes from this branch Revert ci-env TheRock ref bump and therock_configure_ci.py changes that belong to PR #8014, not this PR. Co-Authored-By: Claude Opus 4.6 --- .github/scripts/therock_configure_ci.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/scripts/therock_configure_ci.py b/.github/scripts/therock_configure_ci.py index 916fb0b920db..d9e60c5f5110 100644 --- a/.github/scripts/therock_configure_ci.py +++ b/.github/scripts/therock_configure_ci.py @@ -198,19 +198,14 @@ def get_modified_paths(base_ref: str) -> Optional[Iterable[str]]: "therock*", ] -GITHUB_ACTIONS_CI_PATTERNS = [ - "ci-env/action.yml", -] - def is_path_workflow_file_related_to_ci(path: str) -> bool: return any( - fnmatch.fnmatch(path, prefix + pattern) - for prefix in [".github/workflows/", ".github/scripts/"] + fnmatch.fnmatch(path, ".github/workflows/" + pattern) for pattern in GITHUB_WORKFLOWS_CI_PATTERNS ) or any( - fnmatch.fnmatch(path, ".github/actions/" + pattern) - for pattern in GITHUB_ACTIONS_CI_PATTERNS + fnmatch.fnmatch(path, ".github/scripts/" + pattern) + for pattern in GITHUB_WORKFLOWS_CI_PATTERNS ) From 654248d5926ae852228e2b533d508739698865f1 Mon Sep 17 00:00:00 2001 From: Archana Ramalingam Date: Tue, 9 Jun 2026 13:57:22 -0500 Subject: [PATCH 13/13] Move CMakeLists.txt and test_MatrixInstructionConversion.py changes to PR #8004 These changes belong with the GPU emulation dispatch work, not the CI matrix enablement PR. Co-Authored-By: Claude Opus 4.6 --- projects/hipblaslt/CMakeLists.txt | 9 ++------ .../unit/test_MatrixInstructionConversion.py | 21 +++++++------------ 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/projects/hipblaslt/CMakeLists.txt b/projects/hipblaslt/CMakeLists.txt index 5529e99d2df0..c92c53c93314 100644 --- a/projects/hipblaslt/CMakeLists.txt +++ b/projects/hipblaslt/CMakeLists.txt @@ -648,13 +648,8 @@ if(HIPBLASLT_INSTALL_TENSILELITE_TEST_ARTIFACTS AND NOT WIN32) OPTIONAL ) - if(TARGET tensilelite-client) - install( - TARGETS tensilelite-client - DESTINATION "${CMAKE_INSTALL_LIBEXECDIR}/hipblaslt/tensilelite" - COMPONENT tests - ) - endif() + # TODO: Add C++ test tools (tensilelite-client, cpu-gemm-driver) when + # common/generator tests are enabled in CI. endif() if(HIPBLASLT_ENABLE_CLIENT AND HIPBLASLT_ENABLE_SAMPLES) diff --git a/projects/hipblaslt/tensilelite/Tensile/Tests/unit/test_MatrixInstructionConversion.py b/projects/hipblaslt/tensilelite/Tensile/Tests/unit/test_MatrixInstructionConversion.py index 25083c49dab2..864ddba28b27 100644 --- a/projects/hipblaslt/tensilelite/Tensile/Tests/unit/test_MatrixInstructionConversion.py +++ b/projects/hipblaslt/tensilelite/Tensile/Tests/unit/test_MatrixInstructionConversion.py @@ -22,7 +22,6 @@ # # SPDX-License-Identifier: MIT ################################################################################ -import pytest import yaml from pprint import pformat @@ -34,14 +33,10 @@ from Tensile.SolutionStructs.Validators.MatrixInstruction import matrixInstructionToMIParameters, validateMIParameters from Tensile.SolutionStructs.Validators.WorkGroup import validateWorkGroup +cxxCompiler = validateToolchain("amdclang++") +isaInfoMap = makeIsaInfoMap(SUPPORTED_ISA, cxxCompiler) -@pytest.fixture(scope="module") -def isa_info_map(): - cxxCompiler = validateToolchain("amdclang++") - return makeIsaInfoMap(SUPPORTED_ISA, cxxCompiler) - - -def test_convert_9_item_custom_kernel_config(isa_info_map): +def test_convert_9_item_custom_kernel_config(): input_conf = yaml.load( """ ProblemType: @@ -81,7 +76,7 @@ def test_convert_9_item_custom_kernel_config(isa_info_map): wavefrontSize, ptype, workgroup, - isa_info_map, + isaInfoMap, ) input = { @@ -113,7 +108,7 @@ def test_convert_9_item_custom_kernel_config(isa_info_map): solution.update(input_conf) solution.update(outputConf) - assert validateMIParameters(solution, isa_info_map, True) + assert validateMIParameters(solution, isaInfoMap, True) assert validateWorkGroup(solution) mi4 = solution["MatrixInstruction"] @@ -127,7 +122,7 @@ def test_convert_9_item_custom_kernel_config(isa_info_map): assert format9 == mi -def testConvert9ItemCustomKernelConfig(isa_info_map): +def testConvert9ItemCustomKernelConfig(): inputConf = yaml.load( """ @@ -183,7 +178,7 @@ def testConvert9ItemCustomKernelConfig(isa_info_map): wavefrontSize, inputConf["ProblemType"], workGroup, - isa_info_map, + isaInfoMap, ) input = { @@ -215,4 +210,4 @@ def testConvert9ItemCustomKernelConfig(isa_info_map): solution.update(inputConf) solution.update(outputConf) - assert validateMIParameters(solution, isa_info_map, True) == True + assert validateMIParameters(solution, isaInfoMap, True) == True