← Back to Pull requests

Persistent AG + GEMM MXFP8 Enablement #734

Closed
unknown closed this pull request without merging on Oct 21, 2026 12:57 UTC
View on GitHub
unknown unknown commented on Sep 09, 2026 15:42 UTC
Author

Description

Enables persistent MXFP8 AG + GEMM kernels for TN + NN layouts, and bulk overlap (wgrad AG + dgrad GEMM) with HipKittens and Userbuffers. Also swaps the NN operand slots in the baseline HipKittens MXFP8 GEMM so the transposing LDS read lands on the 2×-replicated warp axis instead of the 4× one — +6.9% geomean over 24 shapes, measured comm-free on MI350, and it lets the standalone and fused-AG NN kernels share one main loop.

Fixes https://github.com/AMD-ROCm-Internal/frameworks-internal/issues/339#issue-5246899585

Performance (Note: baseline is sequential AG + HipKittens GEMM)

| Metric | Category | MI350X | MI355X |
|---|---|---|---|
| Geometric mean | TN | 1.274x | 1.368x |
| Median | TN | 1.298x | 1.329x |
| Arithmetic mean | TN | 1.287x | 1.377x |
| Min / Max | TN | 1.010x / 1.645x | 1.133x / 1.775x |
| Geometric mean | NN | 1.194x | 1.263x |
| Median | NN | 1.228x | 1.251x |
| Arithmetic mean | NN | 1.206x | 1.273x |
| Min / Max | NN | 0.949x / 1.462x | 1.033x / 1.555x |
| Geometric mean | Bulk AG | 1.339x | 1.407x |
| Median | Bulk AG | 1.366x | 1.421x |
| Arithmetic mean | Bulk AG | 1.344x | 1.414x |
| Min / Max | Bulk AG | 1.137x / 1.542x | 1.179x / 1.667x |

Sample Perfetto traces:

MXFP8 fused AG TN

32768 tokens × 2304 out_local × 16384 hidden

Baseline: RCCL AG + HK MXFP8 GEMM
<img width="1759" height="271" alt="Screenshot 2026-09-09 150725" src="https://github.com/user-attachments/assets/675da48e-2847-4154-9124-383c7386b4c1" />

Fused AG + MXFP8 GEMM
<img width="1594" height="219" alt="Screenshot 2026-09-09 150855" src="https://github.com/user-attachments/assets/e572b2b5-4427-4381-b074-f9f5d9d0299e" />

speedup: 1.594x

Type of change

  • Documentation change (change only to the documentation, either a fix or a new content)

  • Bug fix (non-breaking change which fixes an issue)

  • New feature (non-breaking change which adds functionality)

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

  • Infra/Build change

  • Code refactoring
  • Changes

    Please list the changes introduced in this PR:

  • Change A

  • Change B
  • Checklist:

  • I have read and followed the contributing guidelines

  • The functionality is complete

  • I have commented my code, particularly in hard-to-understand areas

  • I have made corresponding changes to the documentation

  • My changes generate no new warnings

  • I have added tests that prove my fix is effective or that my feature works

  • New and existing unit tests pass locally with my changes
  • Diff: 339 lines (+254 / -85) across 4 files Reviewer: wangye805 Review duration: 60314m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.42 · 339 lines diff across 4 files
    0.42
    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%
    60%
    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.349
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #734"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% 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: 42.3% (MEDIUM) · Higher = larger blast radius
    42.3%
    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: 60.5% · Lower = rushed or shallow review
    60.5%
    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.7% · Safe to merge
    16.7%