← Back to Pull requests

feat(gpu): report AMD GPU ECC errors #60843

Closed
unknown closed this pull request without merging on Nov 20, 2026 04:11 UTC
View on GitHub
unknown unknown commented on Nov 19, 2026 07:28 UTC
Author

What does this PR do?


The amd_gpu check now reports the ECC error counts that the amdgpu driver keeps in /sys/class/drm/card/device/ras/:

| Metric | New / existing | Source (ras/ attribute) | Value |
|---|---|---|---|
| gpu.errors.ecc.uncorrected.total | Existing for NVIDIA | ue of <block>_err_count (or aca_<block>) | sum over the blocks amd-smi counts and features enables (umc, sdma, gfx, mmhub, pcie_bif, hdp, xgmi_wafl); equals amd-smi metric --ecc TOTAL_UNCORRECTABLE_COUNT |
| gpu.errors.ecc.corrected.total | Existing for NVIDIA | ce of the same | same, TOTAL_CORRECTABLE_COUNT |
| gpu.errors.ecc.deferred.total | new, AMD only | de of the same | same, TOTAL_DEFERRED_COUNT; in practice UMC only, and 0 where the driver doesn't count deferred errors (e.g. MI200) |

  • All counts are since the driver loaded; on a VF they come from the host and survive guest driver reloads. They're not lifetime counts like NVIDIA's .total, and the ECC totals have no memory_location tag, as they sum blocks.

  • Deferred errors are uncorrectable errors that the hardware doesn't report as fatal right away: it poisons the affected data and the error is handled when the data is read, while the GPU keeps running. NVML has no such counter; the closest NVIDIA signal is XID 94 (contained ECC error), counted as uncorrected there.

  • On MI300/MI350-class GPUs, Linux 6.15–7.1 (ACA) expose ras/aca_<block> instead of <block>_err_count; the check falls back to it, like amd-smi.

  • If an error count can't be read or parsed (e.g. EINVAL or "Query currently inaccessible" during a GPU reset), no ECC totals are sent for that run, so they don't dip or undercount. Other metrics are unaffected.
  • Motivation


    AMD customer trial: alert on uncorrected and deferred ECC errors, like gpu.errors.ecc.uncorrected.total on NVIDIA.

    Describe how you validated your changes


  • Unit tests: realistic err_count, aca_ and features fixtures (non-zero counts, ACA fallback, disabled blocks, reset and EINVAL, malformed and unreadable attributes) and a check-level spec test.

  • dda inv test (pkg/gpu/amd, corechecks/gpu/...) and dda inv linter.go pass.

  • MI300X VF (AMD Developer Cloud, amdgpu-dkms 6.19.14, Operator-deployed agent built from an earlier revision of this branch that also sent gpu.device.unhealthy): amd_gpu OK; 21 → 25 samples per run; ECC totals are 0, equal to amd-smi metric --ecc; series arriving in dddev. RAS attribute reads: p50 ~10 µs, 5.2 ms when the guest fetches fresh counts from the host.
  • The ACA path and non-zero values are unit-tested only (the VF uses the legacy files and has no errors; RAS error injection can reset the GPU).

    Diff: 337 lines (+252 / -85) across 4 files Reviewer: gjulianm Review duration: 1242m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.42 · 337 lines diff across 4 files
    0.42
    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.348
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #60843"
    general weight: 0.35
    Reviewers
    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: 42.2% (MEDIUM) · Higher = larger blast radius
    42.2%
    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: 16.7% · Safe to merge
    16.7%