Repository navigation
feat(inference): apply GPU memory budgets to each selected GPU - #14398
Merged
Merged
Conversation
Part of #14384 (step 4): the memory fields apply to each selected GPU, the vLLM and Ollama fit checks run per GPU, validate_weights divides weights by tensor x pipeline size, and the capacity data sources account per GPU by UUID and report each GPU in a new gpus output. Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com> # Conflicts: # docs/agents-inference/recipes.md
Collaborator
Author
Authoring session — opening
|
Contributor
|
v1 documentation preview: https://nvidia-preview-nemoclaw-v1-pr-14398.docs.buildwithfern.com/nemoclaw |
…the capacity outputs Address review: one host observation resolves every gpu_devices entry; per-GPU diagnostics name the GPU by UUID or index; checks read only Capacity::gpus, and fixtures record their GPU with set_gpus; Service::parallel_sizes feeds both the arguments and the weight check; the capacity data sources keep their outputs; drop the recipe-on-different-sizes note. Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com> # Conflicts: # docs/agents-inference/inference.md
Collaborator
Author
Authoring session — review updateSame session as the opening report, through the review fixes and the merge of
|
cv
added a commit
that referenced
this pull request
Nov 11, 2026
…ms (#14413) The release notes now list every user-visible change on `v1` since the `v0.1.0-rc9` tag, including the breaking ones, and four example pages drop claims that later changes made false. ## Problem `docs/about/release-notes.md` listed three breaking changes and none of the features, fixes, and onboarding changes that reached `v1` after `v0.1.0-rc9`; it didn't name the configuration shapes the parser now rejects or the intent record version `v0.1.0-rc9` writes. Some example claims went stale: - `examples/spark/README.md` said the pinned OpenShell has the Podman TLS initialization blocker, ai-openshell/openshell#3427; its fix merged before OpenShell 0.1.0, and `v1` pins 0.1.7. - `examples/station/README.md` and `examples/gtc-dc/README.md` required exactly one visible GPU on the host; since #13929, `container.gpuDevices` lets a service on a host with more GPUs request one. - `examples/hcl/travel-team` said Fabric's Deep Agents adapter can't turn reasoning off, NVIDIA/NeMo-Fabric#433; NVIDIA/NeMo-Fabric#439 fixed that, and the pinned catalog's Deep Agents `reasoning_effort` accepts `none`. - The travel team cited #13313 for the booking key its service doesn't receive, but #13313 closed when `openshell_api` landed. ## Change - `docs/about/release-notes.md` gains "Changes Since v0.1.0-rc9", grouped by area, from the commits in `v0.1.0-rc9..origin/v1`; where a later commit changed an earlier one, the entry describes the current code, and changes added and removed after the tag aren't listed: - Agents and interfaces: #14037, #14038, #14269, #13981, #14024, #14186, #14052, #14385, #13971, #13858, #13947, #14039, #14042, #14044, #14343. - Inference: #13929, #14391, #14396, #14398, #14400, #13963, #13912, #13964, #14388, #14390, #14397. - Gateways and Kubernetes: #13909, #13970, #13922 (an existing namespace, refused at plan by #13756, is now bound; cluster-wide reads dropped), #14014, #14169, #13921. - Plan, apply, and diagnostics: #14224, #13756, #14141, #14133, #14135, #13775, #13744, #13701. - Onboarding: #13693, #13695, #13741, #13757, #13851, #13978, #14228, #14233, #14334, #14336. - Examples and builds: #14166, #14184, #14188, #14191, #14192, #14200, #13889, #14267, #14312, #14315, #14355, b30e9b4, #13781, #13813, #14246, and the pins in `versions.json` and `image/fabric/Dockerfile`. - Its breaking changes since the tag: - the intent record moving from 15, which `v0.1.0-rc9` writes, through 16 (#14266), 17 (#14343), 18 (#13929), 19 (#14391) and 20 (#14394); - name-keyed `sandboxes` and `inferenceProviders` (#13703, #13705); - a recipe `compatibility.gpu` outside every hardware profile (#13912); - model tuning the adapter doesn't accept (#14111), and Hermes's `max_tokens` losing its default (#14296); - `skills.paths` resolution (#14296); - endpoint and `networkCIDR` validation (#13847, #14081); - the HCL `gateway_values` attribute (#14014), and Kubernetes ownership receipts from before #13922 and #14014. The two earlier items stay, under their own heading. - `examples/spark/README.md` replaces the closed OpenShell#3427 blocker with the Podman and remote-model limits in `docs/resources/limits.md`. - `examples/station/README.md` and `examples/gtc-dc/README.md` require one GPU visible in the model container, and point to `container.gpuDevices` for a host with more. - `examples/hcl/travel-team/README.md` and `WALKTHROUGH.md` drop the NeMo-Fabric#433 limitation, and the travel team's booking-key statements link #14417 instead of #13313. Not listed, because both changes landed after the tag: Deep Agents Code (#14043, #14250), `compatibility.gpuCount` (#14391, #14394), and the "Creating infrastructure state" progress step (#14169, #14248). Checked and left unchanged: the root `README.md`, `crates/nemoclaw-onboarding/README.md`, `crates/nemoclaw-cli/assets/README.md`, `internal-docs/README.md`, the other example READMEs, and every example YAML header comment. The GPU autoscaling README and `load.sh` read the JSON fields `OperationResult` serializes, and ai-openshell/openshell#4287 is fixed only after the pinned 0.1.7. The two pre-tag release-note items still match the schema and SDK. `docs/README.md` is left to #14412, which retires the stale field reference snapshot it describes. Not verified: whether Hermes sends the booking key's placeholder to MCP servers; #14417 tracks the live check. ## Beyond CI Each relative link and anchor in the changed files resolves to an existing file and heading.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Managed vLLM and Ollama services' GPU memory settings now apply to each GPU a service selects, and the fit checks and the
vllm_capacity/ollama_capacityreads check every selected GPU on its own. Configurations on one GPU keep their meaning;container.gpuDevicesstill takes one entry.Problem
The memory contract and its checks assumed one GPU.
validate_weightsrequired all of a model's weights, plus the KV cache and 2 GiB, to fit one budget even when vLLM splits them across GPUs. The vLLM and Ollama hardware checks compared the budget with one GPU's total and free memory, and the capacity data sources added every service's budget against one GPU's total.Part of #14384: this is step 4, following decisions 1, 5, and 6 of the maintainer's decisions comment. What's left: step 9, lifting the one-entry limit. With this change, the per-GPU Ollama reserve from #14396 gets a budget that fits every selected GPU.
Change
gpuMemoryGiB,gpuMemoryUtilization,kvCacheGiB,hardware.minGpuMemoryBytes, and a recipe'sresources.gpuMemoryBytesapply to each selected GPU, for vLLM and Ollama.GPU_MEMORY_MAX(96 GiB) stays a per-GPU bound. The field descriptions, the generated schema and configuration reference,models.md,inference.md,recipes.md, andprovider.mdsay so.validate_weightsis a lower bound: the safetensors bytes divided by tensor × pipeline parallel size, rounded up, pluskvCacheGiBand 2 GiB, must fit the per-GPU budget.Capacity::gpus: each must match the hardware profile (or the recipe's GPU and driver), meetminGpuMemoryBytesand the compute capability, and hold the budget, with that much free when starting. Selected GPUs don't need to be identical. The host reserve still applies once per service.GPU-79b44e99-d10d-a381-8cd6-5ccb073eaea3: GPU free memory (bytes) requires at least …. The diagnostic holds the UUID as a number, so no host text is echoed; a GPU without a UUID in NVIDIA'sGPU-form is named by its index (GPU 1: …). Single-GPU errors gain the prefix too.gpuMemoryUtilizationpasses through unchanged, and vLLM applies it to each GPU's own total, so a service's budget on a GPU is that fraction of the GPU's total.--kv-cache-memory-bytesfromkvCacheGiB. vLLM v0.32.0 still requiresceil(total × --gpu-memory-utilization)free on each GPU at startup (request_memory), even with that flag. So the fraction NemoClaw passes is now the budget over the largest selected GPU's total, which asks no GPU for more than the budget. With identical GPUs, the fraction is unchanged. A recipe's budget is converted the same way; recipes require every selected GPU to carry the recipe's GPU name, so their GPUs don't differ in size in practice.gpuMemoryUtilizationis taken of the smallest selected GPU's total.gpu_devices, the data sources observe the host once and resolve each entry, an index or a UUID, to the GPU the host reports for it. One entry is still read alone throughnvidia-smi --id, as feat(inference): let the capacity data sources observe only a listed GPU #13964 does; several are read in one unfilterednvidia-smicall. Two entries that resolve to one GPU are refused, as a repeated string already is.accountadds the listed services' per-GPU budgets on each selected GPU and compares the sum with that GPU's total; unified memory still uses host memory with the largest reserve once.required_bytesandobserved_bytesdescribe the GPU with the least room, socompatibleis true only when every GPU fits, and HCL on one GPU reads the same values. A per-GPU output can come with step 9, when a read can list more than one GPU.Capacity::gpus, and refuse an observation without a GPU. Test fixtures and the fixture provider now record their GPU withCapacity::set_gpus. The single-GPU fields (gpu,gpu_memory,compute_capability,driver_major) remain, and only the observation tests still read them; removing them is a follow-up.Service::parallel_sizesholds the tensor and pipeline sizes vLLM gets, for both the arguments and the weight check.OLLAMA_GPU_OVERHEADand readiness (feat(inference): keep managed Ollama within its budget on each GPU #14396), process supervision and error reporting (fix(runtime): surface vLLM's final output when it exits during startup #14397), and the runtime's exactly-one-GPU observation and the one-entry limit (step 9). The intent record's format is unchanged, soRECORD_FORMATand the release notes stay.For review
gpuMemoryUtilization, this change instead passes the fraction through and accounts each GPU at that fraction of its own total, as vLLM applies it.gpuMemoryUtilizationrequireskvCacheGiB: 0, so there's no absolute KV amount to pass, and converting the fraction would make NemoClaw size vLLM's cache. A maintainer is confirming this.Beyond CI
Unverified: no multi-GPU host ran this; the per-GPU paths run only with fake observations, because
container.gpuDevicesandgpu_devicesstill take one entry.