Skip to content

[BUG]: NVML PCI discovery test requires administrator privileges on Linux #3166

Closed

Description

@isVoid

Problem

cuda_bindings/tests/nvml/test_pci.py::test_discover_gpus calls nvmlDeviceDiscoverGpus without checking whether the test process has the required privileges.

This operation asks the OS and NVIDIA kernel driver to rediscover GPUs on the PCI subsystem; it is not ordinary enumeration of GPUs already visible to an application. The binding's documentation explicitly says it must run as administrator on Linux.

On a non-root Linux ARM64 GB10 container runner, the test fails with cuda.bindings.nvml.UnknownError. Its existing suppression of OperatingSystemError does not handle that result. Ordinary CUDA execution works in the same environment.

Expected behavior

Skip this privileged test for non-root Linux processes with an explicit explanation, while retaining the test for root Linux processes and leaving all other NVML tests unchanged. Do not broadly suppress UnknownError.

The privilege requirement is not specific to GB10. Root UID is only the test's minimum privilege check; root inside a restricted container does not guarantee every driver operation is permitted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageNeeds the team's attention

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions