← Back to Pull requests

feat(tensilelite): run gfx950 A2AGemm on the subtile main loop #16606

Open
unknown opened this pull request with 320 lines diff across 4 files
View on GitHub
unknown unknown commented on Nov 24, 2026 02:29 UTC
Author

JIRA ID : ROCM-27524

Motivation

A2AGemm (FusedA2A: A2AGemm) is a TensileLite GEMM kernel that also performs an all-to-all exchange: while it multiplies, it gathers the K slices of matrix B from the other GPUs through the SDMA copy engines and consumes them one segment at a time. hipBLASLt runs it through the fused prologue added in #15352. The kernel could not use the subtile main loop (UseSubtileImpl), the faster BF16 GEMM path on gfx950, because it reran the loop's prologue and tail for every segment. On the production shapes the subtile kernels are faster.

Technical Details

  • One software pipeline now covers all K segments. At a segment boundary the kernel only waits for the segment's ready flag and moves the A and B read addresses and the loop counter to the next segment. The main-loop bodies are unchanged.

  • FusedA2A: A2AGemm runs on the subtile kernel body, with the segment switches outside the loop body. SwizzleTensorA/B is rejected for A2AGemm because the segment offsets do not follow the pre-shuffled layout.

  • Generated fused kernels no longer count as rocRoller custom kernels when two solutions tie on an exact size. That path appended rows without the world and extent fields to the fused logic and stopped the library build with fused GEMM+A2A logic row ... has 8 fields.

  • The gfx950 A2AGemm logic now ships three subtile solutions, MT256x256x64 with A2ASubRounds 1, 2 and 4, for the production shapes and the multi-process test shapes.

  • Only A2AGemm kernels and their logic change; the GemmA2A and plain BF16 subtile kernels generate the same assembly as on develop. One saved test result, test_a2a_gemm_loop_char.ambr, gains the kernel names of the new test groups.
  • Test Plan

    comm/gfx950/a2a_gemm_loop.yaml gains subtile and single-pipeline groups, and test_a2a_gemm_loop_char.py checks where each kernel switches segments and that the loop body contains no A2A code. The TensileLite unit suite, the comm configs, the hipBLASLt fused tests and hipblaslt-bench-a2a --verify were run on MI355X.

    Test Result

    The unit suite shows only the failures that develop shows in the same environment. On 8 MI355X GPUs, the comm configs pass with full validation at every world from 2 to 8 that they list, the hipBLASLt fused single-GPU and multi-GPU tests pass, and hipblaslt-bench-a2a --verify passes and selects the solution in the logic for each shape.

    Submission Checklist

  • Look over the contributing guidelines at https://github.com/ROCm/TheRock/blob/main/GOVERNANCE.md#pull-requests.
  • Diff: 320 lines (+240 / -80) across 4 files Reviewer: yzhang93 Review duration: 10570m
    All Vouch review confidence checks passed
    Residual risk 0.24 = Change Risk (0.42) × (1 − Review Confidence (0.43)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.42 · 320 lines diff across 4 files
    0.42
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    42%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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.345
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #16606"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 43.0% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 41.9% (MEDIUM) · Higher = larger blast radius
    41.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 43.0% · Lower = rushed or shallow review
    43.0%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 23.9% · Safe to merge
    23.9%