← Back to Pull requests

TheRock : Code Coverage #7783

Open
unknown opened this pull request with 253 lines diff across 3 files
View on GitHub
unknown unknown commented on Aug 31, 2026 19:41 UTC
Author

Motivation

GitHub issue: #6572
Adds an end-to-end code coverage pipeline to TheRock: propagate per-project -D<PROJECT>_ENABLE_COVERAGE flags from the superbuild down to subprojects, and build/test/report coverage in CI.

Technical Details

  • CMake: therock_subproject.cmake passes <PROJECT>_ENABLE_COVERAGE through to each subproject; CMakeLists.txt adds THEROCK_COVERAGE_{ROCM_LIBRARIES_ALL,ROCM_SYSTEMS_ALL,ALL} group options driven by the coverage registry in configure_coverage_ci.py (emitted at configure time).

  • CI workflows: new multi_arch_ci_coverage_linux.yml (builds one instrumented stack, fans out per project) and multi_arch_ci_coverage_report.yml (test → merge → report, producing lcov + text summary + HTML, optional Codecov upload). A baseline_run_id overlay keeps instrumented dependencies out of each report. Supporting inputs added to test_code_coverage_component.yml, setup_test_environment, and the portable-linux build workflow (RUN_GITHUB_REPO, extra_cmake_options).

  • Python (with unit tests): configure_coverage_ci.py, merge_coverage_report.py, and cross-repo baseline support in install_rocm_code_coverage_build.py / artifact_manager.py / artifact_backend.py.

  • Docs: code_coverage.md, plus CI/dev guide updates.
  • Test Plan

  • Unit tests for the coverage/artifact scripts.

  • Passthrough check: cmake -B build -DHIPDNN_ENABLE_COVERAGE=ON → flag appears in the hipDNN configure command.

  • Dispatch Multi-Arch CI Coverage - Linux (gfx94X-dcgpu), self-contained and against a nightly baseline; verify per-project report artifacts.
  • Test Result

  • Successfully ran code coverage with existing nightly artifacts: https://github.com/ROCm/rocm-libraries/actions/runs/36168158239/job/108181888370

  • Successfully ran code coverage along with nightly build and test: https://github.com/ROCm/rocm-libraries/actions/runs/35997781443/attempts/1
  • Submission Checklist

  • Look over the contributing guidelines at https://github.com/ROCm/TheRock/blob/main/CONTRIBUTING.md.
  • Diff: 253 lines (+189 / -64) across 3 files Reviewer: endurthiabhilash Review duration: 132346m
    All Vouch review confidence checks passed
    Residual risk 0.25 = Change Risk (0.46) × (1 − Review Confidence (0.45)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.46 · 253 lines diff across 3 files
    0.46
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    44%
    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
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.331
    Real PR Conversation Timeline
    1 comments
    "Review active on #7783"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 44.7% 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: 46.1% (MEDIUM) · Higher = larger blast radius
    46.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: 44.7% · Lower = rushed or shallow review
    44.7%
    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: 25.5% · Safe to merge
    25.5%
    Repository