Fix CK grouped-GEMM fallback for fused wgrad accumulation (BF16 in / FP32 out) #701
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.39) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 259 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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.333
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #701"
general
weight: 0.35
matthiasdiener
Description
On ROCm, the grouped-GEMM backend selector gated the CK fast path behind
is_supported_dtype(), which for 16-bit inputs requiredA_dt == B_dt == D_dt. This excluded the very common fused wgrad-accumulation case, whereGroupedLinear/MoE backward accumulates the weight gradient into an FP32main_gradbuffer, i.e. BF16 inputs (A/B) with an FP32 output (D). As a result every wgrad grouped GEMM fell back to the multi-stream hipBLASLt path.This PR relaxes the gate to allow
Dto be either the matching 16-bit type or Float32 for 16-bit inputs, routing the fused-accumulation wgrad GEMM through CK instead of hipBLASLt.Type of change
Changes
Please list the changes introduced in this PR:
is_supported_dtype()check innvte_multi_tensor_gemm(transformer_engine/common/gemm/cublaslt_gemm.cu) so 16-bit (BF16/FP16) inputs with matchingA/Bare accepted when the outputDis either the same 16-bit type or Float32.main_gradout) use the CK grouped-GEMM backend instead of falling back to hipBLASLt withreason=unsupported_dtype.Checklist: