Repository navigation
feat(inference): observe each GPU on a host - #14388
Merged
Merged
Conversation
The runtime and the local and SSH host collectors read every GPU in one `nvidia-smi --query-gpu=index,uuid,name,compute_cap,memory.total,memory.free,driver_version` call and keep a per-GPU inventory. Callers that need one GPU still refuse any other count with the same error, and single-GPU results are unchanged. Explicit host observation reports each GPU with its UUID as `id`. Part of #14384. Signed-off-by: Carlos Villela <[email protected]>
Collaborator
Author
Authoring session — opening
|
Signed-off-by: Carlos Villela <[email protected]>
Contributor
Contributor
|
This ran on a host with eight GPUs (8× H200 NVL, driver 615.71.10) at
The SSH collector wasn't run on a multi-GPU host. |
cv
added a commit
that referenced
this pull request
Nov 11, 2026
…14396) Managed Ollama services keep their per-GPU budget on every GPU the container sees: the runtime sets `OLLAMA_GPU_OVERHEAD` from the largest free memory among those GPUs, refuses to start when any of them has less than the budget free, and accepts a loaded model of up to the budget times the number of GPUs. NemoClaw still doesn't set `OLLAMA_SCHED_SPREAD`, so Ollama keeps its own placement. With one GPU, both values equal today's. ## Problem The Ollama runtime computed `OLLAMA_GPU_OVERHEAD` and the readiness bound from one GPU's counters (`Capacity::gpu_memory`). Ollama applies the overhead on every GPU it sees and reports one `size_vram` total in `/api/ps`, so on several GPUs those values would either leave a GPU more than the budget or reject a model split across GPUs. Part of #14384: this is step 7, following decision 4 of the maintainer's decisions comment. What's left: - Step 4: `hardware_capacity::budget`, `serving_memory`, and `check_memory` still read the single-GPU `Capacity::gpu_memory`, which is unset with two or more GPUs, so a multi-GPU capacity stops there before this step's code runs. - Step 9: the runtime's `populate` still requires exactly one visible GPU, and `container.gpuDevices` takes one entry. ## Change - `crates/nemoclaw-runtime/src/ollama/runtime/process.rs`: `gpu_limits` reads the per-GPU inventory from #14388 (`Capacity::gpus`). - `OLLAMA_GPU_OVERHEAD` is the largest free memory among the GPUs minus the per-GPU budget, so no GPU offers Ollama more than the budget. - Every GPU must have the budget free, with the existing error. - Unified-memory GPUs, which report no framebuffer counters, keep an overhead of 0. A mix of GPUs with and without counters is refused, because their free memory can't be checked. - The readiness bound is the budget times the number of GPUs. - `crates/nemoclaw-runtime/src/ollama/runtime/observation.rs`: the readiness check still requires `size_vram == size` and bounds `size_vram` by that total. - `OLLAMA_SCHED_SPREAD` stays unset, as decision 4 chose; a test pins that. - `docs/agents-inference/inference.md`: Ollama's placement, the overhead, the free-memory check, and that `/api/ps` reports one total rather than each GPU's share, so the readiness check can't show which GPU exceeded its budget. The memory fields' meaning, the provider's capacity accounting, and process supervision and error reporting don't change. `limits.md` gets no row: the missing per-GPU share is a property of Ollama's API that no NemoClaw issue would fix, so `inference.md` states it where it affects the reader. ## Beyond CI Unverified: Ollama on two or more GPUs. The multi-GPU cases are tested with fake GPU inventories only, because neither this host (one GB10) nor CI has several GPUs, and the runtime still requires one visible GPU. Signed-off-by: Carlos Villela <[email protected]>
This was referenced Nov 11, 2026
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.
cv
added a commit
that referenced
this pull request
Nov 11, 2026
Corrects the inference, model, recipe, SSH placement, and limits pages, the inference parts of the provider reference, and the generated configuration reference where they disagree with `v1`, for users who configure managed or external inference. ## Problem An audit of these pages against the commits since `v0.1.0-rc9` and the current code found statements that `v1` contradicts. For example, `inference.md` says a model change restarts the runtime inside the existing sandbox, but a changed agent configuration replaces the sandbox and deletes its files and conversations. Several limits link issues that are resolved or decided, and two describe gaps that CI's live cases now cover. ## Change Each change and what makes it necessary: - **Sandbox replacement** (`inference.md`, twice): a model, settings, or image change replaces the agent's sandbox. `compile.rs` sets `replace_triggered_by` on the agent configuration (#13375), and `usage.md`'s change path already says so. - **Default memory limit** (`inference.md`, `ServiceContainer.memoryLimitGiB` doc comment): NemoClaw sets the 104 GiB limit (`DEFAULT_MEMORY_LIMIT_GIB`); Docker has no such default. - **Fields Ollama rejects** (`inference.md`): `kind: ollama` has no `kvCacheGiB`, `batchTokens`, `recipe`, `serving.modelName`, or `authentication`, and its schema objects set `additionalProperties: false`, so a zero value is rejected too; the page said only nonzero values were. - **GPU selection** (`inference.md` managed Ollama prerequisites, `models.md` Nemotron example): a host with several GPUs works when `container.gpuDevices` selects one (#13929). - **Managed Ollama replies** (`inference.md`, `limits.md`): CI's `docker-openclaw-hermes-ollama` live case gets a Hermes reply through managed Ollama with `qwen3:0.6b` on the Linux AMD64 GPU runner, so "GPU inference and agent replies have not been tested" is replaced by what the case covers; tool use and other GPUs stay limits. The Hermes context section now says only what was observed: `Qwen/Qwen3-4B` can't meet Hermes's 64,000-token minimum, and Hermes replied with `qwen3:0.6b` at 32,768 tokens in that case; it no longer states an unverified mechanism. The limits row also covers harnesses other than Hermes. - **Linux AMD64 row removed** (`limits.md`): the hosted live cases reach agent replies on Linux AMD64 on every CI run. - **SSH engines** (`remote-service.md`, `limits.md`): retained-data removal on SSH engines is verified and the Docker procedure covers it (#12640, completed); the SSH capacity collector is a POSIX shell script, not Python (`hardware/ssh.rs`); SSH placement on GPU hardware has no live test (#12641). - **Decided issues** (`inference.md`, `limits.md`): a managed NIM service is not planned, and NIM works as an external endpoint (#12649); network-request approval and policy explanation belong to OpenShell's policy advisor, and `grants` replace presets (#12651), now two rows. The DGX Station rows, whose issues closed for replanning, point to #12641. - **Provider reference** (`provider.md`): `openshell_inference` takes a readiness `ref` as `server` (#13252), so the "until inference registrations take the ref" workaround is gone. Each deployment is one OpenTofu root (#13254, #13286), so the readiness and gateway sections describe one generated graph, in which OpenShell objects wait for every runtime resource and readiness read, instead of separate runtime and OpenShell graphs. Not checking external servers is by design (#13256). - **Plan-time configuration checks** (`agents.md`): #13319 is closed; #14148 tracks checking at plan time. - **Diagnostic limit** (`models.md`, `limits.md`): once a command's OpenTofu diagnostics exceed 16 KiB, the SDK replaces them with `child output exceeds the supported limit` (`process.rs`, #14399), which can hide vLLM's exit excerpt. - **Parser names** (`models.md`): NemoClaw checks only a parser name's form (`PARSER` in `vllm/constraints.rs`); vLLM rejects an unknown parser at startup, and the stop detail carries its error (#14397). - **Several GPUs** (`inference.md`, `models.md`): the statements about several selected GPUs apply once #14384 lifts `container.gpuDevices`'s one-entry limit, and the pages say so. - **Speculative tokens** (`recipes.md`): `serving.speculativeTokens` works only with a recipe and passes `--speculative-config` with the `mtp` method (`arguments.rs`, `vllm/schema.rs`); no guide described it. - **Configuration reference**: the container descriptions mention GPU selection, and the guide links for `ServiceContainer`, `ServiceUpdatePolicy`, the Ollama types, `ExternalOllama`, and `ServiceAuthentication` point to their sections instead of the general usage page. `Overrides.model` names each managed service's served model (`served_model` in `vllm/config.rs`, `services/registry.rs`); it named only vLLM's. The generator's dead `OllamaProxy` arm is removed. Regenerated with `nemoclaw-build schema`. Checked and left unchanged: the recent multi-GPU changes (#14388 to #14401), the vLLM bearer route filter, timeout budgets, profile catalog, memory reserves, hardware profiles, onboarding catalogs, Ollama and vLLM pins, image tags, interface pages, and the OAuth-refresh guide match `v1`. Left for follow-up, because no open issue tracks them: - Limits and `inference.md` sentences link issues closed for replanning with no successor: #12035 (llama.cpp, Model Router, Gemini), #12038 (hosted-provider guides), #12144, #12037, #12137, and #12042. - `agents.md` links #13313 for Hermes not sending API placeholders to MCP servers; #13313 tracked the `api` credential type. - The OpenClaw walkthrough row links #13372, which is fixed; whether the walkthrough was rehearsed afterward is unrecorded.
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 runtime and the local and SSH host collectors read every GPU in one
nvidia-smiquery and keep a per-GPU inventory, and explicit host observation reports each GPU with its UUID. Managed services still run on exactly one GPU: callers that need one refuse any other count with the same error as before.Problem
Each collector ran four
nvidia-smiqueries whose parsers accepted one GPU, so a host with two or more failed observation withmanaged inference requires exactly one observable GPU.observe_host_hardwarethen reported the host's hardware as unknown, and the inventory had no index or UUID to tell GPUs apart. Per-GPU capacity accounting and the vLLM and Ollama layouts in later steps of #14384 need that inventory.Part of #14384: this is step 3. Steps 4 to 9 (memory contract and per-GPU accounting,
requirements.gpu_count, vLLM parallel sizes, Ollama, Docker device requests, and lifting the one-entry limit) remain.Change
nemoclaw-runtimehardware: aGpu(index, UUID, name, driver major, compute capability, framebuffer memory) andCapacity::gpus, read with one--query-gpu=index,uuid,name,compute_cap,memory.total,memory.free,driver_versioncall plus the existing process query.[N/A]memory still means unsupported counters. The single-GPU fields are filled only when exactly one GPU is observed, so every decision that reads them is unchanged.Capacity::require_one_gpuholds the exactly-one rule. The runtime'spopulate(vLLM and Ollama before start) andvllm_capacity/ollama_capacitycall it, so both still refuse two or more GPUs with the same error.--idas before. The SSH script's three GPU sections become one.observe_host_hardwarereports oneGpuObservationper GPU, with the UUID asid, the field the passive read already fills with advertised GPU UUIDs. TheGpuObservationandHardwareObservationshapes don't change; the index isn't exposed.nvidia-smigenerator with--idfiltering, and the SSH simulator's output in the new format.Capacity accounting, the memory contract, vLLM and Ollama arguments, Docker placement, and the one-entry
gpuDeviceslimit are unchanged.Beyond CI
nvidia-smiaccepted the new query with and without--id=0and printed0, GPU-…, NVIDIA GB10, 12.1, [N/A], [N/A], 580.178.04, the format the parser reads.nvidia-smioutput, because neither this host nor CI has one.