Skip to content

Handle all requests when the NVIDIA driver is unloaded - #2185

Open
efegokdemir wants to merge 1 commit into
NVIDIA:mainfrom
efegokdemir:efe/no-gpu-all
Open

efegokdemir wants to merge 1 commit into
NVIDIA:mainfrom
efegokdemir:efe/no-gpu-all

Conversation

@efegokdemir

Copy link
Copy Markdown
Contributor

Description

Requests for none currently initialise NVML before returning an empty CDI device. Requests for all fail when NVML returns ERROR_DRIVER_NOT_LOADED, even though no NVIDIA devices are available. Return the empty device for none without initialising NVML, and for all only for that specific error; other NVML initialisation errors remain visible. Fixes #2163.

Checklist

  • No secrets, sensitive information, or unrelated changes
  • Unit tests passing (make test)
  • Lint checks passing (make lint)
  • Test cases are added for new code paths
  • Commits are signed-off and cryptographically signed

Testing

  • make build — passed.
  • make test — passed.
  • make fmt — passed.
  • golangci-lint run ./pkg/nvcdi, golangci-lint run --new-from-rev=HEAD~1 ./..., and go vet ./pkg/nvcdi — passed.
  • make lint — failed on six existing SA4023 findings in unchanged code outside this change.
  • GPU-node integration was not run; no NVIDIA GPU was available locally.
  • git diff --check — passed.

Signed-off-by: Efe Gökdemir <gokdemirefe1903@gmail.com>
@copy-pr-bot

copy-pr-bot Bot commented Oct 27, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@efegokdemir
efegokdemir requested a review from henry118 as a code owner October 27, 2026 19:40
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.

[Bug]: Containers with NVIDIA_VISIBLE_DEVICES=all fail to start in jit-cdi mode when every GPU is bound to vfio-pci

1 participant