[MIOpen] Sync hipconv v0.5.0 #15149
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.48) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.48 · 551 lines diff across 6 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.378
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #15149"
general
weight: 0.35
JonathanLichtnerAMD
JIRA ID : ALMIOPEN-2361
Takes the vendored
src/hipconvsnapshot from v0.4.0 to v0.5.0-rc7, and ports theConvHipConv solver to the v0.5 API. Per-version detail is in the shipped
src/hipconv/CHANGELOG.md.Kernels
v0.5.0 adds
direct_flexon gfx950, an implicit-GEMM direct convolution for denseconv2d and conv3d fprop and dgrad in fp16 and bf16, with filters up to 16 per axis and
any stride, dilation and padding. Dilated layers had no hipconv kernel before.
The existing kernels run more layers:
direct_l1runs 3x3x3 fprop and stride-1 dgrad in fp16, bf16 andtf32, and the grouped and depthwise kernels run conv3d in all three directions.
direct_l1,direct_wgradand the depthwise kernels on gfx950;1x3, 3x1, 1x5, 5x1 and 7x1 in
directand 1x5 and 5x1 indirect_wgradon gfx1250.and 32, on gfx950.
direct_wgradandgrouped_wgradon gfx950 write dW in the weight type.patch_embed. A MIOpen build had no hipconv kernelfor it, since MIOpen builds without the explicit-GEMM
pointwise.grouped fprop and dgrad on gfx950 whose tensors do, single images included.
direct_l1now returns every valid config for a layer, best first, so Find and tuningreach configs it used to leave out. gfx950
groupedfprop and dgrad split each image'srows across XCDs on layers with fewer than 8 images, and gfx1250
groupedpicks animage-height split from the CU count.
Fixes that apply to the currently vendored v0.4.0:
direct_wgradcould write wrong dW when compiled with clang 23, on layers whoseC or K does not fill the last tile.
direct,direct_l1anddirect_wgradand in gfx1250
direct, and a gfx1250directcrash on layers with large padding.config_version()moves fromv0.4tov0.5, so ConvHipConv perf-db records tunedagainst v0.4.0 no longer match, and those layers fall back until they are tuned again.
Solver
ConvHipConv builds the
hipconv::Devicethat hipconv's selection and launch now take,with the CU count from
GetMaxComputeUnits(). For 16-bit backward weights it writes dWin the weight type with each kernel that supports it, and stages fp32 dW for
CastTensoronly for the others;GetWorkspaceSize()reports the largest workspace overthe configs, fp32 staging included. A config read from the perf db is looked up by name
with
hipconv::find_kernel, without enumerating. WithMIOPEN_CONVOLUTION_ATTRIB_DETERMINISTICset, the solver rejects only the kernels thathipconv reports as adding into dW atomically.
Build
projects/miopen/src/CMakeLists.txtsetsHIPCONV_FORCE_STATICbeforeadd_subdirectory(hipconv). hipconv after v0.4.0 builds libhipconv as a shared librarywhen
BUILD_SHARED_LIBSis on, and MIOpen installs onlylibMIOpen.so, so without theline
libMIOpen.sowould need alibhipconv.sothat is never installed.Tests
unit_conv_solver_ConvHipConvgains a small NHWC or NDHWC problem for each kernelv0.5.0 adds, six depthwise conv3d problems in all three directions, gfx950 grouped
stride-2 backward-data and backward-weights suites, and a check that every grouped
16-bit dW config computes on exactly the workspace its solution reports and fails with
one byte less.
Related
#14532 re-enables the ConvHipConv perf-config picker on gfx950. Its model is trained on v0.4 configs, which v0.5 no longer accepts, so it needs retraining after this PR.
#15333 added HIPCONV_DISABLE_ASAN to the vendored hipconv as a stopgap for ROCm/TheRock#9812.
Downstream patches
v0.5.0-rc7 defines HIPCONV_DISABLE_ASAN natively, with the same name, default and effect as #15333's stopgap, so the snapshot replaces it and no downstream patch remains.
Authors
Co-authored-by: Andrew Lavin <andrew.lavin@amd.com>
Co-authored-by: Boris Prokopenko <boris.prokopenko@amd.com>
Co-authored-by: Carsten Uphoff <carsten.uphoff@amd.com>
Co-authored-by: Jin Zhou <jin.zhou@amd.com>
Co-authored-by: Petar Jovanovic <petar.jovanovic@amd.com>
Co-authored-by: Yingmao Lu <yingmao.lu@amd.com>