← Back to Pull requests

[CI] Cache CuPy initialization in GPU CI #12668

Closed
unknown closed this pull request without merging on Oct 08, 2026 07:43 UTC
View on GitHub
unknown unknown commented on Oct 07, 2026 11:25 UTC
Author

Experimental CI optimization; the simplified cache key still needs a cold/warm CI comparison.**

Fresh GPU runners spend 12–16 minutes in CuPy/Jitify initialization before Python tests begin. Persist CUPY_CACHE_DIR across runs for all five GPU Python configurations without changing test coverage.

The workflow uses standard actions/cache/restore and actions/cache/save steps with a readable key containing the matrix configuration, image tag, CuPy version, CUDA runtime version and NVRTC version. Runtime dependency versions matter because the image tag can be mutable. No commit SHA or broad restore keys are used. The save step reuses the restore action's primary key.

Keep separate restore/save steps to preserve compilation work when tests fail; skip saving on cancellation or an exact cache hit. Cache transfer failures are nonfatal. Time the existing Jitify warm-up to make cache effectiveness visible. CuPy also performs its own internal cache versioning.

Validation:

  • Repository pre-commit checks, actionlint 1.7.12 (with existing RunsOn labels configured), shell syntax and whitespace checks passed. Optional actionlint shellcheck/pyflakes integrations were disabled.

  • Executed the simplified workflow key-generation step in the local xgboost environment: cupy-14.2.0-cuda-12090-nvrtc-12.9.

  • With the preceding fingerprint-based key, all five GPU jobs passed on both cold and warm attempts. Initialization fell from 12–16 minutes to 0.4–1.3 seconds; combined GPU job time fell from 125.6 to 54.8 runner-minutes (56%, approximately $1.28 of modeled AWS On-Demand compute per full matrix).

  • Those measurements validate the caching mechanism, not the newly simplified key. The cupy-v2 format intentionally starts a fresh cache namespace.
  • Before removing DO NOT MERGE, complete a cold/warm comparison with this revision across CUDA 12/13, x86/ARM and multi-GPU; check failed-test cache saving, environment invalidation and default-branch/PR cache scoping with the RunsOn backend.

    Previous cold-cache run · Previous warm-cache run · CuPy caching guidance

    Diff: 287 lines (+215 / -72) across 3 files Reviewer: chyunsu3 Review duration: 1218m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 287 lines diff across 3 files
    0.40
    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.339
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #12668"
    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: 39.8% (MEDIUM) · Higher = larger blast radius
    39.8%
    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: 15.7% · Safe to merge
    15.7%
    Repository