← Back to Pull requests

[MIOpen] Sync hipconv v0.5.0 #15149

Closed
unknown closed this pull request without merging on Nov 13, 2026 02:55 UTC
View on GitHub
unknown unknown commented on Nov 05, 2026 16:36 UTC
Author

JIRA ID : ALMIOPEN-2361

Takes the vendored src/hipconv snapshot from v0.4.0 to v0.5.0-rc7, and ports the
ConvHipConv solver to the v0.5 API. Per-version detail is in the shipped
src/hipconv/CHANGELOG.md.

Kernels

v0.5.0 adds direct_flex on gfx950, an implicit-GEMM direct convolution for dense
conv2d 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:

  • conv3d on gfx950: direct_l1 runs 3x3x3 fprop and stride-1 dgrad in fp16, bf16 and

  • tf32, and the grouped and depthwise kernels run conv3d in all three directions.
  • 1xn and nx1 filters in direct_l1, direct_wgrad and the depthwise kernels on gfx950;

  • 1x3, 3x1, 1x5, 5x1 and 7x1 in direct and 1x5 and 5x1 in direct_wgrad on gfx1250.
  • Stride 2 for grouped dgrad at 8 channels per group and for grouped wgrad at 4, 8, 16

  • and 32, on gfx950.
  • 16-bit dW: direct_wgrad and grouped_wgrad on gfx950 write dW in the weight type.

  • 1x1 at stride 1 on gfx950, through patch_embed. A MIOpen build had no hipconv kernel

  • for it, since MIOpen builds without the explicit-GEMM pointwise.
  • Layers past 2 GiB: depthwise layers whose image exceeds it, on gfx950 and gfx1250, and

  • grouped fprop and dgrad on gfx950 whose tensors do, single images included.

    direct_l1 now returns every valid config for a layer, best first, so Find and tuning
    reach configs it used to leave out. gfx950 grouped fprop and dgrad split each image's
    rows across XCDs on layers with fewer than 8 images, and gfx1250 grouped picks an
    image-height split from the CU count.

    Fixes that apply to the currently vendored v0.4.0:

  • gfx950 direct_wgrad could write wrong dW when compiled with clang 23, on layers whose

  • C or K does not fill the last tile.
  • LDS races and synchronization gaps in gfx950 direct, direct_l1 and direct_wgrad

  • and in gfx1250 direct, and a gfx1250 direct crash on layers with large padding.

    config_version() moves from v0.4 to v0.5, so ConvHipConv perf-db records tuned
    against v0.4.0 no longer match, and those layers fall back until they are tuned again.

    Solver

    ConvHipConv builds the hipconv::Device that hipconv's selection and launch now take,
    with the CU count from GetMaxComputeUnits(). For 16-bit backward weights it writes dW
    in the weight type with each kernel that supports it, and stages fp32 dW for
    CastTensor only for the others; GetWorkspaceSize() reports the largest workspace over
    the configs, fp32 staging included. A config read from the perf db is looked up by name
    with hipconv::find_kernel, without enumerating. With
    MIOPEN_CONVOLUTION_ATTRIB_DETERMINISTIC set, the solver rejects only the kernels that
    hipconv reports as adding into dW atomically.

    Build

    projects/miopen/src/CMakeLists.txt sets HIPCONV_FORCE_STATIC before
    add_subdirectory(hipconv). hipconv after v0.4.0 builds libhipconv as a shared library
    when BUILD_SHARED_LIBS is on, and MIOpen installs only libMIOpen.so, so without the
    line libMIOpen.so would need a libhipconv.so that is never installed.

    Tests

    unit_conv_solver_ConvHipConv gains a small NHWC or NDHWC problem for each kernel
    v0.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>

    Diff: 551 lines (+413 / -138) across 6 files Reviewer: JonathanLichtnerAMD Review duration: 10699m
    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
    0.48
    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%
    60%
    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.378
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #15149"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% 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: 48.1% (MEDIUM) · Higher = larger blast radius
    48.1%
    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: 60.5% · Lower = rushed or shallow review
    60.5%
    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: 19% · Safe to merge
    19%