← Back to Pull requests

fix(dnn-providers): decline graphs engines cannot serve #15768

Closed
unknown closed this pull request without merging on Nov 18, 2026 00:21 UTC
View on GitHub
unknown unknown commented on Nov 13, 2026 17:14 UTC
Author

Summary


Some provider engines accepted graphs they cannot serve, then returned wrong results, overran a buffer, or failed late at plan build or execute. Each engine now declines these graphs in isApplicable, before plan build, and logs the cause. Three cases the first version declined are served: size-1 batch axes (hipBLASLt), a lower-rank per-channel conv bias (MIOpen) and a both-virtual batchnorm saved pair.

This PR does not make the touched builders safe for every graph. Known problems that predate it are listed under "Not in this PR" and tracked in #16023, #16024, #16026-#16033 and ALMIOPEN-3313, 3016, 3309, 3310, 3331.

JIRA ID : ALMIOPEN-3259

Risk Assessment


Risk 3. Host-side applicability checks in three providers; no kernel or launch code changes. The main risk is declining a graph that is served today. Each decline follows the library's own checks where one exists, and the existing positive suites and the standard integration tier pass unchanged.

When no plan builder applies, all four engines (ASM SDPA, MLOps, hipBLASLt, MIOpen) now throw HIPDNN_PLUGIN_STATUS_INTERNAL_ERROR from initializeExecutionContext. Before, the plan-less context failed later, at the workspace query, with the same status. The backend still returns HIPDNN_STATUS_PLUGIN_ERROR and the frontend still falls back to the next engine configuration (#14307). The ASM SDPA and MLOps workspace queries now throw too; hipBLASLt and MIOpen still return 0 (#16033). These paths are reached only when isApplicable and the plan builders disagree.

ASIC Coverage


| Target | Commit | Result |
|---|---|---|
| gfx942, gfx950 | a51e9c37300 | MIOpen and hipBLASLt unit binaries, HKP SDPA/MLOps/norm/resample subset, batchnorm integration tests, every new device-gated test: 0 failed |
| gfx942, gfx950 | 35bd383e301 | standard integration tier, all three provider lanes: passed |
| gfx1151 | 35bd383e301 | HKP WMMA matchers, engine census, full unit binary: no new failures against the base |
| Windows gfx1151 | a51e9c37300 | hipBLASLt plugin API tests skip under #9962; unserved-graph test passes |
| gfx90a | - | HIP launch-limit probe behind the resample bound: 2^32 threads rejected, 2^32 - 256 accepted |

The later commits (resample bound 1b0ae442928, develop merges up to 4bedf9be9a9) are host-tested.

Testing Summary


  • Each decline has a test that changes one property of a served graph and expects a decline; accept rows pin the boundaries.

  • Removing any host-reachable guard fails a host test (per guard at b56540f2728c, 28 review-fix mutants at a51e9c37300, the resample bound at 1b0ae442928). Device-only guards are covered by the device runs.

  • MX GEMM declines build only with HIPBLASLTPROVIDER_ENABLE_MX_GEMM=ON, which no CI lane sets; host-tested locally, no device run.
  • Testing Checklist


  • Host unit tests at 4bedf9be9a9, no GPU: HKP 1006, hipBLASLt 224, MIOpen 1269 passed; 0 failed - Status: Passed

  • gfx942 and gfx950 unit and batchnorm integration tests at a51e9c37300 - Status: Passed

  • gfx942 and gfx950 standard integration tier at 35bd383e301 - Status: Passed

  • gfx1151 HKP at 35bd383e301; Windows gfx1151 hipBLASLt at a51e9c37300 - Status: Passed

  • PR CI at 4bedf9be9a9 - Status: Pending
  • Technical Changes


    Evidence: Device = reproduced on a GPU; Execute = accepted, then failed at plan build or execute; Earlier = declined at the base without a named cause; Defensive = not reachable through the backend, or not observed failing.

    | Provider | Now declined | Evidence |
    |---|---|---|
    | hipBLASLt | Mixed A/B types; unsupported bias or activation-output type; pass-by-value tensors; wrong virtual flags; non-packed bias; batch axes of extent above 1 that do not share one flattened stride, or a fused output with a different batch layout; MX (flag-gated): negative or non-dense scales | Device (bias, batch layout, MX); Execute (pass-by-value, virtual); Earlier (types) |
    | MIOpen batchnorm | Partial running statistics or an unpaired saved pair; running statistics or a fused activation without the saved pair (a provider plan limit, #16028); a saved pair with one virtual; wrongly typed running statistics; virtual or pass-by-value buffers; a ReLU lower clip without an upper clip (#16029) | Device (types, pass-by-value); Execute (saved pair, virtual, clip); Defensive (partial, unpaired) |
    | MIOpen convolution | Pass-by-value tensors; a bias not per channel or of rank above the output's; a fused output that differs from MIOpen's output descriptor | Device (pass-by-value, bias); Execute (output) |
    | MIOpen unary pointwise | Pass-by-value tensors; different input and output dims; any pair not both packed with one layout (workaround for #16024) | Device; Execute (baked value); Defensive (dims) |
    | HKP MLOps batchnorm, LayerNorm, RMSNorm, resample | Partial running statistics; virtual buffers (fused RMSNorm checks x, y, inv_rms forward and dy, dx, dscale, dbias backward); element counts past the kernels' 32-bit limits (resample forward: a launch of 2^32 threads); an epsilon or momentum the graph cannot resolve | Device (statistics, counts); Execute (virtual); Defensive (epsilon, momentum) |
    | HKP attention | ASM SDPA and Flash2: attributes the kernels ignore; ASM SDPA forward: inconsistent Q/K/V/O shapes. Unified and WMMA: unsupported compute types. FlyDSL RMSNorm: operands past 2^31-1 bytes (forward gamma, inv_rms; backward x, dy, dx, inv_rms). A ragged_offset_multiplier without a ragged offset | Device (ASM SDPA and Flash2; shapes only through deserialize or the raw backend); Defensive (rest) |

    Served or unchanged:

  • A both-virtual batchnorm saved pair is served as "not requested" unless running statistics or a fused activation are present. LayerNorm and RMSNorm training graphs that request no saved statistics stay declined.

  • hipBLASLt ignores size-1 batch axes. The A operand [4,1,4,8]/[32,7,8,1] now gets batch offset 32; the base used the wrong offset 7.

  • MIOpen left-pads a lower-rank per-channel conv bias. Binary pointwise is unchanged.

  • The hipBLASLt and MIOpen OperationSupport.md pages list the new rules.
  • Not in this PR (wrong at the base and at this head, reproduced on gfx950):

  • Packed unary activations of different shapes on one handle (#16023, #16026, ALMIOPEN-3310).

  • A conv bias whose type differs from the input (ALMIOPEN-3016, #16008).

  • A column-major matmul output (ALMIOPEN-3313).

  • BN inference, then ReLU backward, then BN backward without saved statistics (#16027).

  • ASM SDPA backward compute type and virtual operands (#15148); Flash2 no-plan and ragged handling (engine off by default).
  • Diff: 650 lines (+487 / -163) across 8 files Reviewer: BrianHarrisonAMD Review duration: 6187m
    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
    0.52
    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.388
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #15768"
    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: 52% (MEDIUM) · Higher = larger blast radius
    52%
    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: 20.5% · Safe to merge
    20.5%