← Back to Pull requests

feat(tensilelite): write the ranks on a gfx1250 GemmA2A rank's own card directly #16923

Open
unknown opened this pull request with 428 lines diff across 5 files
View on GitHub
unknown unknown commented on Nov 28, 2026 13:51 UTC
Author

Motivation


The gfx1250 fused GEMM + all-to-all kernel (ROCm/rocm-libraries#16880) reaches every destination rank through a copy engine (SDMA), including the rank itself and, on a DPX card, the other partition of the same card. For those destinations the kernel's own work-groups can store the data into the receive buffer, and every copy queue opened to them shares the partition's copy engines with the others. This pull request lets the gfx1250 kernel write a rank directly when it is given no queue for it, and makes the TensileLite client and the hipBLASLt library use that for the ranks on the caller's own card.

JIRA ID : AIHPBLAS-5959

Technical Details


  • Kernel arguments: a destination rank is direct when its peer_queueBuf entry is null. The argument layout does not change, and with every queue present every rank goes through SDMA as before.

  • Stores: a work-group whose destination rank is direct repeats each batch of output stores into that rank's receive buffer, from the same registers and at system scope, before the barrier that ends the block. Rows past the matrix edge fall outside a bounds-checked buffer descriptor, so no lane mask is needed. With every queue present a work-group pays one scalar load at entry and one compare and untaken branch per batch.

  • Handshake: for a direct destination the kernel submits no copy command, and the work-group that completes the rank's last band raises the rank's arrival flag and this rank's outbound counter with one system-scope atomic each instead of two queue commands. The final waits for incoming and outgoing transfers are unchanged.

  • Limits: validation rejects gfx1250 GemmA2A with UseSubtileImpl, CompactLoopStore or StoreRemapVectorWidth > 0, and building the kernel arguments with GlobalSplitU other than 1 throws.

  • TensileLite client: with --fused-a2a=GemmA2A on gfx1250 each rank writes every rank on its own card (same PCI domain, bus and device, itself included) directly and opens no copy queue to them; the remaining queues are created in rank order, the k-th asking for the k-th engine of its link's recommended mask. A gfx1250 GemmA2A library and a client from before and after this change cannot be mixed.

  • hipBLASLt library: on a gfx1250 epilogue, a HIPBLASLT_FUSION_A2A_SDMA_QUEUES entry whose four addresses are all null means the kernel writes that rank directly. Partly null entries are still rejected, as are all-null entries on other architectures (HIPBLAS_STATUS_INVALID_VALUE). This changes the meaning of the attribute for callers of the experimental fused API (HIPBLASLT_ENABLE_GEMM_A2A_FUSION); no signature or structure changes.

  • Other kernels: gfx950 GemmA2A and the non-GemmA2A gfx1250 kernels emit the same assembly as before.
  • Test Plan


    A characterization test checks that the gfx1250 GemmA2A kernels carry the direct-store path. Unit and C++ tests cover the rejected store parameters, the split-K guard, the client's card mask and queue plan, and the library's handling of all-null and partly null queue entries.

    Test Result


    On the host, the TensileLite unit and characterization suites, tensilelite-tests and the host-side hipblaslt-test FusedA2A cases pass, apart from failures that also occur without these changes in the same environment.

    Submission Checklist


  • Look over the contributing guidelines at https://github.com/ROCm/TheRock/blob/main/GOVERNANCE.md#pull-requests.
  • Diff: 428 lines (+321 / -107) across 5 files Reviewer: DDEle Review duration: 4072m
    All Vouch review confidence checks passed
    Residual risk 0.24 = Change Risk (0.45) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.45 · 428 lines diff across 5 files
    0.45
    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%
    46%
    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.363
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #16923"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% 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: 45.1% (MEDIUM) · Higher = larger blast radius
    45.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: 46.7% · Lower = rushed or shallow review
    46.7%
    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: 24.1% · Safe to merge
    24.1%