FlyDSL persistent work-stealing grouped GEMM enablement (gfx950) #746
All Vouch review confidence checks passed
Residual risk 0.30 = Change Risk (0.55) × (1 − Review Confidence (0.45)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.55 · 511 lines diff across 6 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 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.373
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #746"
general
weight: 0.35
matthiasdiener
Description
Fixes https://github.com/AMD-ROCm-Internal/frameworks-internal/issues/338
Adds grouped GEMM support to the FlyDSL backend on gfx950. Every expert runs in
a single persistent kernel launch: workgroups pull output tiles from a per-tile work queue using either a static grid stride or atomic work-stealing.
Supported precisions: BF16/FP16, tensor-wise FP8 (current and delayed scaling), and MXFP8. Supported formats: TN/NN/NT.
Usage
Opt in with
NVTE_USE_GROUPED_GEMM_FLYDSL=1(gfx950,flydslinstalled). FlyDSL is thenselected in
GroupedLinearthe same way as the Triton grouped backend:general_grouped_gemm_flydslis a drop-in forgeneral_grouped_gemm.Anything the kernels can't serve falls back to the default grouped GEMM. That includes
bias, GELU, wgrad accumulation, fused/delayed wgrad, blockwise FP8, and features
not divisible by 128. Set
NVTE_FLYDSL_GEMM_WARN_FALLBACK=1to enable fallback warning messages.Optional tuning:
NVTE_FLYDSL_GROUPED_SCHED=auto|static|worksteal: override the schedule choice.NVTE_FLYDSL_WGRAD_MAX_BUCKETS: cap the number of wgrad launches.Design notes
place through per-expert base pointers.
expert doesn't force every expert to pad to its size. When the weight gradients are one
contiguous buffer, the kernel writes into it directly with no copy-out.
dtypes. A small per-dtype record (
_GroupedKernel) holds the parts that differ: howoperands and scales are read, and how the kernel is launched.
Other changes
flyc.compilepath (compiled_launch) skipsFlyDSL's per-call setup, which matters at small M.
fx.Index→fx.Int64:fx.Indexis deprecated per FlyDSL's kernel authoringguide;
fx.Int64is the recommended type for index and offset values.placeholder_arg,get_num_cus, andcompiled_launchnow live ingemm_common_utils.pyinstead of being copied into each kernel module.Testing
test_grouped_linear_accuracy_rocm_backendsgains aflydslbackend: 868 cases,420 passed / 0 failed. The 448 skips are configs FlyDSL doesn't support (blockwise FP8, FP32, unquantized fused wgrad). A recorder checks that each expected
phase actually ran on FlyDSL rather than silently falling back.
test_grouped_linear_flydsl_fp8_scaling: a multi-step accuracy test forcurrent and delayed scaling. Delayed scaling uses unit scales on its first step, so
the single-step test can't catch per-expert scale bugs; this test checks that the
compared step uses real, per-expert scales.
🤖 Generated with Claude Code
Performance
See: https://github.com/AMD-ROCm-Internal/frameworks-internal/issues/338#issuecomment-6327888906
Type of change
Changes
Please list the changes introduced in this PR:
Checklist: