Enable fix from PR #11963 for gfx950 - #12187
Merged
Merged
Conversation
✅ All Checks Passed — Ready for Review
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
smalekta
approved these changes
Sep 16, 2026
smalekta
enabled auto-merge (squash)
September 16, 2026 15:14
|
🎉 All checks passed! This PR is ready for review. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #12187 +/- ##
===========================================
- Coverage 70.82% 70.40% -0.42%
===========================================
Files 2845 2812 -33
Lines 465988 462691 -3297
Branches 68628 68146 -482
===========================================
- Hits 330026 325750 -4276
- Misses 112214 113224 +1010
+ Partials 23748 23717 -31
*This pull request uses carry forward flags. Click here to find out more.
🚀 New features to boost your workflow:
|
amd-ysanchez
disabled auto-merge
September 17, 2026 09:42
smalekta
self-requested a review
September 17, 2026 12:58
amd-ysanchez
enabled auto-merge (squash)
September 17, 2026 16:26
1 task
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-4756
Motivation
This change adds regression coverage for the MX swizzle cache behavior introduced and refined around PR #11963.
The key issue is that MX scale reuse is not uniform across architectures:
That difference means stale reuse bugs are easy to introduce if the host cache state is not kept truthful. In this path, correctness depends on the interaction between canonical host buffers, preswizzled device buffers, per-solution reinitialization, and the
m_mxSwizzledDescriptorcache tag. This PR adds direct regression coverage for those rules and makes the control flow easier to reason about.This work builds upon PR #11963
Technical Details
This PR strengthens both the implementation clarity and the regression net around MX scale swizzle reuse in TensileLite.
In
tensilelite/client/src/DataInitialization.cpp, the existing MX initialization and upload flow is now explicitly described at the decision points that matter for correctness:The
initializeMXData()path distinguishes between gfx950 and gfx1250 reuse semantics.gpuInput.validswizzled buffer remains reusable.The
m_mxSwizzledDescriptorcache is treated as truth metadata, not just an optimization hint.gpuInput.validstill contains a valid swizzled layout.gpuInput.valid, the descriptor cache is repopulated with the exact scale descriptor so future reuse checks can skip unnecessary host-side swizzling.The
copySwizzledToGPUBuffer()path now has regression coverage for the core branch behavior:problemType.mxScaleFormat == 0), the code uploadscpuInput.validand invalidates any cached swizzled descriptor for that tensorgpuInput.valid, the device buffer is reused directlygpuInput.validalready contains the correct swizzled bytes for the current descriptor, host-side re-swizzling is skippedIn
tensilelite/tests/DataInit_test.cpp, this PR adds runtime-targeted coverage for the architecture split:Gfx950RequiresPerSolutionRecomputeForSwizzledMXClientProblemFactory+DataInitializationfixture using valid client-style argumentsreferenceNeedsPerSolutionRecompute(...)is false for a canonical solution (mxScaleFormat == 0) and true for a swizzled solution (mxScaleFormat == 1)Gfx1250ReusesPreswizzledMXAcrossSolutionsThe reasoning for these branches and cache transitions is also captured inline in source comments at the changed control-flow points, so future edits do not have to reconstruct the design intent from behavior alone.
Test Plan
Rebuild the TensileLite C++ test binary with tests enabled:
cmake --preset tensilelite -S .. -B my-custom-build -DTENSILELITE_BUILD_TESTING=ON -DHIPBLASLT_ENABLE_YAML=OFFcmake --build my-custom-build --parallel --target tensilelite-testsRun the focused MX runtime regression tests:
./my-custom-build/tensilelite/tests/tensilelite-tests --gtest_filter='DataInitializationReferenceRecompute.*'Re-run the targeted Tensile config tests covering the MX YAML surfaces:
python -m pytest Tensile/Tests/common/test_config.py -q -k 'sk_mx32f4_quick.yaml or subtile_mxfp8_tail_loop.yaml or mxfp4_mxfp4_fp32_tn_act.yaml or sk_mx32f4_force_dp_only.yaml or sk_dynamic_mxfp4.yaml or subtile_mxfp8_tail_loop_smoke.yaml or sk_mxfp4_atomic_variants.yaml or sk_mxfp4_problem_sizes.yaml or mx32f4_tn.yaml or sk_mxfp4_debug_modes.yaml or sk_mxfp4_tree_reduction.yaml or sk_mxfp4_comprehensive.yaml or sk_mxfp4_full_coverage.yaml or sk_mxfp4_basic_variants.yaml or sk_mxf4gemm_pap.yaml or subtile_mxfp4.yaml or mxfp4_mxfp4_bf16_tn_act.yaml'Test Result
tensilelite-testsbuilt successfully from the custom build tree with:TENSILELITE_BUILD_TESTING=ONHIPBLASLT_ENABLE_YAML=OFFFocused MX runtime gtests:
DataInitializationReferenceRecompute.Gfx950RequiresPerSolutionRecomputeForSwizzledMXpassed on gfx950Targeted Tensile config tests:
17 passed, 398 deselected, 15 warningsPytestUnknownMarkWarningfor existing custom markers and did not indicate behavioral failuresSubmission Checklist