MPS Locality Domain Device Enumeration#

On supported Linux systems, set the following environment variable before the first NVML initialization to enumerate the device view reported by MPS:

NVML_MPS_DEVICE_ENUMERATION=1

Each MPS locality domain has an nvmlDevice_t handle and an NVML index in this process-local view. A device that is not divided into locality domains can appear as one MPS device entry. These handles do not represent physical parent GPUs, and unsupported operations are not redirected to a parent.

The supported APIs are:

Every other public NVML API returns NVML_ERROR_NOT_SUPPORTED while this view is selected. NVML_INIT_FLAG_NO_ATTACH and fork after initialization are unsupported. If the selected MPS session becomes invalid, MPS-backed APIs return NVML_ERROR_INVALID_STATE without falling back to physical GPU enumeration.