Skip to content

nvproxy: support AMPERE_B and GET_HS_CREDITS_MAPPING - #14449

Open
botirkhaltaev wants to merge 2 commits into
google:masterfrom
botirkhaltaev:botir/nvproxy-ampere-b-and-ngx
Open

nvproxy: support AMPERE_B and GET_HS_CREDITS_MAPPING#14449
botirkhaltaev wants to merge 2 commits into
google:masterfrom
botirkhaltaev:botir/nvproxy-ampere-b-and-ngx

Conversation

@botirkhaltaev

@botirkhaltaev botirkhaltaev commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

nvproxy denies NVIDIA resource-manager classes and control commands it does not already understand, instead of passing them through to the host driver.

This PR allowlists two of those:

  • AMPERE_B (0xc797). Ampere GA10x allocates this graphics class instead of AMPERE_A (0xc697, GA100). The parameter blob is the same NV_GR_ALLOCATION_PARAMETERS structure. Without the class ID, the sentry logs handler is undefined for allocation class 0xc797 and vkCreateDevice fails. Register it next to AMPERE_A under CapGraphics, same as TURING_A, ADA_A, and HOPPER_A. Not a video or compute class; no new driver capability.

  • NVB0CC_CTRL_CMD_GET_HS_CREDITS_MAPPING (0xb0cc0116). Nsight Compute on multi-chiplet GPUs issues this after GET_CHIPLET_HS_CREDIT_POOL (0xb0cc0115). Without it, the sentry logs handler is undefined and NCU fails to prepare the kernel. Register it on the 560.28.03 ABI node under CapProfiling, same as the other B0CC profiler commands.

Assisted-by: Cursor

Test plan

  • vkCreateDevice / vulkaninfo on Ampere GA10x (class 0xc797) succeeds instead of failing on an undefined allocation class
  • //pkg/sentry/devices/nvproxy:nvproxy_test passes
  • Nsight Compute and Nsight Systems write non-empty reports and exit 0 on training and LLM-serving workloads

Ampere GA10x uses class 0xc797 (AMPERE_B) rather than AMPERE_A (0xc697,
GA100). vkCreateDevice fails with "handler is undefined for allocation
class 0xc797" until this class is proxied with the same
NV_GR_ALLOCATION_PARAMETERS as AMPERE_A.

Assisted-by: Cursor
@botirkhaltaev botirkhaltaev reopened this Aug 27, 2026
@botirkhaltaev botirkhaltaev changed the title nvproxy: AMPERE_B graphics class and include ngx in all caps nvproxy: support AMPERE_B graphics allocation class Aug 27, 2026
@botirkhaltaev
botirkhaltaev force-pushed the botir/nvproxy-ampere-b-and-ngx branch from f428df2 to 01c7916 Compare August 27, 2026 14:48
Nsight Compute on multi-chiplet GPUs issues 0xb0cc0116 after
GET_CHIPLET_HS_CREDIT_POOL. Without this allowlist the sentry logs
"handler is undefined" and NCU fails to prepare the kernel. Register it
on the 560.28.03 ABI node under CapProfiling, same as the other B0CC
profiler commands.

Assisted-by: Cursor
@botirkhaltaev botirkhaltaev changed the title nvproxy: support AMPERE_B graphics allocation class nvproxy: support AMPERE_B and GET_HS_CREDITS_MAPPING Aug 27, 2026
@botirkhaltaev
botirkhaltaev requested a review from ayushr2 August 27, 2026 20:59
copybara-service Bot pushed a commit that referenced this pull request Aug 28, 2026
Omniverse / Isaac Sim RTX camera workloads initialize NGX (DLSS / Super Resolution) through `libnvidia-ngx`. If that library is not injected, Kit logs `NGX isn't enabled` / `Failed to create NGX context`, and the Vulkan device is often lost (`VkResult: ERROR_DEVICE_LOST`) while loading a scene with RTX cameras.

nvproxy already has `CapNGX` as the nvidia-container-toolkit `ngx` flag (`--ngx` injects `libnvidia-ngx`). It is not a Resource Manager class and does not need a new ioctl. No handler in `version.go` is keyed on `CapNGX`.

The gap is `AllContainerDriverCaps`: it did not include `CapNGX`, so `NVIDIA_DRIVER_CAPABILITIES=all` never passed `--ngx` to `nvidia-container-cli`. Toolkit's `SupportedDriverCapabilities` does include `ngx` (`compute,compat32,graphics,utility,video,display,ngx`).

This change adds `CapNGX` to `AllContainerDriverCaps` only. `DefaultDriverCaps` stays `compute,utility`, so ngx remains off unless the container requests `all` or `ngx` and the runtime allows it.

Split from the AMPERE_B ioctl work in #14449.

Assisted-by: Cursor

## Test plan
- [x] With `NVIDIA_DRIVER_CAPABILITIES=all`, `libnvidia-ngx` is injected
- [x] Isaac Sim 5.1 headless RTX camera init no longer fails with `Failed to create NGX context` / `ERROR_DEVICE_LOST` once ngx is included in `all`
- [ ] Default capabilities (`compute,utility`) still do not pass `--ngx`
- [ ] No RM allocation/class changes; independent of #14449

FUTURE_COPYBARA_INTEGRATE_REVIEW=#14450 from botirkhaltaev:botir/nvproxy-capngx 551ba13
PiperOrigin-RevId: 972216146
copybara-service Bot pushed a commit that referenced this pull request Aug 28, 2026
nvproxy denies NVIDIA resource-manager classes and control commands it does not already understand, instead of passing them through to the host driver.

This PR allowlists two of those:

- **AMPERE_B (`0xc797`).** Ampere GA10x allocates this graphics class instead of `AMPERE_A` (`0xc697`, GA100). The parameter blob is the same `NV_GR_ALLOCATION_PARAMETERS` structure. Without the class ID, the sentry logs `handler is undefined for allocation class 0xc797` and `vkCreateDevice` fails. Register it next to `AMPERE_A` under `CapGraphics`, same as `TURING_A`, `ADA_A`, and `HOPPER_A`. Not a video or compute class; no new driver capability.

- **`NVB0CC_CTRL_CMD_GET_HS_CREDITS_MAPPING` (`0xb0cc0116`).** Nsight Compute on multi-chiplet GPUs issues this after `GET_CHIPLET_HS_CREDIT_POOL` (`0xb0cc0115`). Without it, the sentry logs `handler is undefined` and NCU fails to prepare the kernel. Register it on the 560.28.03 ABI node under `CapProfiling`, same as the other B0CC profiler commands.

Assisted-by: Cursor

## Test plan
- [x] `vkCreateDevice` / `vulkaninfo` on Ampere GA10x (class `0xc797`) succeeds instead of failing on an undefined allocation class
- [x] `//pkg/sentry/devices/nvproxy:nvproxy_test` passes
- [x] Nsight Compute and Nsight Systems write non-empty reports and exit 0 on training and LLM-serving workloads

FUTURE_COPYBARA_INTEGRATE_REVIEW=#14449 from botirkhaltaev:botir/nvproxy-ampere-b-and-ngx 3e69c51
PiperOrigin-RevId: 972845675
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants