Repository navigation
fix(tensilelite): validate SourceSwap MI in effective space - #11877
Merged
mengzcai merged 2 commits intoSep 14, 2026
Merged
Conversation
✅ All Policy Checks Passed
📖 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. |
mengzcai
force-pushed
the
users/mengzcai/fix_hipbaslt_f4_SS_build
branch
from
September 9, 2026 17:58
bd6e28e to
bd920d4
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #11877 +/- ##
===========================================
+ Coverage 69.42% 70.27% +0.85%
===========================================
Files 2828 2810 -18
Lines 470140 462487 -7653
Branches 69425 68089 -1336
===========================================
- Hits 326353 324992 -1361
+ Misses 120081 113939 -6142
+ Partials 23706 23556 -150
*This pull request uses carry forward flags. Click here to find out more.
🚀 New features to boost your workflow:
|
jichangjichang
approved these changes
Sep 10, 2026
jichangjichang
left a comment
Contributor
There was a problem hiding this comment.
Please also check there is no error of building hipblaslt library
mengzcai
force-pushed
the
users/mengzcai/fix_hipbaslt_f4_SS_build
branch
from
September 10, 2026 11:17
bd920d4 to
67191e0
Compare
added 2 commits
September 11, 2026 17:30
JIRA ID : AIHPBLAS-835 matrixInstructionToMIParameters now emits effective (SourceSwap-transposed) MatrixInstM/N so the benchmark path matches the serialized-logic convention; validateMIParameters derives the expected pair via effectiveMatrixInstMN and drops the orientation-agnostic set check.
Drives the --cpu-only benchmark flow on a config whose only candidates are 32x16 WMMA + SourceSwap:[true]. With no square / SS-false fallback, an effective-vs-physical MatrixInstM/N regression rejects every candidate, so the group yields 0 valid solutions and printExit fails the run instead of the drop being silently masked. No LibraryLogic step: the contract under test fails inside BenchmarkProblems before any logic yaml is analyzed, so the run asserts on benchmark data and skips that step's getCUCount device probe. JIRA ID : AIHPBLAS-835
mengzcai
force-pushed
the
users/mengzcai/fix_hipbaslt_f4_SS_build
branch
from
September 11, 2026 09:34
67191e0 to
a489af4
Compare
Contributor
Author
|
Merged. The remaining CI failures (ffm gfx1250) are unrelated to this PR — they also fail on other PRs (e.g. PR #11980, which doesn't touch tox at all). |
Contributor
TheRock Submodule Bump ActivityNewest first
|
3 of 4 tasks
tony-davis
pushed a commit
to ROCm/TheRock
that referenced
this pull request
Sep 15, 2026
## Summary Test selection returns **no tests** for a change confined to TensileLite, because the nested subtree path `projects/hipblaslt/tensilelite` has no entry in `_EXTERNAL_SUBTREE_ALIASES`. This adds the alias. ## Motivation ROCm/rocm-libraries#11785 taught rocm-libraries' change detection to report `projects/hipblaslt/tensilelite` (longest-prefix match) instead of collapsing TensileLite files into `projects/hipblaslt`. `determine_rocm_test_dependencies.py` has no alias for that string, so it falls through to the `projects/` strip, produces the non-existent graph key `hipblaslt/tensilelite`, warns, and selects nothing — while exiting `0`. Verified against `df3d451` (the commit rocm-libraries pins today): ```console $ python test_tools/determine_rocm_test_dependencies.py \ --changed-projects projects/hipblaslt/tensilelite Warning: unrecognized project(s) ['hipblaslt/tensilelite']; no tests will be selected for them ["hipblaslt/tensilelite"] $ echo $? 0 ``` The consequence is visible in rocm-libraries. TensileLite-only PRs ran a sanity check and nothing else: | PR | files | multi-arch test components | |---|---|---| | ROCm/rocm-libraries#11518 | `tensilelite/src` + 2 new `tensilelite/tests/*.cpp` | no `Test tensilelite` | | ROCm/rocm-libraries#11896 | 7, all under `projects/hipblaslt/tensilelite/**` | sanity only | | ROCm/rocm-libraries#11877 | 6, all under `projects/hipblaslt/tensilelite/**` | sanity only | ROCm/rocm-libraries#11518 merged that way and was reverted by ROCm/rocm-libraries#12022 after failing `Test tensilelite` on gfx94X and gfx950 in this repo's CI — after merge, blocking the submodule bump in #8183. ## Technical Details One alias entry. `tensilelite` is already a synthetic node at level 3 (`test_policies.toml`), so selection also reaches `hipblaslt`, `rocblas` and `hipblas` transitively — the same set `shared/stinkytofu` already gets. After the change, on the real committed graph: ```console $ python test_tools/determine_rocm_test_dependencies.py \ --changed-projects projects/hipblaslt/tensilelite ["hipblas", "hipblaslt", "hipblasltprovider", "hipdnn-samples", "hipsolver", "hipsparse", "hipsparselt", "miopen", "miopenprovider", "rocalution", "rocblas", "rocsolver", "rocsparse", "rocwmma", "tensilelite"] ``` ## Risk Assessment Risk 2. Test-selection only; no product or device behaviour changes. It strictly widens selection for one input that currently selects nothing, so the failure mode is longer CI on TensileLite PRs, not reduced coverage. ## Related - Work tracking: ROCm/rocm-libraries#11784 - Introduced by: ROCm/rocm-libraries#11785 (rocm-libraries half of the nested-subtree fix) - Companion PRs: #7998 (TensileLite as a synthetic node), #7999 (longest-prefix match) - Fallout: ROCm/rocm-libraries#11518, reverted by ROCm/rocm-libraries#12022, blocking #8183 ## Testing Summary - Unit: new regression test in `determine_rocm_test_dependencies_test.py`, plus the existing suite. - Manual: CLI run against the real committed graph, before and after. ## Testing Checklist - [x] New regression test — `python -m unittest test_tools.tests.determine_rocm_test_dependencies_test -k nested_tensilelite` — Status: Passed - [x] Verified it fails without the fix (stashed the alias, test fails) — Status: Passed - [x] Full selector suite — `python -m unittest test_tools.tests.determine_rocm_test_dependencies_test` — 70 tests — Status: Passed - [ ] PR CI — Status: Pending The new test declares `[synthetic.tensilelite]` in its fixture, mirroring the real `test_policies.toml`, so it exercises the walk past the alias rather than stubbing it. Clean `stderr` is asserted deliberately: the regression was a warning plus an empty selection, not a non-zero exit. ## Device / Architecture Coverage None. Change-detection logic only; no compiled code and no device behaviour. PR CI is sufficient. ## Adjacent Tests Considered `shared/stinkytofu`, `shared/origami`, `shared/mxdatagenerator` and `shared/tensile` all resolve through the same alias table and are covered by `test_shared_blas_prefixes_mapped`; all still pass. ## Follow-ups not in this PR 1. **`projects/hipblaslt` still does not select `tensilelite`.** A non-TensileLite hipBLASLt change selects `[hipblas, hipblaslt, hipblasltprovider, hipsparselt, miopen, rocblas]`. rocm-libraries' `therock_matrix.py` maps `projects/hipblaslt` → `blas` → `[hipblaslt, rocblas, hipblas, tensilelite]`. Closing that gap means adding `tensilelite` as a consumer of `hipblaslt` in the consumer graph, which is a larger change than an alias and wants its own review. 2. **Unmapped `projects/` paths fail open.** `_EXTERNAL_ONLY_NAMESPACES` makes an unmapped `shared/` path raise, but an unmapped `projects/` path warns and exits `0`, yielding a green run with no tests. Extending the fail-closed behaviour would have surfaced this on the day ROCm/rocm-libraries#11785 merged rather than via a revert a week later. Co-authored-by: Claude Fable 5 <noreply@anthropic.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.
JIRA ID : AIHPBLAS-835
Motivation
validateMIParametersis dual-use but was fed MatrixInstM/N in two conventions: the tuning path (matrixInstructionToMIParameters) produced the physical instruction order, while serialized logic solutions carry the effective (SourceSwap-transposed) order.Related works:
#11746 , #11773
Technical Details
matrixInstructionToMIParametersgainssourceSwap(default False, so existing callers are unchanged) and stores the effective extents viaeffectiveMatrixInstMNas its final step. Internal derivations and MIBlock keep the physical mi[0]/mi[1] for the opcode. Its three callers pass SourceSwap.validateMIParametersderives the expected M/N from the physical MatrixInstruction with the same helper and compares in effective space, replacing both prior variants and again rejecting a genuinely transposed M/N.Test Plan
New GPU-less guard (
test_fp4_SourceSwap_nonsquare_guard.py): runs the--cpu-onlybenchmark flow on a config whose only candidates are 32x16 WMMA + SourceSwap:[true]. With no square / SS-false fallback a regression rejects every candidate -> 0 valid solutions ->printExitfails the run, the failure a mixed candidate list would silently mask. gfx1250 is named explicitly (gfx1250v0 has no fp4 32x16 opcode). Plus a negative control and existing SourceSwap:false paths as regression.Test Result
tox -e unit -- Tensile/Tests/unit/test_fp4_SourceSwap_nonsquare_guard.py-> 1 passed in ~3.8s.Tensile::FATAL: 0 valid solutions-> 1 failed.Submission Checklist