Skip to content

feat(lib-cloudinfo): add GPU model, capability, CUDA range and memory (2.3.0) - #169

Merged
pditommaso merged 2 commits into
masterfrom
feat/cloudinfo-gpu-model
Oct 26, 2026
Merged

pditommaso merged 2 commits into
masterfrom
feat/cloudinfo-gpu-model

Conversation

@pditommaso

Copy link
Copy Markdown
Contributor

Summary

Adds client support for the cloud-neutral GPU data that cloudinfo will serve once seqeralabs/cloudinfo#130 and seqeralabs/cloudinfo#132 are merged, expected in cloudinfo 0.30.0. With it, a consumer such as sched can ask for the same GPU on every cloud and filter by CUDA support or memory, without its own per-provider tables.

Changes

  • CloudProduct, new fields. All are null on older backends and wherever cloudinfo omits them (CPU-only, TPU, Inferentia and Trainium types, unmapped GPUs). They're included in equals, hashCode and toString.

    Field Example Meaning
    gpuModel nvidia-a10g Canonical GPU model ID, the same on every provider
    gpuVendor nvidia nvidia or amd
    gpuCapability 8.6 NVIDIA CUDA compute capability
    gpuArch ampere Architecture of the capability
    gpuCudaMin / gpuCudaMax 11.1 / null CUDA toolkit releases that can target the GPU; gpuCudaMax is null while still supported
    gpuMemoryGB 24 Memory of one whole GPU, as the vendor states it

    The CUDA fields are null for AMD GPUs and for parts whose chip isn't disclosed. gpuMemoryMiB keeps its meaning (total memory for the instance); its docs now note that cloudinfo derives it for Azure.

  • ProductsQuery, new GPU filters, combined with the existing ones (a product must match all):

    • gpuModels(List<String>), sent as ?gpuModel=a,b, matches any of the given IDs.
    • minGpuCapability(String), sent as ?minGpuCapability=8.0.
    • cuda(String), sent as ?cuda=12.4.
    • minGpuMemoryGB(Long), sent as ?minGpuMemoryGB=40. A fractional GPU counts only its share of the card.

    Values are URL-encoded. The client doesn't validate them, because cloudinfo answers 400 to a malformed value. Older backends ignore the filters.

  • Docs: README section "GPU Model, Capability and Memory", changelog entry, and VERSION bumped to 2.3.0.

Notes for review

Testing

  • ./gradlew :lib-cloudinfo:test: 121 tests, 0 failures.
  • New CloudProductGpuFieldsTest: its test data (products-gpu-models.json) is real prod products from all four providers, fetched on 23 Oct 2026, with the new fields set to the values the cloudinfo branch computes. It covers:
    • A10G, with the AWS-reported 22 GiB kept separate from gpuMemoryGB: 24
    • K80, with both CUDA bounds and no memory
    • a ⅙ A10 on Azure, with derived gpuMemoryMiB: 4096
    • H100 on GCP
    • AMD MI300X and Alibaba GPU-H, with no CUDA fields
    • a CPU-only type, and a payload from an older backend
  • Other tests: CloudInfoClientMockTest checks how the four filters appear in the request URL, including encoding. ProductsQueryTest covers equality and that the gpuModels list is copied.

🤖 Generated with Claude Code

… (2.3.0)

Model the cross-provider GPU facts served from cloudinfo 0.30.0
(seqeralabs/cloudinfo#130, #132) on CloudProduct: gpuModel, gpuVendor,
gpuCapability, gpuArch, gpuCudaMin, gpuCudaMax and gpuMemoryGB. Add the
matching ProductsQuery filters: gpuModels (?gpuModel=), minGpuCapability,
cuda and minGpuMemoryGB. Additive, no API break.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pditommaso
pditommaso requested a review from jordeu October 23, 2026 14:17
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pditommaso
pditommaso merged commit 9b8ca0d into master Oct 26, 2026
5 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