Skip to content

feat(gke): add gpuSharing field to ComputeClass GPU spec#358

Merged
Peefy merged 1 commit intokcl-lang:mainfrom
davidbellemare:gke-computeclass-gpu-sharing
Apr 26, 2026
Merged

feat(gke): add gpuSharing field to ComputeClass GPU spec#358
Peefy merged 1 commit intokcl-lang:mainfrom
davidbellemare:gke-computeclass-gpu-sharing

Conversation

@davidbellemare
Copy link
Copy Markdown
Contributor

@davidbellemare davidbellemare commented Apr 26, 2026

1. Please confirm that you have read the document before PR submitted

2. Contact Information(Optional)

If it is convenient, please provide your contact information so we can reach you when processing the PR:


What does this PR do?

Adds gpuSharing support to the spec.priorities[].gpu field of the GKE ComputeClass CRD schema.

GKE 1.35.2-gke.1485000 introduced a gpuSharing object under the GPU section that enables:

  • Time-sharing / MPS — multiple containers share a single physical GPU
  • MIG partitioning — the GPU is split into isolated multi-instance partitions (gpuPartitionSize)

Without this change, any ComputeClass that uses gpuSharing fails KCL schema validation with an unknown-attribute error.

New schema

A new CloudGoogleComV1ComputeClassSpecPrioritiesItems0GpuSharing schema is added:

Field Type Description
sharingStrategy str TIME_SHARING or MPS
maxSharedClientsPerGPU int 2–48; required with a sharing strategy
gpuPartitionSize str MIG profile, e.g. "1g.24gb". Omit to skip partitioning.

Example

priorities = [
    {
        gpu = {
            count = 1
            driverVersion = "latest"
            type = "nvidia-rtx-pro-6000"
            gpuSharing = {
                gpuPartitionSize = "1g.24gb"
            }
        }
        machineType = "g4-standard-48"
    }
]

Ref: https://cloud.google.com/kubernetes-engine/docs/reference/crds/computeclass

@davidbellemare davidbellemare force-pushed the gke-computeclass-gpu-sharing branch 2 times, most recently from d9af299 to 25765bd Compare April 26, 2026 01:09
Add the CloudGoogleComV1ComputeClassSpecPrioritiesItems0GpuSharing
schema and wire it into the Gpu priorities schema. This exposes the
GPU sharing and MIG partitioning support added in GKE
1.35.2-gke.1485000.

New fields under spec.priorities[].gpu.gpuSharing:
  - sharingStrategy: TIME_SHARING or MPS
  - maxSharedClientsPerGPU: 2–48 (required with a sharing strategy)
  - gpuPartitionSize: MIG profile string, e.g. "1g.24gb"

Ref: https://cloud.google.com/kubernetes-engine/docs/reference/crds/computeclass

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: David Bellemare <bellemare.david@gmail.com>
@davidbellemare davidbellemare force-pushed the gke-computeclass-gpu-sharing branch from 25765bd to e5d9649 Compare April 26, 2026 01:10
@davidbellemare davidbellemare marked this pull request as ready for review April 26, 2026 01:35
@Peefy Peefy merged commit 608e9b9 into kcl-lang:main Apr 26, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants