fix(miopen): drop the gfx950 hard-coded 3D forward kernel rule #16428
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 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.388
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #16428"
general
weight: 0.35
JonathanLichtnerAMD
JIRA ID : ROCM-34321
Motivation
On gfx950,
ConvHipImplicitGemm3DGroupFwdXdlopsreturns one fixed CK instance as the default kernel for FP16 and BF16 3D forward convolutions with input depth of at least 3 and input width of at least 256 whenever that instance is applicable, ahead of the AI heuristic. Wan VAE layers hit this, and they fail the 3D convolution QA baseline gate on MI350X and MI355X.The cause is a hard-coded gfx950 rule in
HeuristicInit(Step 2, added in #2282). For these problems it returnsDeviceGroupedConvFwdMultipleABD_Xdl_CShuffle_V3<256, 256, 256, 32, ..., Intrawave, v3>before the AI heuristic runs. Before CK #10245 that instance was not applicable to the large Wan VAE layers, so the rule never fired there. Since #10245 it is applicable, so the rule fires and the AI heuristic never runs for those layers. The rule has no check on channels, filter size, stride, dilation or groups.The rule also hides the gfx950 3D forward AI model on every problem it matches, so a retrained model can't fix those problems while the rule is in place.
Technical Details
PerformanceConfigHipImplicitGemm3DGroupFwdXdlops::HeuristicInitnow runs on gfx942 only. The gfx950 branch is removed. gfx950 FP16 and BF16 problems go from the index override straight to the AI heuristic (Step 3), then the default (Step 4), as FP32 already does.MIOPEN_DEBUG_3D_CONV_IMPLICIT_GEMM_HIP_FWD_XDLOPS_HARDCODEkeeps working there. Its entry inenv_variables.rstand the CHANGELOG line added with #12947 now say the hard-coded picks are gfx942 only. On gfx950 the env var no longer changes anything.MIOPEN_DEBUG_3D_CONV_IMPLICIT_GEMM_HIP_FWD_XDLOPS_HARDCODE=0. It also drops theFillValidKernelscall that Step 2 made on every gfx950 FP16 and BF16 heuristic init.gfx942check inside Step 2 is now always true. It is left in place because removing it would reindent the whole gfx942 table with no change in behavior.Gfx950NoHardcodedPickintest_perf_config_HipImplicitGemm3DGroupFwdXdlops, one BF16 and one FP16 case. On gfx950 it runsHeuristicInitwith the HARDCODE env var on and then off, on problems where the removed rule used to fire (Wan VAE stage 2, stride 2 and dilation 2 in all three dimensions), and expects the same kernel both times. It fails if a gfx950 hard-coded pick behind the HARDCODE env var comes back for these problems, and it does not pin a specific AI pick, so model updates don't break it. It skips on other devices.env_debug.cppregisters the HARDCODE env var so the test can set it. Its contents compile only when tests are built.Test Plan
MIOpenDriverin the default find mode with a fresh user db per run, three repetitions, on the same 16 shapes. Compared the selected kernel and kernel time against develop, against develop withMIOPEN_DEBUG_3D_CONV_IMPLICIT_GEMM_HIP_FWD_XDLOPS_HARDCODE=0, and against aMIOPEN_FIND_ENFORCE=SEARCHtuned run.MIOpenDriverin the same mode on 26 more shapes inside the rule's range: the Wan VAE shapes #2282 was written for, plus other channel counts, pointwise and temporal filters, NDHWC layout, groups, batch and wider inputs. Each was compared against develop and checked with-V 1.test_unit_conv_solver_ConvHipImplicitGemm3DGroupFwdXdlops,test_unit_conv_solver_ConvHipImplicitGemm3DGroupFwdXdlops_LargeStride,test_perf_config_HipImplicitGemm3DGroupFwdXdlops,test_perf_config_group_search_starts_at_kernel_zero,test_group_conv3d_fwd,test_conv_ai_nd_kernel_tuning_utils,test_conv_ai_nd_heuristics_test,test_conv_ai_candidate_selection_model,test_lgbm_pcfg_picker,test_conv_api_solution_count_3d_large_stride,test_unit_ck_impl_loader.check_names.pyon the updated test list.Test Result
-V 1with the change.check_names.pypasses.Gfx950NoHardcodedPickcases ran there and passed, along with the rest of the MIOpen gtest shards.Submission Checklist