← Back to Pull requests

Fix CK FP8 grouped GEMM dtype gating for columnwise operands #594

Closed
unknown closed this pull request without merging on Jun 10, 2026 18:35 UTC
View on GitHub
unknown unknown commented on May 21, 2026 03:52 UTC
Author

Description

During an E2E Qwen Megatron run, it was observed that certain FP8 grouped GEMM WGRAD paths were unexpectedly falling back from CK grouped GEMM to multi-stream hipBLASLt grouped GEMM. Further investigation showed that the CK backend was incorrectly rejecting certain FP8 WGRAD GEMMs due to dtype gating assuming row-wise tensor storage rather than the effective canonicalized operand.

This commit fixes the FP8 grouped GEMM dtype gating logic to use the effective operand dtype after canonicalization, eliminating erroneous fallback for columnwise FP8 operands. Additionally, this commit introduces support for FP8 padding when required to satisfy kernel requirements. Finally, this commit adds shape specialization for fully aligned operands.

Observed fallback warnings:

Number of fallback warnings originally: 7680
Number of fallback warnings after applying the fix from this PR: 960

Remaining fallbacks are due to lack of fp8 accumulate support.

These changes substantially reduce unintended fallback behavior in FP8 grouped GEMM execution paths while improving handling of padded FP8 grouped GEMM configurations.

Fixes # (16708)

Type of change

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

  • [X] 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
  • Optimizations attempted but excluded:
    CK Pipeline changes (i.e., compute V3 --> V4 with double-buffered ping-pong). This change consistently resulted in considerable performance degradation.
    Tried a larger tile (256x256x128) with k-padding, which also reduced performance.

    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: 305 lines (+228 / -77) across 3 files Reviewer: aris134 Review duration: 29683m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.40) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 305 lines diff across 3 files
    0.40
    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.342
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #594"
    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: 40.2% (MEDIUM) · Higher = larger blast radius
    40.2%
    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: 17.4% · Safe to merge
    17.4%