← Back to Pull requests

perf(tensilelite): signal each GemmA2A SDMA queue once, after its last COPY #16613

Closed
unknown closed this pull request without merging on Nov 26, 2026 03:18 UTC
View on GitHub
unknown unknown commented on Nov 24, 2026 05:52 UTC
Author

JIRA ID : ROCM-27524

Motivation

A FusedA2A: GemmA2A kernel puts an SDMA ATOMIC behind every COPY on each peer queue, and the receiver's drain waits for its flag slot to reach the number of token tiles. An ATOMIC that is followed by another COPY stalls the SDMA engine for a fixed time regardless of the COPY size, so when the GEMM finishes in about one wave and the packets are small, these ATOMICs make up a large part of the transfer that cannot be hidden behind the GEMM.

Technical Details

  • The receiver only reads its flags in the drain at kernel exit, so one ATOMIC per queue is enough. The COPY for each (peer, token tile) is now submitted alone.

  • The work-group that counter2 already elects as the last submitter to a peer now puts two ATOMICs on that queue in one reservation: the peer's flag slot and this rank's outbound counter.

  • The drain now waits for each flag slot to reach 1 instead of the number of token tiles. The flag channels and their reset at the end of the drain are unchanged.

  • The tail ATOMIC relies on SDMA executing a queue's packets in order, as the per-COPY ATOMICs already did.

  • Kernel names, the kernel argument layout and the host side are unchanged.
  • Test Plan

    On gfx950 with 8 GPUs: the TensileLite gtest and the fused comm tests at world 2, 4 and 8; the hipBLASLt fused single-GPU and multi_gpu tests; and before/after timing of GemmA2A kernels on the TensileLite client.

    Test Result

    All the listed tests pass, including the hipBLASLt multi-process tests that reuse flag channels across launches at world 2 through 8. Shapes whose GEMM runs in about one wave are faster at world 2, 4 and 8; the multi-wave shapes at world 4 and 8 are unchanged.

    Submission Checklist

  • Look over the contributing guidelines at https://github.com/ROCm/TheRock/blob/main/GOVERNANCE.md#pull-requests.
  • Diff: 232 lines (+174 / -58) across 2 files Reviewer: yzhang93 Review duration: 2726m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.37) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.37 · 232 lines diff across 2 files
    0.37
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    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.326
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #16613"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% 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: 37.1% (MEDIUM) · Higher = larger blast radius
    37.1%
    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: 56.8% · Lower = rushed or shallow review
    56.8%
    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: 16% · Safe to merge
    16%