← Back to Pull requests

feat(consumable-shares): implements system-mediated sharing #1231

Closed
unknown closed this pull request without merging on Aug 01, 2026 00:38 UTC
View on GitHub
unknown unknown commented on Jun 29, 2026 22:44 UTC
Author

<!-- Thanks for sending a pull request! See CONTRIBUTING.md for guidelines. -->

What type of PR is this?

/kind feature

What this PR does / why we need it:


Enables independent sharing of GPUs, even among pods in different namespaces.

Which issue(s) this PR is related to:


Fixes #659

Special notes for your reviewer:


Let's discuss if this is the right approach.
Needs e2e tests
  • Needs more docs
  • Google Gemini assisted with this PR.

    Does this PR introduce a user-facing change?


    <!--
    Write "NONE" if there is no user-facing change.
    Otherwise, describe the change for driver users / cluster admins. Examples:
  • new or changed CLI flags on the kubelet-plugin / controller

  • changes to DeviceClass, ResourceClaim, or CRD shapes

  • behavior changes for MIG, time-slicing, IMEX, or sharing modes

  • deployment/Helm chart changes (values, defaults, RBAC)

  • Include "action required" if users must change configs or manifests when upgrading.
    -->
    ``release-note
    Enables a new alpha feature gate, ConsumableShares, and a corresponding configuration option to allow memory-based, unlimited, or shares-based consumable allocation.
    
    #### Additional documentation (design docs, usage docs, etc.):
    
    <!--
    Link any supporting docs, e.g.:
    - updates under site/content/ (design, MIG, IMEX, sharing, etc.)
    - README or demo/ updates
    - related KEPs in kubernetes/enhancements
    Use permalinks (commit SHA) rather than branch links so references stay stable.
    -->
    More docs are needed!
    
    
    docs
    demo/specs/consumable-shares includes manifests demonstrating each mode.
    `

    Checklist

    <!-- Tick what applies; leave others unchecked. CI re-runs some of these, but catching them locally shortens the review loop. -->

  • make check test passes locally

  • N/A [ ] make check-generate passes if api/ changed (CRDs, deepcopy, informers, listers, clientset)

  • N/A [ ] make check-modules passes if go.mod / go.sum changed

  • Tests added or updated for the change

  • Helm chart (deployments/helm`) updated if flags, RBAC, or defaults changed
  • Remaining Items Summary

  • Implement device preparation logic

  • Resolve how to handle different per-claim configurations

  • Address driver restarts

  • Move to per-node configuration

  • Memory step value and rounding

  • e2e tests

  • Documentation

  • Device health for shared gpus

  • Interaction with MIG - I would think it should compose (MIGs should be shareable), but we should test it and understand how to configure it

  • Consider other use cases

  • Default recommendations and any hard limits
  • Diff: 380 lines (+285 / -95) across 4 files Reviewer: johnbelamaric Review duration: 46193m
    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 · 380 lines diff across 4 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.356
    Shallow Review Depth shallow_review_depth
    0.289
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #1231"
    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: 47.9% (MEDIUM) · Higher = larger blast radius
    47.9%
    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: 18.9% · Safe to merge
    18.9%