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:
Initialization and library information:
nvmlInit(), nvmlInit_v2(), nvmlInitWithFlags(), nvmlShutdown(), nvmlSystemGetNVMLVersion(), and nvmlErrorString().Enumeration and identity: nvmlDeviceGetCount_v2(), nvmlDeviceGetHandleByIndex_v2(), nvmlDeviceGetIndex(), nvmlDeviceGetHandleByUUID(), nvmlDeviceGetUUID(), nvmlDeviceGetHandleByPciBusId_v2(), and nvmlDeviceGetName().
Device attributes: nvmlDeviceGetCudaComputeCapability(),
nvmlDeviceGetPciInfo(),nvmlDeviceGetPciInfo_v2(), nvmlDeviceGetPciInfo_v3(), nvmlDeviceGetNumaNodeId(), and nvmlDeviceGetCpuAffinity().Telemetry and capability status: nvmlDeviceGetMemoryInfo(), nvmlDeviceGetMemoryInfo_v2(), nvmlDeviceGetP2PStatus(), and nvmlDeviceGetAccountingMode().
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.