feat(tensilelite): select fused GEMM+A2A kernels per world and A2A extent #13619
All Vouch review confidence checks passed
Residual risk 0.20 = Change Risk (0.50) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.50 · 596 lines diff across 7 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.382
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #13619"
general
weight: 0.35
yzhang93
Motivation
The fused GEMM + all-to-all (A2A) kernel computes a GEMM on each of several GPUs and, in the same kernel, sends slices of its output D to the other GPUs. Besides the matrix sizes, two numbers shape that work: the world, or number of GPUs taking part, and the A2A extent, the number of leading M indices of D that are split across those GPUs and sent (the rest stays local). hipBLASLt already passes both to kernel selection, but the TensileLite tuning flow has no place for them: the tuning YAML cannot set them, and the results file and the generated logic (the table hipBLASLt uses to pick a kernel for a problem) do not record them. As a result, tuning cannot keep a different winning kernel per world or extent, and the gfx950 logic shipped for this kernel holds 3 placeholder rows with an unmeasured performance of 1000, keyed only on sizes and leading dimensions.
JIRA ID : AIHPBLAS-4534
Technical Details
This PR is stacked on #12472; only the 3 commits after it belong here.
Exact: {sizes: [M, N, B, K], world: W, a2aExtent: E}.worldis required (1 to 8) anda2aExtentdefaults to M. Fused problem types reject list-formExact,Range, batch above 1, and the bias, scale, activation, grouped and sparse options.--fused-a2a-worldand--fused-a2a-am; the new--world-filterruns a subset. Each problem runs on its firstworldGPUs.FusedA2ARunneris deleted, and its receive buffer becomes a problem tensor,A2A_BUF.WorldandA2AExtent, LibraryLogic picks one winner per (sizes, world, A2A extent), and fused logic rows end with those 2 values. The runtime exact-match lookup gets matchingWorldandFusedA2AExtentkeys. Fused logic must use the Equality distance; a fused row without world and extent is rejected. Non-fused logic is unchanged.ContractionProblem::world()(default 1) replacesfusedA2AWorld(). TheGemmA2AShapecheck replacesFusedA2ATileDivisibleand adds limits on the extent, batch, D type and layout and copy-engine (SDMA) transfer sizes.TensileLibLogicToYamlno longer turns a dict-formExactfrom benchmark data into the list of its keys.Effects on other paths: every GEMM problem gains an
A2A_BUFslot that stays empty unless fused, the client synchronizes its GPUs after each solution outside the timed region, benchmark problem lists are written as valid YAML, and rotating-buffer copies start on 256-byte boundaries.Test Plan
pytest -m unit.tensilelite-tests(C++ unit tests for the TensileLite runtime and client) and hipBLASLt built in a ROCm 7.14 container.tensilelite-tests;tox -e comm -- -k fused_a2a; the existing single-GPU GEMM test configs; hipBLASLtA2Agtests;hipblaslt-bench --verifyat world 2 and 4 on both shipped shapes, plus an extent and a K not in the logic.tox -e comm -- -k fused_a2a; hipBLASLtA2Agtests;hipblaslt-bench --verifyat world 2, 4 and 8 on both shipped shapes, plus world 5, an extent and a K not in the logic.fused_a2a.yamlwith the 2 shipped shapes at world 2, 4 and 8,SyncsPerBenchmark: 1,EnqueuesPerSync: 40,NumWarmups: 40,NumBenchmarks: 10,UseEffLike: False, and full validation of each winner.Test Result
pytest -m unit: 10428 passed, 375 skipped; the 5 failures needhip/hip_runtime.h, which the host lacks.tensilelite-tests657 passed, 4 skipped.tox -e commworld 2 and 4 passed, each writing logic rows for its own world only; world 8 was skipped. 29 single-GPU configs passed.A2Agtests 45 passed, 4 skipped (the 5- to 8-GPU cases). The bench used the tuned row at world 2 and 4, and the fallback for the other extent and K.tox -e commworld 2, 4 and 8 passed, each writing logic rows for its own world only.A2Agtests 49 passed. The bench used the tuned row at world 2, 4 and 8, and the fallback at world 5 and for the other extent and K.UseSubtileImpl=Truekernel won all 6 problems in 2 independent runs, and every winner passed full validation.Submission Checklist