|
|
Modules
‣ NVML_ERROR_INVALID_ARGUMENT If device is invalid, vgpuUtilInfo is NULL,
or vgpuUtilInfo->vgpuInstanceCount is 0
‣ NVML_ERROR_NOT_SUPPORTED If vGPU is not supported by the device
‣ NVML_ERROR_GPU_IS_LOST If the target GPU has fallen off the bus or is
otherwise inaccessible
‣ NVML_ERROR_ARGUMENT_VERSION_MISMATCH If the version of
vgpuUtilInfo is invalid
‣ NVML_ERROR_INSUFFICIENT_SIZE If vgpuUtilInfo->vgpuUtilArray is NULL,
or the buffer size of vgpuUtilInfo->vgpuInstanceCount is too small. The caller
should check the current vGPU instance count from the returned vgpuUtilInfo-
>vgpuInstanceCount, and call the function again with a buffer of size vgpuUtilInfo-
>vgpuInstanceCount * sizeof(nvmlVgpuInstanceUtilizationInfo_t)
‣ NVML_ERROR_NOT_FOUND If sample entries are not found
‣ NVML_ERROR_UNKNOWN On any unexpected error
Description
Retrieves recent utilization for vGPU instances running on a physical GPU (device).
For Kepler or newer fully supported devices.
Reads recent utilization of GPU SM (3D/Compute), framebuffer, video encoder, video
decoder, jpeg decoder, and OFA for vGPU instances running on a device. Utilization
values are returned as an array of utilization sample structures in the caller-supplied
buffer pointed at by vgpuUtilInfo->vgpuUtilArray. One utilization sample structure is
returned per vGPU instance, and includes the CPU timestamp at which the samples
were recorded. Individual utilization values are returned as "unsigned int" values in
nvmlValue_t unions. The function sets the caller-supplied vgpuUtilInfo->sampleValType
to NVML_VALUE_TYPE_UNSIGNED_INT to indicate the returned value type.
To read utilization values, first determine the size of buffer required to hold the
samples by invoking the function with vgpuUtilInfo->vgpuUtilArray set to NULL.
The function will return NVML_ERROR_INSUFFICIENT_SIZE, with the current
vGPU instance count in vgpuUtilInfo->vgpuInstanceCount, or NVML_SUCCESS if
the current vGPU instance count is zero. The caller should allocate a buffer of size
vgpuUtilInfo->vgpuInstanceCount * sizeof(nvmlVgpuInstanceUtilizationInfo_t). Invoke
the function again with the allocated buffer passed in vgpuUtilInfo->vgpuUtilArray, and
vgpuUtilInfo->vgpuInstanceCount set to the number of entries the buffer is sized for.
On successful return, the function updates vgpuUtilInfo->vgpuInstanceCount with the
number of vGPU utilization sample structures that were actually written. This may
differ from a previously read value as vGPU instances are created or destroyed.
vgpuUtilInfo->lastSeenTimeStamp represents the CPU timestamp in microseconds
at which utilization samples were last read. Set it to 0 to read utilization based on
all the samples maintained by the driver's internal sample buffer. Set vgpuUtilInfo-
337
Modules
>lastSeenTimeStamp to a timeStamp retrieved from a previous query to read utilization
since the previous query.
nvmlReturn_t nvmlDeviceGetVgpuProcessUtilization
(nvmlDevice_t device, unsigned long
long lastSeenTimeStamp, unsigned
int *vgpuProcessSamplesCount,
nvmlVgpuProcessUtilizationSample_t
*utilizationSamples)
Parameters
device
The identifier for the target device
lastSeenTimeStamp
Return only samples with timestamp greater than lastSeenTimeStamp.
vgpuProcessSamplesCount
Pointer to caller-supplied array size, and returns number of processes running on
vGPU instances
utilizationSamples
Pointer to caller-supplied buffer in which vGPU sub process utilization samples are
returned
Returns
‣ NVML_SUCCESS if utilization samples are successfully retrieved
‣ NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
‣ NVML_ERROR_INVALID_ARGUMENT if device is invalid,
vgpuProcessSamplesCount or a sample count of 0 is passed with a non-NULL
utilizationSamples
‣ NVML_ERROR_INSUFFICIENT_SIZE if supplied vgpuProcessSamplesCount is too
small to return samples for all vGPU instances currently executing on the device
‣ NVML_ERROR_NOT_SUPPORTED if vGPU is not supported by the device
‣ NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is
otherwise inaccessible
‣ NVML_ERROR_NOT_FOUND if sample entries are not found
‣ NVML_ERROR_UNKNOWN on any unexpected error
338
Modules
Description
Retrieves current utilization for processes running on vGPUs on a physical GPU
(device).
For Maxwell or newer fully supported devices.
Reads recent utilization of GPU SM (3D/Compute), framebuffer, video encoder, and
video decoder for processes running on vGPU instances active on a device. Utilization
values are returned as an array of utilization sample structures in the caller-supplied
buffer pointed at by utilizationSamples. One utilization sample structure is returned
per process running on vGPU instances, that had some non-zero utilization during the
last sample period. It includes the CPU timestamp at which the samples were recorded.
Individual utilization values are returned as "unsigned int" values.
To read utilization values, first determine the size of buffer required to hold the
samples by invoking the function with utilizationSamples set to NULL. The function
will return NVML_ERROR_INSUFFICIENT_SIZE, with the current vGPU instance
count in vgpuProcessSamplesCount. The caller should allocate a buffer of size
vgpuProcessSamplesCount * sizeof(nvmlVgpuProcessUtilizationSample_t). Invoke
the function again with the allocated buffer passed in utilizationSamples, and
vgpuProcessSamplesCount set to the number of entries the buffer is sized for.
On successful return, the function updates vgpuSubProcessSampleCount with the
number of vGPU sub process utilization sample structures that were actually written.
This may differ from a previously read value depending on the number of processes that
are active in any given sample period.
lastSeenTimeStamp represents the CPU timestamp in microseconds at which utilization
samples were last read. Set it to 0 to read utilization based on all the samples maintained
by the driver's internal sample buffer. Set lastSeenTimeStamp to a timeStamp retrieved
from a previous query to read utilization since the previous query.
nvmlReturn_t
nvmlDeviceGetVgpuProcessesUtilizationInfo
(nvmlDevice_t device,
nvmlVgpuProcessesUtilizationInfo_t *vgpuProcUtilInfo)
Parameters
device
The identifier for the target device
vgpuProcUtilInfo
Pointer to the caller-provided structure of nvmlVgpuProcessesUtilizationInfo_t
339
Modules
Returns
‣ NVML_SUCCESS If utilization samples are successfully retrieved
‣ NVML_ERROR_UNINITIALIZED If the library has not been successfully initialized
‣ NVML_ERROR_INVALID_ARGUMENT If device is invalid, or vgpuProcUtilInfo is
null
‣ NVML_ERROR_ARGUMENT_VERSION_MISMATCH If the version of
vgpuProcUtilInfo is invalid
‣ NVML_ERROR_INSUFFICIENT_SIZE If vgpuProcUtilInfo->vgpuProcUtilArray
is null, or supplied vgpuProcUtilInfo->vgpuProcessCount is too small to
return samples for all processes on vGPU instances currently executing
on the device. The caller should check the current processes count from
the returned vgpuProcUtilInfo->vgpuProcessCount, and call the function
again with a buffer of size vgpuProcUtilInfo->vgpuProcessCount *
sizeof(nvmlVgpuProcessUtilizationSample_t)
‣ NVML_ERROR_NOT_SUPPORTED If vGPU is not supported by the device
‣ NVML_ERROR_GPU_IS_LOST If the target GPU has fallen off the bus or is
otherwise inaccessible
‣ NVML_ERROR_NOT_FOUND If sample entries are not found
‣ NVML_ERROR_UNKNOWN On any unexpected error
Description
Retrieves recent utilization for processes running on vGPU instances on a physical GPU
(device).
For Maxwell or newer fully supported devices.
Reads recent utilization of GPU SM (3D/Compute), framebuffer, video encoder, video
decoder, jpeg decoder, and OFA for processes running on vGPU instances active on a
device. Utilization values are returned as an array of utilization sample structures in
the caller-supplied buffer pointed at by vgpuProcUtilInfo->vgpuProcUtilArray. One
utilization sample structure is returned per process running on vGPU instances, that had
some non-zero utilization during the last sample period. It includes the CPU timestamp
at which the samples were recorded. Individual utilization values are returned as
"unsigned int" values.
To read utilization values, first determine the size of buffer required to hold the
samples by invoking the function with vgpuProcUtilInfo->vgpuProcUtilArray set
to NULL. The function will return NVML_ERROR_INSUFFICIENT_SIZE, with
the current processes' count running on vGPU instances in vgpuProcUtilInfo-
>vgpuProcessCount. The caller should allocate a buffer of size vgpuProcUtilInfo-
>vgpuProcessCount * sizeof(nvmlVgpuProcessUtilizationSample_t). Invoke the function
again with the allocated buffer passed in vgpuProcUtilInfo->vgpuProcUtilArray, and
vgpuProcUtilInfo->vgpuProcessCount set to the number of entries the buffer is sized for.
340
Modules
On successful return, the function updates vgpuProcUtilInfo->vgpuProcessCount
with the number of vGPU sub process utilization sample structures that were actually
written. This may differ from a previously read value depending on the number of
processes that are active in any given sample period.
vgpuProcUtilInfo->lastSeenTimeStamp represents the CPU timestamp in microseconds
at which utilization samples were last read. Set it to 0 to read utilization based on all
the samples maintained by the driver's internal sample buffer. Set vgpuProcUtilInfo-
>lastSeenTimeStamp to a timeStamp retrieved from a previous query to read utilization
since the previous query.
nvmlReturn_t nvmlVgpuInstanceGetAccountingMode
(nvmlVgpuInstance_t vgpuInstance, nvmlEnableState_t
*mode)
Parameters
vgpuInstance
The identifier of the target vGPU instance
mode
Reference in which to return the current accounting mode
Returns
‣ NVML_SUCCESS if the mode has been successfully retrieved
‣ NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
‣ NVML_ERROR_INVALID_ARGUMENT if vgpuInstance is 0, or mode is NULL
‣ NVML_ERROR_NOT_FOUND if vgpuInstance does not match a valid active vGPU
instance on the system
‣ NVML_ERROR_NOT_SUPPORTED if the vGPU doesn't support this feature
‣ NVML_ERROR_DRIVER_NOT_LOADED if NVIDIA driver is not running on the
vGPU instance
‣ NVML_ERROR_UNKNOWN on any unexpected error
Description
Queries the state of per process accounting mode on vGPU.
For Maxwell or newer fully supported devices.
341
Modules
nvmlReturn_t nvmlVgpuInstanceGetAccountingPids
(nvmlVgpuInstance_t vgpuInstance, unsigned int *count,
unsigned int *pids)
Parameters
vgpuInstance
The identifier of the target vGPU instance
count
Reference in which to provide the pids array size, and to return the number of
elements ready to be queried
pids
Reference in which to return list of process ids
Returns
‣ NVML_SUCCESS if pids were successfully retrieved
‣ NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
‣ NVML_ERROR_INVALID_ARGUMENT if vgpuInstance is 0, or count is NULL
‣ NVML_ERROR_NOT_FOUND if vgpuInstance does not match a valid active vGPU
instance on the system
‣ NVML_ERROR_NOT_SUPPORTED if the vGPU doesn't support this feature or
accounting mode is disabled
‣ NVML_ERROR_INSUFFICIENT_SIZE if count is too small (count is set to expected
value)
‣ NVML_ERROR_UNKNOWN on any unexpected error
Description
Queries list of processes running on vGPU that can be queried for accounting stats. The
list of processes returned can be in running or terminated state.
For Maxwell or newer fully supported devices.
To just query the maximum number of processes that can be queried, call
this function with *count = 0 and pids=NULL. The return code will be
NVML_ERROR_INSUFFICIENT_SIZE, or NVML_SUCCESS if list is empty.
For more details see nvmlVgpuInstanceGetAccountingStats.
In case of PID collision some processes might not be accessible before the circular
buffer is full.
342
Modules
See also:
nvmlVgpuInstanceGetAccountingPids
nvmlReturn_t nvmlVgpuInstanceGetAccountingStats
(nvmlVgpuInstance_t vgpuInstance, unsigned int pid,
nvmlAccountingStats_t *stats)
Parameters
vgpuInstance
The identifier of the target vGPU instance
pid
Process Id of the target process to query stats for
stats
Reference in which to return the process's accounting stats
Returns
‣ NVML_SUCCESS if stats have been successfully retrieved
‣ NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
‣ NVML_ERROR_INVALID_ARGUMENT if vgpuInstance is 0, or stats is NULL
‣ NVML_ERROR_NOT_FOUND if vgpuInstance does not match a valid active vGPU
instance on the system or stats is not found
‣ NVML_ERROR_NOT_SUPPORTED if the vGPU doesn't support this feature or
accounting mode is disabled
‣ NVML_ERROR_UNKNOWN on any unexpected error
Description
Queries process's accounting stats.
For Maxwell or newer fully supported devices.
Accounting stats capture GPU utilization and other statistics across the lifetime of a
process, and can be queried during life time of the process or after its termination. The
time field in nvmlAccountingStats_t is reported as 0 during the lifetime of the process
and updated to actual running time after its termination. Accounting stats are kept in a
circular buffer, newly created processes overwrite information about old processes.
See nvmlAccountingStats_t for description of each returned metric. List of processes that
can be queried can be retrieved from nvmlVgpuInstanceGetAccountingPids.
‣ Accounting Mode needs to be on. See nvmlVgpuInstanceGetAccountingMode.
343
Modules
‣ Only compute and graphics applications stats can be queried. Monitoring
applications stats can't be queried since they don't contribute to GPU utilization.
‣ In case of pid collision stats of only the latest process (that terminated last) will
be reported
nvmlReturn_t nvmlVgpuInstanceClearAccountingPids
(nvmlVgpuInstance_t vgpuInstance)
Parameters
vgpuInstance
The identifier of the target vGPU instance
Returns
‣ NVML_SUCCESS if accounting information has been cleared
‣ NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
‣ NVML_ERROR_INVALID_ARGUMENT if vgpuInstance is invalid
‣ NVML_ERROR_NO_PERMISSION if the user doesn't have permission to perform
this operation
‣ NVML_ERROR_NOT_SUPPORTED if the vGPU doesn't support this feature or
accounting mode is disabled
‣ NVML_ERROR_UNKNOWN on any unexpected error
Description
Clears accounting information of the vGPU instance that have already terminated.
For Maxwell or newer fully supported devices. Requires root/admin permissions.
‣ Accounting Mode needs to be on. See nvmlVgpuInstanceGetAccountingMode.
‣ Only compute and graphics applications stats are reported and can be cleared
since monitoring applications stats don't contribute to GPU utilization.
344
Modules
nvmlReturn_t nvmlVgpuInstanceGetLicenseInfo_v2
(nvmlVgpuInstance_t vgpuInstance,
nvmlVgpuLicenseInfo_t *licenseInfo)
Parameters
vgpuInstance
Identifier of the target vGPU instance
licenseInfo
Pointer to vGPU license information structure
Returns
‣ NVML_SUCCESS if information is successfully retrieved
‣ NVML_ERROR_INVALID_ARGUMENT if vgpuInstance is 0, or licenseInfo is
NULL
‣ NVML_ERROR_NOT_FOUND if vgpuInstance does not match a valid active vGPU
instance on the system
‣ NVML_ERROR_DRIVER_NOT_LOADED if NVIDIA driver is not running on the
vGPU instance
‣ NVML_ERROR_UNKNOWN on any unexpected error
Description
Query the license information of the vGPU instance.
For Maxwell or newer fully supported devices.
4.27. Excluded GPU Queries
This chapter describes NVML operations that are associated with excluded GPUs.
struct nvmlExcludedDeviceInfo_t
nvmlReturn_t nvmlGetExcludedDeviceCount (unsigned
int *deviceCount)
Parameters
deviceCount
Reference in which to return the number of excluded devices
345
Modules
Returns
‣ NVML_SUCCESS if deviceCount has been set
‣ NVML_ERROR_INVALID_ARGUMENT if deviceCount is NULL
Description
Retrieves the number of excluded GPU devices in the system.
For all products.
nvmlReturn_t nvmlGetExcludedDeviceInfoByIndex
(unsigned int index, nvmlExcludedDeviceInfo_t *info)
Parameters
index
The index of the target GPU, >= 0 and < deviceCount
info
Reference in which to return the device information
Returns
‣ NVML_SUCCESS if device has been set
‣ NVML_ERROR_INVALID_ARGUMENT if index is invalid or info is NULL
Description
Acquire the device information for an excluded GPU device, based on its index.
For all products.
Valid indices are derived from the deviceCount returned by
nvmlGetExcludedDeviceCount(). For example, if deviceCount is 2 the valid indices are 0
and 1, corresponding to GPU 0 and GPU 1.
See also:
nvmlGetExcludedDeviceCount
4.28. Multi Instance GPU Management
This chapter describes NVML operations that are associated with Multi Instance GPU
management.
346
Modules
struct nvmlGpuInstanceProfileInfo_t
struct nvmlGpuInstanceProfileInfo_v2_t
struct nvmlGpuInstanceProfileInfo_v3_t
struct nvmlComputeInstanceProfileInfo_t
struct nvmlComputeInstanceProfileInfo_v2_t
struct nvmlComputeInstanceProfileInfo_v3_t
nvmlReturn_t nvmlDeviceSetMigMode (nvmlDevice_t
device, unsigned int mode, nvmlReturn_t
*activationStatus)
Parameters
device
The identifier of the target device
mode
The mode to be set, NVML_DEVICE_MIG_DISABLE or
NVML_DEVICE_MIG_ENABLE
activationStatus
The activationStatus status
Returns
‣ NVML_SUCCESS Upon success
‣ NVML_ERROR_UNINITIALIZED If library has not been successfully initialized
‣ NVML_ERROR_INVALID_ARGUMENT If device,mode or activationStatus are
invalid
‣ NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the
operation
‣ NVML_ERROR_NOT_SUPPORTED If device doesn't support MIG mode
Description
Set MIG mode for the device.
For Ampere or newer fully supported devices. Requires root user.
347
Modules
This mode determines whether a GPU instance can be created.
This API may unbind or reset the device to activate the requested mode. Thus, the
attributes associated with the device, such as minor number, might change. The caller of
this API is expected to query such attributes again.
On certain platforms like pass-through virtualization, where reset functionality
may not be exposed directly, VM reboot is required. activationStatus would return
NVML_ERROR_RESET_REQUIRED for such cases.
activationStatus would return the appropriate error code upon unsuccessful
activation. For example, if device unbind fails because the device isn't idle,
NVML_ERROR_IN_USE would be returned. The caller of this API is expected to idle the
device and retry setting the mode.
On Windows, only disabling MIG mode is supported. activationStatus would return
NVML_ERROR_NOT_SUPPORTED as GPU reset is not supported on Windows through this
API.
nvmlReturn_t nvmlDeviceGetMigMode (nvmlDevice_t
device, unsigned int *currentMode, unsigned int
*pendingMode)
Parameters
device
The identifier of the target device
currentMode
Returns the current mode, NVML_DEVICE_MIG_DISABLE or
NVML_DEVICE_MIG_ENABLE
pendingMode
Returns the pending mode, NVML_DEVICE_MIG_DISABLE or
NVML_DEVICE_MIG_ENABLE
Returns
‣ NVML_SUCCESS Upon success
‣ NVML_ERROR_UNINITIALIZED If library has not been successfully initialized
‣ NVML_ERROR_INVALID_ARGUMENT If device, currentMode or pendingMode
are invalid
‣ NVML_ERROR_NOT_SUPPORTED If device doesn't support MIG mode
348
Modules
Description
Get MIG mode for the device.
For Ampere or newer fully supported devices.
Changing MIG modes may require device unbind or reset. The "pending" MIG mode
refers to the target mode following the next activation trigger.
nvmlReturn_t nvmlDeviceGetGpuInstanceProfileInfo
(nvmlDevice_t device, unsigned int profile,
nvmlGpuInstanceProfileInfo_t *info)
Parameters
device
The identifier of the target device
profile
One of the NVML_GPU_INSTANCE_PROFILE_*
info
Returns detailed profile information
Returns
‣ NVML_SUCCESS Upon success
‣ NVML_ERROR_UNINITIALIZED If library has not been successfully initialized
‣ NVML_ERROR_INVALID_ARGUMENT If device, profile or info are invalid
‣ NVML_ERROR_NOT_SUPPORTED If device doesn't support MIG or profile isn't
supported
‣ NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the
operation
Description
Get GPU instance profile information
Information provided by this API is immutable throughout the lifetime of a MIG mode.
This API can be used to enumerate all MIG profiles supported by NVML in a forward
compatible way by invoking it on profile values starting from 0, until the API returns
NVML_ERROR_INVALID_ARGUMENT.
For Ampere or newer fully supported devices. Supported on Linux only.
349
Modules
nvmlReturn_t nvmlDeviceGetGpuInstanceProfileInfoV
(nvmlDevice_t device, unsigned int profile,
nvmlGpuInstanceProfileInfo_v2_t *info)
Parameters
device
The identifier of the target device
profile
One of the NVML_GPU_INSTANCE_PROFILE_*
info
Returns detailed profile information
Returns
‣ NVML_SUCCESS Upon success
‣ NVML_ERROR_UNINITIALIZED If library has not been successfully initialized
‣ NVML_ERROR_INVALID_ARGUMENT If device, profile, info, or info->version are
invalid
‣ NVML_ERROR_NOT_SUPPORTED If device doesn't have MIG mode enabled or
profile isn't supported
‣ NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the
operation
Description
Versioned wrapper around nvmlDeviceGetGpuInstanceProfileInfo that accepts a
versioned nvmlGpuInstanceProfileInfo_v2_t or later output structure.
The caller must set the nvmlGpuInstanceProfileInfo_v2_t::version field to the
appropriate version prior to calling this function. For example:
nvmlGpuInstanceProfileInfo_v2_t profileInfo =
{ .version = nvmlGpuInstanceProfileInfo_v2 };
nvmlReturn_t result
= nvmlDeviceGetGpuInstanceProfileInfoV(device,
profile,
&profileInfo);
For Ampere or newer fully supported devices. Supported on Linux only.
nvmlReturn_t
nvmlDeviceGetGpuInstancePossiblePlacements_v2
350
Modules
(nvmlDevice_t device, unsigned int profileId,
nvmlGpuInstancePlacement_t *placements, unsigned int
*count)
Parameters
device
The identifier of the target device
profileId
The GPU instance profile ID. See nvmlDeviceGetGpuInstanceProfileInfo
placements
Returns placements allowed for the profile. Can be NULL to discover number
of allowed placements for this profile. If non-NULL must be large enough to
accommodate the placements supported by the profile.
count
Returns number of allowed placemenets for the profile.
Returns
‣ NVML_SUCCESS Upon success
‣ NVML_ERROR_UNINITIALIZED If library has not been successfully initialized
‣ NVML_ERROR_INVALID_ARGUMENT If device, profileId or count are invalid
‣ NVML_ERROR_NOT_SUPPORTED If device doesn't support MIG or profileId isn't
supported
‣ NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the
operation
Description
Get GPU instance placements.
A placement represents the location of a GPU instance within a device. This API only
returns all the possible placements for the given profile regardless of whether MIG
is enabled or not. A created GPU instance occupies memory slices described by its
placement. Creation of new GPU instance will fail if there is overlap with the already
occupied memory slices.
For Ampere or newer fully supported devices. Supported on Linux only. Requires
privileged user.
nvmlReturn_t
nvmlDeviceGetGpuInstanceRemainingCapacity
351
Modules
(nvmlDevice_t device, unsigned int profileId, unsigned
int *count)
Parameters
device
The identifier of the target device
profileId
The GPU instance profile ID. See nvmlDeviceGetGpuInstanceProfileInfo
count
Returns remaining instance count for the profile ID
Returns
‣ NVML_SUCCESS Upon success
‣ NVML_ERROR_UNINITIALIZED If library has not been successfully initialized
‣ NVML_ERROR_INVALID_ARGUMENT If device, profileId or count are invalid
‣ NVML_ERROR_NOT_SUPPORTED If device doesn't have MIG mode enabled or
profileId isn't supported
‣ NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the
operation
Description
Get GPU instance profile capacity.
For Ampere or newer fully supported devices. Supported on Linux only. Requires
privileged user.
nvmlReturn_t nvmlDeviceCreateGpuInstance
(nvmlDevice_t device, unsigned int profileId,
nvmlGpuInstance_t *gpuInstance)
Parameters
device
The identifier of the target device
profileId
The GPU instance profile ID. See nvmlDeviceGetGpuInstanceProfileInfo
gpuInstance
Returns the GPU instance handle
352
Modules
Returns
‣ NVML_SUCCESS Upon success
‣ NVML_ERROR_UNINITIALIZED If library has not been successfully initialized
‣ NVML_ERROR_INVALID_ARGUMENT If device, profile, profileId or gpuInstance
are invalid
‣ NVML_ERROR_NOT_SUPPORTED If device doesn't have MIG mode enabled or in
vGPU guest
‣ NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the
operation
‣ NVML_ERROR_INSUFFICIENT_RESOURCES If the requested GPU instance could
not be created
Description
Create GPU instance.
For Ampere or newer fully supported devices. Supported on Linux only. Requires
privileged user.
If the parent device is unbound, reset or the GPU instance is destroyed explicitly, the
GPU instance handle would become invalid. The GPU instance must be recreated to
acquire a valid handle.
nvmlReturn_t
nvmlDeviceCreateGpuInstanceWithPlacement
(nvmlDevice_t device, unsigned int profileId,
const nvmlGpuInstancePlacement_t *placement,
nvmlGpuInstance_t *gpuInstance)
Parameters
device
The identifier of the target device
profileId
The GPU instance profile ID. See nvmlDeviceGetGpuInstanceProfileInfo
placement
The requested placement. See nvmlDeviceGetGpuInstancePossiblePlacements_v2
gpuInstance
Returns the GPU instance handle
Returns
‣ NVML_SUCCESS Upon success
353
Modules
‣ NVML_ERROR_UNINITIALIZED If library has not been successfully initialized
‣ NVML_ERROR_INVALID_ARGUMENT If device, profile, profileId, placement or
gpuInstance are invalid
‣ NVML_ERROR_NOT_SUPPORTED If device doesn't have MIG mode enabled or in
vGPU guest
‣ NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the
operation
‣ NVML_ERROR_INSUFFICIENT_RESOURCES If the requested GPU instance could
not be created
Description
Create GPU instance with the specified placement.
For Ampere or newer fully supported devices. Supported on Linux only. Requires
privileged user.
If the parent device is unbound, reset or the GPU instance is destroyed explicitly, the
GPU instance handle would become invalid. The GPU instance must be recreated to
acquire a valid handle.
nvmlReturn_t nvmlGpuInstanceDestroy
(nvmlGpuInstance_t gpuInstance)
Parameters
gpuInstance
The GPU instance handle
Returns
‣ NVML_SUCCESS Upon success
‣ NVML_ERROR_UNINITIALIZED If library has not been successfully initialized
‣ NVML_ERROR_INVALID_ARGUMENT If gpuInstance is invalid
‣ NVML_ERROR_NOT_SUPPORTED If device doesn't have MIG mode enabled or in
vGPU guest
‣ NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the
operation
‣ NVML_ERROR_IN_USE If the GPU instance is in use. This error would be returned
if processes (e.g. CUDA application) or compute instances are active on the GPU
instance.
Description
Destroy GPU instance.
354
Modules
For Ampere or newer fully supported devices. Supported on Linux only. Requires
privileged user.
nvmlReturn_t nvmlDeviceGetGpuInstances
(nvmlDevice_t device, unsigned int profileId,
nvmlGpuInstance_t *gpuInstances, unsigned int *count)
Parameters
device
The identifier of the target device
profileId
The GPU instance profile ID. See nvmlDeviceGetGpuInstanceProfileInfo
gpuInstances
Returns pre-exiting GPU instances, the buffer must be large enough to accommodate
the instances supported by the profile. See nvmlDeviceGetGpuInstanceProfileInfo
count
The count of returned GPU instances
Returns
‣ NVML_SUCCESS Upon success
‣ NVML_ERROR_UNINITIALIZED If library has not been successfully initialized
‣ NVML_ERROR_INVALID_ARGUMENT If device, profileId, gpuInstances or count
are invalid
‣ NVML_ERROR_NOT_SUPPORTED If device doesn't have MIG mode enabled
‣ NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the
operation
Description
Get GPU instances for given profile ID.
For Ampere or newer fully supported devices. Supported on Linux only. Requires
privileged user.
355
Modules
nvmlReturn_t nvmlDeviceGetGpuInstanceById
(nvmlDevice_t device, unsigned int id,
nvmlGpuInstance_t *gpuInstance)
Parameters
device
The identifier of the target device
id
The GPU instance ID
gpuInstance
Returns GPU instance
Returns
‣ NVML_SUCCESS Upon success
‣ NVML_ERROR_UNINITIALIZED If library has not been successfully initialized
‣ NVML_ERROR_INVALID_ARGUMENT If device, id or gpuInstance are invalid
‣ NVML_ERROR_NOT_SUPPORTED If device doesn't have MIG mode enabled
‣ NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the
operation
‣ NVML_ERROR_NOT_FOUND If the GPU instance is not found.
Description
Get GPU instances for given instance ID.
For Ampere or newer fully supported devices. Supported on Linux only. Requires
privileged user.
nvmlReturn_t nvmlGpuInstanceGetInfo
(nvmlGpuInstance_t gpuInstance,
nvmlGpuInstanceInfo_t *info)
Parameters
gpuInstance
The GPU instance handle
info
Return GPU instance information
356
Modules
Returns
‣ NVML_SUCCESS Upon success
‣ NVML_ERROR_UNINITIALIZED If library has not been successfully initialized
‣ NVML_ERROR_INVALID_ARGUMENT If gpuInstance or info are invalid
‣ NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the
operation
Description
Get GPU instance information.
For Ampere or newer fully supported devices. Supported on Linux only.
nvmlReturn_t
nvmlGpuInstanceGetComputeInstanceProfileInfo
(nvmlGpuInstance_t gpuInstance, unsigned
int profile, unsigned int engProfile,
nvmlComputeInstanceProfileInfo_t *info)
Parameters
gpuInstance
The identifier of the target GPU instance
profile
One of the NVML_COMPUTE_INSTANCE_PROFILE_*
engProfile
One of the NVML_COMPUTE_INSTANCE_ENGINE_PROFILE_*
info
Returns detailed profile information
Returns
‣ NVML_SUCCESS Upon success
‣ NVML_ERROR_UNINITIALIZED If library has not been successfully initialized
‣ NVML_ERROR_INVALID_ARGUMENT If gpuInstance, profile, engProfile or info
are invalid
‣ NVML_ERROR_NOT_SUPPORTED If profile isn't supported
‣ NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the
operation
Description
Get compute instance profile information.
357
Modules
Information provided by this API is immutable throughout the lifetime of a MIG mode.
This API can be used to enumerate all MIG profiles supported by NVML in a forward
compatible way by invoking it on profile values starting from 0, until the API returns
NVML_ERROR_INVALID_ARGUMENT.
For Ampere or newer fully supported devices. Supported on Linux only.
nvmlReturn_t
nvmlGpuInstanceGetComputeInstanceProfileInfoV
(nvmlGpuInstance_t gpuInstance, unsigned
int profile, unsigned int engProfile,
nvmlComputeInstanceProfileInfo_v2_t *info)
Parameters
gpuInstance
The identifier of the target GPU instance
profile
One of the NVML_COMPUTE_INSTANCE_PROFILE_*
engProfile
One of the NVML_COMPUTE_INSTANCE_ENGINE_PROFILE_*
info
Returns detailed profile information
Returns
‣ NVML_SUCCESS Upon success
‣ NVML_ERROR_UNINITIALIZED If library has not been successfully initialized
‣ NVML_ERROR_INVALID_ARGUMENT If gpuInstance, profile, engProfile, info, or
info->version are invalid
‣ NVML_ERROR_NOT_SUPPORTED If profile isn't supported
‣ NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the
operation
Description
Versioned wrapper around nvmlGpuInstanceGetComputeInstanceProfileInfo that
accepts a versioned nvmlComputeInstanceProfileInfo_v2_t or later output structure.
358
Modules
The caller must set the nvmlGpuInstanceProfileInfo_v2_t::version field to the
appropriate version prior to calling this function. For example:
nvmlComputeInstanceProfileInfo_v2_t profileInfo =
{ .version = nvmlComputeInstanceProfileInfo_v2 };
nvmlReturn_t result
= nvmlGpuInstanceGetComputeInstanceProfileInfoV(gpuInstance,
profile,
engProfile,
&profileInfo);
For Ampere or newer fully supported devices. Supported on Linux only.
nvmlReturn_t
nvmlGpuInstanceGetComputeInstanceRemainingCapacity
(nvmlGpuInstance_t gpuInstance, unsigned int profileId,
unsigned int *count)
Parameters
gpuInstance
The identifier of the target GPU instance
profileId
The compute instance profile ID. See
nvmlGpuInstanceGetComputeInstanceProfileInfo
count
Returns remaining instance count for the profile ID
Returns
‣ NVML_SUCCESS Upon success
‣ NVML_ERROR_UNINITIALIZED If library has not been successfully initialized
‣ NVML_ERROR_INVALID_ARGUMENT If gpuInstance, profileId or availableCount
are invalid
‣ NVML_ERROR_NOT_SUPPORTED If profileId isn't supported
‣ NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the
operation
Description
Get compute instance profile capacity.
For Ampere or newer fully supported devices. Supported on Linux only. Requires
privileged user.
359
Modules
nvmlReturn_t
nvmlGpuInstanceGetComputeInstancePossiblePlacements
(nvmlGpuInstance_t gpuInstance, unsigned int profileId,
nvmlComputeInstancePlacement_t *placements,
unsigned int *count)
Parameters
gpuInstance
The identifier of the target GPU instance
profileId
The compute instance profile ID. See
nvmlGpuInstanceGetComputeInstanceProfileInfo
placements
Returns placements allowed for the profile. Can be NULL to discover number
of allowed placements for this profile. If non-NULL must be large enough to
accommodate the placements supported by the profile.
count
Returns number of allowed placemenets for the profile.
Returns
‣ NVML_SUCCESS Upon success
‣ NVML_ERROR_UNINITIALIZED If library has not been successfully initialized
‣ NVML_ERROR_INVALID_ARGUMENT If gpuInstance, profileId or count are
invalid
‣ NVML_ERROR_NOT_SUPPORTED If device doesn't have MIG mode enabled or
profileId isn't supported
‣ NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the
operation
Description
Get compute instance placements.
For Ampere or newer fully supported devices. Supported on Linux only. Requires
privileged user.
A placement represents the location of a compute instance within a GPU instance. This
API only returns all the possible placements for the given profile. A created compute
instance occupies compute slices described by its placement. Creation of new compute
instance will fail if there is overlap with the already occupied compute slices.
360
Modules
nvmlReturn_t nvmlGpuInstanceCreateComputeInstance
(nvmlGpuInstance_t gpuInstance, unsigned int profileId,
nvmlComputeInstance_t *computeInstance)
Parameters
gpuInstance
The identifier of the target GPU instance
profileId
The compute instance profile ID. See
nvmlGpuInstanceGetComputeInstanceProfileInfo
computeInstance
Returns the compute instance handle
Returns
‣ NVML_SUCCESS Upon success
‣ NVML_ERROR_UNINITIALIZED If library has not been successfully initialized
‣ NVML_ERROR_INVALID_ARGUMENT If gpuInstance, profile, profileId or
computeInstance are invalid
‣ NVML_ERROR_NOT_SUPPORTED If profileId isn't supported
‣ NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the
operation
‣ NVML_ERROR_INSUFFICIENT_RESOURCES If the requested compute instance
could not be created
Description
Create compute instance.
For Ampere or newer fully supported devices. Supported on Linux only. Requires
privileged user.
If the parent device is unbound, reset or the parent GPU instance is destroyed or the
compute instance is destroyed explicitly, the compute instance handle would become
invalid. The compute instance must be recreated to acquire a valid handle.
nvmlReturn_t
nvmlGpuInstanceCreateComputeInstanceWithPlacement
(nvmlGpuInstance_t gpuInstance, unsigned int profileId,
361
Modules
const nvmlComputeInstancePlacement_t *placement,
nvmlComputeInstance_t *computeInstance)
Parameters
gpuInstance
The identifier of the target GPU instance
profileId
The compute instance profile ID. See
nvmlGpuInstanceGetComputeInstanceProfileInfo
placement
The requested placement. See
nvmlGpuInstanceGetComputeInstancePossiblePlacements
computeInstance
Returns the compute instance handle
Returns
‣ NVML_SUCCESS Upon success
‣ NVML_ERROR_UNINITIALIZED If library has not been successfully initialized
‣ NVML_ERROR_INVALID_ARGUMENT If gpuInstance, profile, profileId or
computeInstance are invalid
‣ NVML_ERROR_NOT_SUPPORTED If profileId isn't supported
‣ NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the
operation
‣ NVML_ERROR_INSUFFICIENT_RESOURCES If the requested compute instance
could not be created
Description
Create compute instance with the specified placement.
For Ampere or newer fully supported devices. Supported on Linux only. Requires
privileged user.
If the parent device is unbound, reset or the parent GPU instance is destroyed or the
compute instance is destroyed explicitly, the compute instance handle would become
invalid. The compute instance must be recreated to acquire a valid handle.
362
Modules
nvmlReturn_t nvmlComputeInstanceDestroy
(nvmlComputeInstance_t computeInstance)
Parameters
computeInstance
The compute instance handle
Returns
‣ NVML_SUCCESS Upon success
‣ NVML_ERROR_UNINITIALIZED If library has not been successfully initialized
‣ NVML_ERROR_INVALID_ARGUMENT If computeInstance is invalid
‣ NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the
operation
‣ NVML_ERROR_IN_USE If the compute instance is in use. This error would be
returned if processes (e.g. CUDA application) are active on the compute instance.
Description
Destroy compute instance.
For Ampere or newer fully supported devices. Supported on Linux only. Requires
privileged user.
nvmlReturn_t nvmlGpuInstanceGetComputeInstances
(nvmlGpuInstance_t gpuInstance, unsigned int profileId,
nvmlComputeInstance_t *computeInstances, unsigned
int *count)
Parameters
gpuInstance
The identifier of the target GPU instance
profileId
The compute instance profile ID. See
nvmlGpuInstanceGetComputeInstanceProfileInfo
computeInstances
Returns pre-exiting compute instances, the buffer must be large
enough to accommodate the instances supported by the profile. See
nvmlGpuInstanceGetComputeInstanceProfileInfo
363
Modules
count
The count of returned compute instances
Returns
‣ NVML_SUCCESS Upon success
‣ NVML_ERROR_UNINITIALIZED If library has not been successfully initialized
‣ NVML_ERROR_INVALID_ARGUMENT If gpuInstance, profileId,
computeInstances or count are invalid
‣ NVML_ERROR_NOT_SUPPORTED If profileId isn't supported
‣ NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the
operation
Description
Get compute instances for given profile ID.
For Ampere or newer fully supported devices. Supported on Linux only. Requires
privileged user.
nvmlReturn_t nvmlGpuInstanceGetComputeInstanceById
(nvmlGpuInstance_t gpuInstance, unsigned int id,
nvmlComputeInstance_t *computeInstance)
Parameters
gpuInstance
The identifier of the target GPU instance
id
The compute instance ID
computeInstance
Returns compute instance
Returns
‣ NVML_SUCCESS Upon success
‣ NVML_ERROR_UNINITIALIZED If library has not been successfully initialized
‣ NVML_ERROR_INVALID_ARGUMENT If device, ID or computeInstance are
invalid
‣ NVML_ERROR_NOT_SUPPORTED If device doesn't have MIG mode enabled
‣ NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the
operation
‣ NVML_ERROR_NOT_FOUND If the compute instance is not found.
364
Modules
Description
Get compute instance for given instance ID.
For Ampere or newer fully supported devices. Supported on Linux only. Requires
privileged user.
nvmlReturn_t nvmlComputeInstanceGetInfo_v2
(nvmlComputeInstance_t computeInstance,
nvmlComputeInstanceInfo_t *info)
Parameters
computeInstance
The compute instance handle
info
Return compute instance information
Returns
‣ NVML_SUCCESS Upon success
‣ NVML_ERROR_UNINITIALIZED If library has not been successfully initialized
‣ NVML_ERROR_INVALID_ARGUMENT If computeInstance or info are invalid
‣ NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the
operation
Description
Get compute instance information.
For Ampere or newer fully supported devices. Supported on Linux only.
nvmlReturn_t nvmlDeviceIsMigDeviceHandle
(nvmlDevice_t device, unsigned int *isMigDevice)
Parameters
device
NVML handle to test
isMigDevice
True when handle refers to a MIG device
365
Modules
Returns
‣ NVML_SUCCESS if device status was successfully retrieved
‣ NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
‣ NVML_ERROR_INVALID_ARGUMENT if device handle or isMigDevice reference
is invalid
‣ NVML_ERROR_NOT_SUPPORTED if this check is not supported by the device
‣ NVML_ERROR_UNKNOWN on any unexpected error
Description
Test if the given handle refers to a MIG device.
A MIG device handle is an NVML abstraction which maps to a MIG compute instance.
These overloaded references can be used (with some restrictions) interchangeably with a
GPU device handle to execute queries at a per-compute instance granularity.
For Ampere or newer fully supported devices. Supported on Linux only.
nvmlReturn_t nvmlDeviceGetGpuInstanceId
(nvmlDevice_t device, unsigned int *id)
Parameters
device
Target MIG device handle
id
GPU instance ID
Returns
‣ NVML_SUCCESS if instance ID was successfully retrieved
‣ NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
‣ NVML_ERROR_INVALID_ARGUMENT if device or id reference is invalid
‣ NVML_ERROR_NOT_SUPPORTED if this query is not supported by the device
‣ NVML_ERROR_UNKNOWN on any unexpected error
Description
Get GPU instance ID for the given MIG device handle.
GPU instance IDs are unique per device and remain valid until the GPU instance is
destroyed.
For Ampere or newer fully supported devices. Supported on Linux only.
366
Modules
nvmlReturn_t nvmlDeviceGetComputeInstanceId
(nvmlDevice_t device, unsigned int *id)
Parameters
device
Target MIG device handle
id
Compute instance ID
Returns
‣ NVML_SUCCESS if instance ID was successfully retrieved
‣ NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
‣ NVML_ERROR_INVALID_ARGUMENT if device or id reference is invalid
‣ NVML_ERROR_NOT_SUPPORTED if this query is not supported by the device
‣ NVML_ERROR_UNKNOWN on any unexpected error
Description
Get compute instance ID for the given MIG device handle.
Compute instance IDs are unique per GPU instance and remain valid until the compute
instance is destroyed.
For Ampere or newer fully supported devices. Supported on Linux only.
nvmlReturn_t nvmlDeviceGetMaxMigDeviceCount
(nvmlDevice_t device, unsigned int *count)
Parameters
device
Target device handle
count
Count of MIG devices
Returns
‣ NVML_SUCCESS if count was successfully retrieved
‣ NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
‣ NVML_ERROR_INVALID_ARGUMENT if device or count reference is invalid
‣ NVML_ERROR_UNKNOWN on any unexpected error
367
Modules
Description
Get the maximum number of MIG devices that can exist under a given parent NVML
device.
Returns zero if MIG is not supported or enabled.
For Ampere or newer fully supported devices. Supported on Linux only.
nvmlReturn_t nvmlDeviceGetMigDeviceHandleByIndex
(nvmlDevice_t device, unsigned int index, nvmlDevice_t
*migDevice)
Parameters
device
Reference to the parent GPU device handle
index
Index of the MIG device
migDevice
Reference to the MIG device handle
Returns
‣ NVML_SUCCESS if migDevice handle was successfully created
‣ NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
‣ NVML_ERROR_INVALID_ARGUMENT if device, index or migDevice reference is
invalid
‣ NVML_ERROR_NOT_SUPPORTED if this query is not supported by the device
‣ NVML_ERROR_NOT_FOUND if no valid MIG device was found at index
‣ NVML_ERROR_UNKNOWN on any unexpected error
Description
Get MIG device handle for the given index under its parent NVML device.
If the compute instance is destroyed either explicitly or by destroying, resetting or
unbinding the parent GPU instance or the GPU device itself the MIG device handle
would remain invalid and must be requested again using this API. Handles may be
reused and their properties can change in the process.
For Ampere or newer fully supported devices. Supported on Linux only.
368
Modules
nvmlReturn_t
nvmlDeviceGetDeviceHandleFromMigDeviceHandle
(nvmlDevice_t migDevice, nvmlDevice_t *device)
Parameters
migDevice
MIG device handle
device
Device handle
Returns
‣ NVML_SUCCESS if device handle was successfully created
‣ NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
‣ NVML_ERROR_INVALID_ARGUMENT if migDevice or device is invalid
‣ NVML_ERROR_NOT_SUPPORTED if this query is not supported by the device
‣ NVML_ERROR_UNKNOWN on any unexpected error
Description
Get parent device handle from a MIG device handle.
For Ampere or newer fully supported devices. Supported on Linux only.
#define NVML_DEVICE_MIG_DISABLE 0x0
Disable Multi Instance GPU mode.
#define NVML_DEVICE_MIG_ENABLE 0x1
Enable Multi Instance GPU mode.
#define NVML_GPU_INSTANCE_PROFILE_1_SLICE 0x0
GPU instance profiles.
These macros should be passed to nvmlDeviceGetGpuInstanceProfileInfo to retrieve the
detailed information about a GPU instance such as profile ID, engine counts.
#define NVML_GPU_INSTANCE_PROFILE_CAPS_P2P 0x1
MIG GPU instance profile capability.
369
Modules
Bit field values representing MIG profile capabilities
nvmlGpuInstanceProfileInfo_v3_t::capabilities
#define NVML_GPU_INTSTANCE_PROFILE_CAPS_P2P 0x1
Deprecated, do not use.
#define NVML_COMPUTE_INSTANCE_PROFILE_CAPS_GFX
0x1
MIG compute instance profile capability.
Bit field values representing MIG profile capabilities
nvmlComputeInstanceProfileInfo_v3_t::capabilities
#define nvmlGpuInstanceProfileInfo_v2
NVML_STRUCT_VERSION(GpuInstanceProfileInfo, 2)
Version identifier value for nvmlGpuInstanceProfileInfo_v2_t::version.
#define nvmlGpuInstanceProfileInfo_v3
NVML_STRUCT_VERSION(GpuInstanceProfileInfo, 3)
Version identifier value for nvmlGpuInstanceProfileInfo_v3_t::version.
#define NVML_COMPUTE_INSTANCE_PROFILE_1_SLICE
0x0
Compute instance profiles.
These macros should be passed to nvmlGpuInstanceGetComputeInstanceProfileInfo to
retrieve the detailed information about a compute instance such as profile ID, engine
counts
#define
NVML_COMPUTE_INSTANCE_ENGINE_PROFILE_SHARED
0x0
All the engines except multiprocessors would be shared.
#define nvmlComputeInstanceProfileInfo_v2
NVML_STRUCT_VERSION(ComputeInstanceProfileInfo, 2)
Version identifier value for nvmlComputeInstanceProfileInfo_v2_t::version.
370
Modules
#define nvmlComputeInstanceProfileInfo_v3
NVML_STRUCT_VERSION(ComputeInstanceProfileInfo, 3)
Version identifier value for nvmlComputeInstanceProfileInfo_v3_t::version.
4.29. NVML GPM
GPM Enums
GPM Structs
GPM Functions
4.29.1. GPM Enums
NVML GPM
enum nvmlGpmMetricId_t
GPM Metric Identifiers
Values
NVML_GPM_METRIC_GRAPHICS_UTIL = 1
Percentage of time any compute/graphics app was active on the GPU. 0.0 - 100.0.
NVML_GPM_METRIC_SM_UTIL = 2
Percentage of SMs that were busy. 0.0 - 100.0.
NVML_GPM_METRIC_SM_OCCUPANCY = 3
Percentage of warps that were active vs theoretical maximum. 0.0 - 100.0.
NVML_GPM_METRIC_INTEGER_UTIL = 4
Percentage of time the GPU's SMs were doing integer operations. 0.0 - 100.0.
NVML_GPM_METRIC_ANY_TENSOR_UTIL = 5
Percentage of time the GPU's SMs were doing ANY tensor operations. 0.0 - 100.0.
NVML_GPM_METRIC_DFMA_TENSOR_UTIL = 6
Percentage of time the GPU's SMs were doing DFMA tensor operations. 0.0 - 100.0.
NVML_GPM_METRIC_HMMA_TENSOR_UTIL = 7
Percentage of time the GPU's SMs were doing HMMA tensor operations. 0.0 - 100.0.
NVML_GPM_METRIC_IMMA_TENSOR_UTIL = 9
Percentage of time the GPU's SMs were doing IMMA tensor operations. 0.0 - 100.0.
371
Modules
NVML_GPM_METRIC_DRAM_BW_UTIL = 10
Percentage of DRAM bw used vs theoretical maximum. 0.0 - 100.0 */.
NVML_GPM_METRIC_FP64_UTIL = 11
Percentage of time the GPU's SMs were doing non-tensor FP64 math. 0.0 - 100.0.
NVML_GPM_METRIC_FP32_UTIL = 12
Percentage of time the GPU's SMs were doing non-tensor FP32 math. 0.0 - 100.0.
NVML_GPM_METRIC_FP16_UTIL = 13
Percentage of time the GPU's SMs were doing non-tensor FP16 math. 0.0 - 100.0.
NVML_GPM_METRIC_PCIE_TX_PER_SEC = 20
PCIe traffic from this GPU in MiB/sec.
NVML_GPM_METRIC_PCIE_RX_PER_SEC = 21
PCIe traffic to this GPU in MiB/sec.
NVML_GPM_METRIC_NVDEC_0_UTIL = 30
Percent utilization of NVDEC 0. 0.0 - 100.0.
NVML_GPM_METRIC_NVDEC_1_UTIL = 31
Percent utilization of NVDEC 1. 0.0 - 100.0.
NVML_GPM_METRIC_NVDEC_2_UTIL = 32
Percent utilization of NVDEC 2. 0.0 - 100.0.
NVML_GPM_METRIC_NVDEC_3_UTIL = 33
Percent utilization of NVDEC 3. 0.0 - 100.0.
NVML_GPM_METRIC_NVDEC_4_UTIL = 34
Percent utilization of NVDEC 4. 0.0 - 100.0.
NVML_GPM_METRIC_NVDEC_5_UTIL = 35
Percent utilization of NVDEC 5. 0.0 - 100.0.
NVML_GPM_METRIC_NVDEC_6_UTIL = 36
Percent utilization of NVDEC 6. 0.0 - 100.0.
NVML_GPM_METRIC_NVDEC_7_UTIL = 37
Percent utilization of NVDEC 7. 0.0 - 100.0.
NVML_GPM_METRIC_NVJPG_0_UTIL = 40
Percent utilization of NVJPG 0. 0.0 - 100.0.
NVML_GPM_METRIC_NVJPG_1_UTIL = 41
Percent utilization of NVJPG 1. 0.0 - 100.0.
NVML_GPM_METRIC_NVJPG_2_UTIL = 42
Percent utilization of NVJPG 2. 0.0 - 100.0.
NVML_GPM_METRIC_NVJPG_3_UTIL = 43
Percent utilization of NVJPG 3. 0.0 - 100.0.
NVML_GPM_METRIC_NVJPG_4_UTIL = 44
Percent utilization of NVJPG 4. 0.0 - 100.0.
NVML_GPM_METRIC_NVJPG_5_UTIL = 45
Percent utilization of NVJPG 5. 0.0 - 100.0.
NVML_GPM_METRIC_NVJPG_6_UTIL = 46
Percent utilization of NVJPG 6. 0.0 - 100.0.
372
Modules
NVML_GPM_METRIC_NVJPG_7_UTIL = 47
Percent utilization of NVJPG 7. 0.0 - 100.0.
NVML_GPM_METRIC_NVOFA_0_UTIL = 50
Percent utilization of NVOFA 0. 0.0 - 100.0.
NVML_GPM_METRIC_NVOFA_1_UTIL = 51
Percent utilization of NVOFA 1. 0.0 - 100.0.
NVML_GPM_METRIC_NVLINK_TOTAL_RX_PER_SEC = 60
NvLink read bandwidth for all links in MiB/sec.
NVML_GPM_METRIC_NVLINK_TOTAL_TX_PER_SEC = 61
NvLink write bandwidth for all links in MiB/sec.
NVML_GPM_METRIC_NVLINK_L0_RX_PER_SEC = 62
NvLink read bandwidth for link 0 in MiB/sec.
NVML_GPM_METRIC_NVLINK_L0_TX_PER_SEC = 63
NvLink write bandwidth for link 0 in MiB/sec.
NVML_GPM_METRIC_NVLINK_L1_RX_PER_SEC = 64
NvLink read bandwidth for link 1 in MiB/sec.
NVML_GPM_METRIC_NVLINK_L1_TX_PER_SEC = 65
NvLink write bandwidth for link 1 in MiB/sec.
NVML_GPM_METRIC_NVLINK_L2_RX_PER_SEC = 66
NvLink read bandwidth for link 2 in MiB/sec.
NVML_GPM_METRIC_NVLINK_L2_TX_PER_SEC = 67
NvLink write bandwidth for link 2 in MiB/sec.
NVML_GPM_METRIC_NVLINK_L3_RX_PER_SEC = 68
NvLink read bandwidth for link 3 in MiB/sec.
NVML_GPM_METRIC_NVLINK_L3_TX_PER_SEC = 69
NvLink write bandwidth for link 3 in MiB/sec.
NVML_GPM_METRIC_NVLINK_L4_RX_PER_SEC = 70
NvLink read bandwidth for link 4 in MiB/sec.
NVML_GPM_METRIC_NVLINK_L4_TX_PER_SEC = 71
NvLink write bandwidth for link 4 in MiB/sec.
NVML_GPM_METRIC_NVLINK_L5_RX_PER_SEC = 72
NvLink read bandwidth for link 5 in MiB/sec.
NVML_GPM_METRIC_NVLINK_L5_TX_PER_SEC = 73
NvLink write bandwidth for link 5 in MiB/sec.
NVML_GPM_METRIC_NVLINK_L6_RX_PER_SEC = 74
NvLink read bandwidth for link 6 in MiB/sec.
NVML_GPM_METRIC_NVLINK_L6_TX_PER_SEC = 75
NvLink write bandwidth for link 6 in MiB/sec.
NVML_GPM_METRIC_NVLINK_L7_RX_PER_SEC = 76
NvLink read bandwidth for link 7 in MiB/sec.
NVML_GPM_METRIC_NVLINK_L7_TX_PER_SEC = 77
NvLink write bandwidth for link 7 in MiB/sec.
373
Modules
NVML_GPM_METRIC_NVLINK_L8_RX_PER_SEC = 78
NvLink read bandwidth for link 8 in MiB/sec.
NVML_GPM_METRIC_NVLINK_L8_TX_PER_SEC = 79
NvLink write bandwidth for link 8 in MiB/sec.
NVML_GPM_METRIC_NVLINK_L9_RX_PER_SEC = 80
NvLink read bandwidth for link 9 in MiB/sec.
NVML_GPM_METRIC_NVLINK_L9_TX_PER_SEC = 81
NvLink write bandwidth for link 9 in MiB/sec.
NVML_GPM_METRIC_NVLINK_L10_RX_PER_SEC = 82
NvLink read bandwidth for link 10 in MiB/sec.
NVML_GPM_METRIC_NVLINK_L10_TX_PER_SEC = 83
NvLink write bandwidth for link 10 in MiB/sec.
NVML_GPM_METRIC_NVLINK_L11_RX_PER_SEC = 84
NvLink read bandwidth for link 11 in MiB/sec.
NVML_GPM_METRIC_NVLINK_L11_TX_PER_SEC = 85
NvLink write bandwidth for link 11 in MiB/sec.
NVML_GPM_METRIC_NVLINK_L12_RX_PER_SEC = 86
NvLink read bandwidth for link 12 in MiB/sec.
NVML_GPM_METRIC_NVLINK_L12_TX_PER_SEC = 87
NvLink write bandwidth for link 12 in MiB/sec.
NVML_GPM_METRIC_NVLINK_L13_RX_PER_SEC = 88
NvLink read bandwidth for link 13 in MiB/sec.
NVML_GPM_METRIC_NVLINK_L13_TX_PER_SEC = 89
NvLink write bandwidth for link 13 in MiB/sec.
NVML_GPM_METRIC_NVLINK_L14_RX_PER_SEC = 90
NvLink read bandwidth for link 14 in MiB/sec.
NVML_GPM_METRIC_NVLINK_L14_TX_PER_SEC = 91
NvLink write bandwidth for link 14 in MiB/sec.
NVML_GPM_METRIC_NVLINK_L15_RX_PER_SEC = 92
NvLink read bandwidth for link 15 in MiB/sec.
NVML_GPM_METRIC_NVLINK_L15_TX_PER_SEC = 93
NvLink write bandwidth for link 15 in MiB/sec.
NVML_GPM_METRIC_NVLINK_L16_RX_PER_SEC = 94
NvLink read bandwidth for link 16 in MiB/sec.
NVML_GPM_METRIC_NVLINK_L16_TX_PER_SEC = 95
NvLink write bandwidth for link 16 in MiB/sec.
NVML_GPM_METRIC_NVLINK_L17_RX_PER_SEC = 96
NvLink read bandwidth for link 17 in MiB/sec.
NVML_GPM_METRIC_NVLINK_L17_TX_PER_SEC = 97
NvLink write bandwidth for link 17 in MiB/sec.
NVML_GPM_METRIC_C2C_TOTAL_TX_PER_SEC = 100
NVML_GPM_METRIC_C2C_TOTAL_RX_PER_SEC = 101
NVML_GPM_METRIC_C2C_DATA_TX_PER_SEC = 102
374
Modules
NVML_GPM_METRIC_C2C_DATA_RX_PER_SEC = 103
NVML_GPM_METRIC_C2C_LINK0_TOTAL_TX_PER_SEC = 104
NVML_GPM_METRIC_C2C_LINK0_TOTAL_RX_PER_SEC = 105
NVML_GPM_METRIC_C2C_LINK0_DATA_TX_PER_SEC = 106
NVML_GPM_METRIC_C2C_LINK0_DATA_RX_PER_SEC = 107
NVML_GPM_METRIC_C2C_LINK1_TOTAL_TX_PER_SEC = 108
NVML_GPM_METRIC_C2C_LINK1_TOTAL_RX_PER_SEC = 109
NVML_GPM_METRIC_C2C_LINK1_DATA_TX_PER_SEC = 110
NVML_GPM_METRIC_C2C_LINK1_DATA_RX_PER_SEC = 111
NVML_GPM_METRIC_C2C_LINK2_TOTAL_TX_PER_SEC = 112
NVML_GPM_METRIC_C2C_LINK2_TOTAL_RX_PER_SEC = 113
NVML_GPM_METRIC_C2C_LINK2_DATA_TX_PER_SEC = 114
NVML_GPM_METRIC_C2C_LINK2_DATA_RX_PER_SEC = 115
NVML_GPM_METRIC_C2C_LINK3_TOTAL_TX_PER_SEC = 116
NVML_GPM_METRIC_C2C_LINK3_TOTAL_RX_PER_SEC = 117
NVML_GPM_METRIC_C2C_LINK3_DATA_TX_PER_SEC = 118
NVML_GPM_METRIC_C2C_LINK3_DATA_RX_PER_SEC = 119
NVML_GPM_METRIC_C2C_LINK4_TOTAL_TX_PER_SEC = 120
NVML_GPM_METRIC_C2C_LINK4_TOTAL_RX_PER_SEC = 121
NVML_GPM_METRIC_C2C_LINK4_DATA_TX_PER_SEC = 122
NVML_GPM_METRIC_C2C_LINK4_DATA_RX_PER_SEC = 123
NVML_GPM_METRIC_C2C_LINK5_TOTAL_TX_PER_SEC = 124
NVML_GPM_METRIC_C2C_LINK5_TOTAL_RX_PER_SEC = 125
NVML_GPM_METRIC_C2C_LINK5_DATA_TX_PER_SEC = 126
NVML_GPM_METRIC_C2C_LINK5_DATA_RX_PER_SEC = 127
NVML_GPM_METRIC_C2C_LINK6_TOTAL_TX_PER_SEC = 128
NVML_GPM_METRIC_C2C_LINK6_TOTAL_RX_PER_SEC = 129
NVML_GPM_METRIC_C2C_LINK6_DATA_TX_PER_SEC = 130
NVML_GPM_METRIC_C2C_LINK6_DATA_RX_PER_SEC = 131
NVML_GPM_METRIC_C2C_LINK7_TOTAL_TX_PER_SEC = 132
NVML_GPM_METRIC_C2C_LINK7_TOTAL_RX_PER_SEC = 133
NVML_GPM_METRIC_C2C_LINK7_DATA_TX_PER_SEC = 134
NVML_GPM_METRIC_C2C_LINK7_DATA_RX_PER_SEC = 135
NVML_GPM_METRIC_C2C_LINK8_TOTAL_TX_PER_SEC = 136
NVML_GPM_METRIC_C2C_LINK8_TOTAL_RX_PER_SEC = 137
NVML_GPM_METRIC_C2C_LINK8_DATA_TX_PER_SEC = 138
NVML_GPM_METRIC_C2C_LINK8_DATA_RX_PER_SEC = 139
NVML_GPM_METRIC_C2C_LINK9_TOTAL_TX_PER_SEC = 140
NVML_GPM_METRIC_C2C_LINK9_TOTAL_RX_PER_SEC = 141
NVML_GPM_METRIC_C2C_LINK9_DATA_TX_PER_SEC = 142
NVML_GPM_METRIC_C2C_LINK9_DATA_RX_PER_SEC = 143
NVML_GPM_METRIC_C2C_LINK10_TOTAL_TX_PER_SEC = 144
NVML_GPM_METRIC_C2C_LINK10_TOTAL_RX_PER_SEC = 145
375
Modules
NVML_GPM_METRIC_C2C_LINK10_DATA_TX_PER_SEC = 146
NVML_GPM_METRIC_C2C_LINK10_DATA_RX_PER_SEC = 147
NVML_GPM_METRIC_C2C_LINK11_TOTAL_TX_PER_SEC = 148
NVML_GPM_METRIC_C2C_LINK11_TOTAL_RX_PER_SEC = 149
NVML_GPM_METRIC_C2C_LINK11_DATA_TX_PER_SEC = 150
NVML_GPM_METRIC_C2C_LINK11_DATA_RX_PER_SEC = 151
NVML_GPM_METRIC_C2C_LINK12_TOTAL_TX_PER_SEC = 152
NVML_GPM_METRIC_C2C_LINK12_TOTAL_RX_PER_SEC = 153
NVML_GPM_METRIC_C2C_LINK12_DATA_TX_PER_SEC = 154
NVML_GPM_METRIC_C2C_LINK12_DATA_RX_PER_SEC = 155
NVML_GPM_METRIC_C2C_LINK13_TOTAL_TX_PER_SEC = 156
NVML_GPM_METRIC_C2C_LINK13_TOTAL_RX_PER_SEC = 157
NVML_GPM_METRIC_C2C_LINK13_DATA_TX_PER_SEC = 158
NVML_GPM_METRIC_C2C_LINK13_DATA_RX_PER_SEC = 159
NVML_GPM_METRIC_HOSTMEM_CACHE_HIT = 160
NVML_GPM_METRIC_HOSTMEM_CACHE_MISS = 161
NVML_GPM_METRIC_PEERMEM_CACHE_HIT = 162
NVML_GPM_METRIC_PEERMEM_CACHE_MISS = 163
NVML_GPM_METRIC_DRAM_CACHE_HIT = 164
NVML_GPM_METRIC_DRAM_CACHE_MISS = 165
NVML_GPM_METRIC_NVENC_0_UTIL = 166
NVML_GPM_METRIC_NVENC_1_UTIL = 167
NVML_GPM_METRIC_NVENC_2_UTIL = 168
NVML_GPM_METRIC_NVENC_3_UTIL = 169
NVML_GPM_METRIC_GR0_CTXSW_CYCLES_ELAPSED = 170
NVML_GPM_METRIC_GR0_CTXSW_CYCLES_ACTIVE = 171
NVML_GPM_METRIC_GR0_CTXSW_REQUESTS = 172
NVML_GPM_METRIC_GR0_CTXSW_CYCLES_PER_REQ = 173
NVML_GPM_METRIC_GR0_CTXSW_ACTIVE_PCT = 174
NVML_GPM_METRIC_GR1_CTXSW_CYCLES_ELAPSED = 175
NVML_GPM_METRIC_GR1_CTXSW_CYCLES_ACTIVE = 176
NVML_GPM_METRIC_GR1_CTXSW_REQUESTS = 177
NVML_GPM_METRIC_GR1_CTXSW_CYCLES_PER_REQ = 178
NVML_GPM_METRIC_GR1_CTXSW_ACTIVE_PCT = 179
NVML_GPM_METRIC_GR2_CTXSW_CYCLES_ELAPSED = 180
NVML_GPM_METRIC_GR2_CTXSW_CYCLES_ACTIVE = 181
NVML_GPM_METRIC_GR2_CTXSW_REQUESTS = 182
NVML_GPM_METRIC_GR2_CTXSW_CYCLES_PER_REQ = 183
NVML_GPM_METRIC_GR2_CTXSW_ACTIVE_PCT = 184
NVML_GPM_METRIC_GR3_CTXSW_CYCLES_ELAPSED = 185
NVML_GPM_METRIC_GR3_CTXSW_CYCLES_ACTIVE = 186
NVML_GPM_METRIC_GR3_CTXSW_REQUESTS = 187
NVML_GPM_METRIC_GR3_CTXSW_CYCLES_PER_REQ = 188
376
Modules
NVML_GPM_METRIC_GR3_CTXSW_ACTIVE_PCT = 189
NVML_GPM_METRIC_GR4_CTXSW_CYCLES_ELAPSED = 190
NVML_GPM_METRIC_GR4_CTXSW_CYCLES_ACTIVE = 191
NVML_GPM_METRIC_GR4_CTXSW_REQUESTS = 192
NVML_GPM_METRIC_GR4_CTXSW_CYCLES_PER_REQ = 193
NVML_GPM_METRIC_GR4_CTXSW_ACTIVE_PCT = 194
NVML_GPM_METRIC_GR5_CTXSW_CYCLES_ELAPSED = 195
NVML_GPM_METRIC_GR5_CTXSW_CYCLES_ACTIVE = 196
NVML_GPM_METRIC_GR5_CTXSW_REQUESTS = 197
NVML_GPM_METRIC_GR5_CTXSW_CYCLES_PER_REQ = 198
NVML_GPM_METRIC_GR5_CTXSW_ACTIVE_PCT = 199
NVML_GPM_METRIC_GR6_CTXSW_CYCLES_ELAPSED = 200
NVML_GPM_METRIC_GR6_CTXSW_CYCLES_ACTIVE = 201
NVML_GPM_METRIC_GR6_CTXSW_REQUESTS = 202
NVML_GPM_METRIC_GR6_CTXSW_CYCLES_PER_REQ = 203
NVML_GPM_METRIC_GR6_CTXSW_ACTIVE_PCT = 204
NVML_GPM_METRIC_GR7_CTXSW_CYCLES_ELAPSED = 205
NVML_GPM_METRIC_GR7_CTXSW_CYCLES_ACTIVE = 206
NVML_GPM_METRIC_GR7_CTXSW_REQUESTS = 207
NVML_GPM_METRIC_GR7_CTXSW_CYCLES_PER_REQ = 208
NVML_GPM_METRIC_GR7_CTXSW_ACTIVE_PCT = 209
NVML_GPM_METRIC_MAX = 210
Maximum value above +1. Note that changing this should also change
NVML_GPM_METRICS_GET_VERSION due to struct size change.
4.29.2. GPM Structs
NVML GPM
struct nvmlGpmMetric_t
struct nvmlGpmMetricsGet_t
struct nvmlGpmSupport_t
typedef struct nvmlGpmSample_st *nvmlGpmSample_t
Handle to an allocated GPM sample allocated with nvmlGpmSampleAlloc(). Free this
with nvmlGpmSampleFree().
4.29.3. GPM Functions
NVML GPM
377
Modules
nvmlReturn_t nvmlGpmMetricsGet (nvmlGpmMetricsGet_t
*metricsGet)
Parameters
metricsGet
IN/OUT: populated nvmlGpmMetricsGet_t struct
Returns
‣ NVML_SUCCESS on success
‣ Nonzero NVML_ERROR_? enum on error
Description
Calculate GPM metrics from two samples.
For Hopper or newer fully supported devices.
To retrieve metrics, the user must first allocate the two sample buffers at metricsGet-
>sample1 and metricsGet->sample2 by calling nvmlGpmSampleAlloc(). Next, the user
should fill in the ID of each metric in metricsGet->metrics[i].metricId and specify the
total number of metrics to retrieve in metricsGet->numMetrics, The version should be set
to NVML_GPM_METRICS_GET_VERSION in metricsGet->version. The user then calls
the nvmlGpmSampleGet() API twice to obtain 2 samples of counters.
that the interval between these two nvmlGpmSampleGet() calls should be
greater than 100ms due to the internal sample refresh rate. Finally, the user calls
nvmlGpmMetricsGet to retrieve the metrics, which will be stored at metricsGet-
>metrics
nvmlReturn_t nvmlGpmSampleFree (nvmlGpmSample_t gpmSample)
Parameters
gpmSample
Sample to free
Returns
‣ NVML_SUCCESS on success
‣ NVML_ERROR_INVALID_ARGUMENT if an invalid pointer is provided
378
Modules
Description
Free an allocated sample buffer that was allocated with nvmlGpmSampleAlloc()
For Hopper or newer fully supported devices.
nvmlReturn_t nvmlGpmSampleAlloc (nvmlGpmSample_t
*gpmSample)
Parameters
gpmSample
Where the allocated sample will be stored
Returns
‣ NVML_SUCCESS on success
‣ NVML_ERROR_INVALID_ARGUMENT if an invalid pointer is provided
‣ NVML_ERROR_MEMORY if system memory is insufficient
Description
Allocate a sample buffer to be used with NVML GPM . You will need to allocate at least
two of these buffers to use with the NVML GPM feature
For Hopper or newer fully supported devices.
nvmlReturn_t nvmlGpmSampleGet (nvmlDevice_t device,
nvmlGpmSample_t gpmSample)
Parameters
device
Device to get samples for
gpmSample
Buffer to read samples into
Returns
‣ NVML_SUCCESS on success
‣ Nonzero NVML_ERROR_? enum on error
Description
Read a sample of GPM metrics into the provided gpmSample buffer. After two samples
are gathered, you can call nvmlGpmMetricGet on those samples to retrive metrics
379
Modules
For Hopper or newer fully supported devices.
The interval between two nvmlGpmSampleGet() calls should be greater than 100ms
due to the internal sample refresh rate.
nvmlReturn_t nvmlGpmMigSampleGet (nvmlDevice_t device,
unsigned int gpuInstanceId, nvmlGpmSample_t gpmSample)
Parameters
device
Device to get samples for
gpuInstanceId
MIG GPU Instance ID
gpmSample
Buffer to read samples into
Returns
‣ NVML_SUCCESS on success
‣ Nonzero NVML_ERROR_? enum on error
Description
Read a sample of GPM metrics into the provided gpmSample buffer for a MIG GPU
Instance.
After two samples are gathered, you can call nvmlGpmMetricGet on those samples to
retrive metrics
For Hopper or newer fully supported devices.
The interval between two nvmlGpmMigSampleGet() calls should be greater than
100ms due to the internal sample refresh rate.
nvmlReturn_t nvmlGpmQueryDeviceSupport (nvmlDevice_t device,
nvmlGpmSupport_t *gpmSupport)
Parameters
device
NVML device to query for
380
Modules
gpmSupport
Structure to indicate GPM support nvmlGpmSupport_t. Indicates GPM support per
system for the supplied device
Returns
‣ NVML_SUCCESS on success
‣ Nonzero NVML_ERROR_? enum if there is an error in processing the query
Description
Indicate whether the supplied device supports GPM
For Hopper or newer fully supported devices.
nvmlReturn_t nvmlGpmQueryIfStreamingEnabled (nvmlDevice_t
device, unsigned int *state)
Parameters
device
The identifier of the target device
state
Returns GPM stream state NVML_FEATURE_DISABLED or
NVML_FEATURE_ENABLED
Returns
‣ NVML_SUCCESS if current GPM stream state were successfully queried
‣ NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
‣ NVML_ERROR_INVALID_ARGUMENT if device is invalid or state is NULL
‣ NVML_ERROR_NOT_SUPPORTED if this query is not supported by the device
Description
Get GPM stream state.
For Hopper or newer fully supported devices. Supported on Linux, Windows TCC.
nvmlReturn_t nvmlGpmSetStreamingEnabled (nvmlDevice_t device,
unsigned int state)
Parameters
device
The identifier of the target device
381
Modules
state
GPM stream state, NVML_FEATURE_DISABLED or NVML_FEATURE_ENABLED
Returns
‣ NVML_SUCCESS if current GPM stream state is successfully set
‣ NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
‣ NVML_ERROR_INVALID_ARGUMENT if device is invalid
‣ NVML_ERROR_NOT_SUPPORTED if this query is not supported by the device
Description
Set GPM stream state.
For Hopper or newer fully supported devices. Supported on Linux, Windows TCC.
4.30. Power Profile Information
struct nvmlWorkloadPowerProfileInfo_v1_t
struct nvmlWorkloadPowerProfileProfilesInfo_v1_t
struct nvmlWorkloadPowerProfileCurrentProfiles_v1_t
struct nvmlWorkloadPowerProfileRequestedProfiles_v1_t
nvmlReturn_t
nvmlDeviceWorkloadPowerProfileGetProfilesInfo
(nvmlDevice_t device,
nvmlWorkloadPowerProfileProfilesInfo_t *profilesInfo)
Parameters
device
The identifier of the target device
profilesInfo
Reference to struct nvmlWorkloadPowerProfileProfilesInfo_t
Returns
‣ NVML_SUCCESS If the query is successful
382
Modules
‣ NVML_ERROR_INSUFFICIENT_SIZE If struct is fully allocated
‣ NVML_ERROR_UNINITIALIZED If the library has not been successfully initialized
‣ NVML_ERROR_INVALID_ARGUMENT If device is invalid or pointer to struct is
NULL
‣ NVML_ERROR_NOT_SUPPORTED If the device does not support this feature
‣ NVML_ERROR_GPU_IS_LOST If the target GPU has fallen off the bus or is
otherwise inaccessible
‣ NVML_ERROR_ARGUMENT_VERSION_MISMATCH If the provided version is
invalid/unsupported
‣ NVML_ERROR_UNKNOWN On any unexpected error
Description
Get Performance Profiles Information
BLACKWELL_OR_NEWER% See nvmlWorkloadPowerProfileProfilesInfo_v1_t for
more information on the struct. The mask perfProfilesMask is bitmask of all supported
mode indices where the mode is supported if the index is 1. Each supported mode will
have a corresponding entry in the perfProfile array which will contain the profileId,
the priority of this mode, where the lower the value, the higher the priority, and a
conflictingMask, where each bit set in the mask corresponds to a different profile which
cannot be used in conjunction with the given profile.
nvmlReturn_t
nvmlDeviceWorkloadPowerProfileGetCurrentProfiles
(nvmlDevice_t device,
nvmlWorkloadPowerProfileCurrentProfiles_t
*currentProfiles)
Parameters
device
The identifier of the target device
currentProfiles
Reference to struct nvmlWorkloadPowerProfileCurrentProfiles_v1_t
Returns
‣ NVML_SUCCESS If the query is successful
‣ NVML_ERROR_UNINITIALIZED If the library has not been successfully initialized
‣ NVML_ERROR_INVALID_ARGUMENT If device is invalid or the pointer to struct
is NULL
383
Modules
‣ NVML_ERROR_NOT_SUPPORTED If the device does not support this feature
‣ NVML_ERROR_GPU_IS_LOST If the target GPU has fallen off the bus or is
otherwise inaccessible
‣ NVML_ERROR_ARGUMENT_VERSION_MISMATCH If the provided version is
invalid/unsupported
‣ NVML_ERROR_UNKNOWN On any unexpected error
Description
Get Current Performance Profiles
BLACKWELL_OR_NEWER% See nvmlWorkloadPowerProfileCurrentProfiles_v1_t
for more information on the struct. This API returns a stuct which contains the current
perfProfilesMask, requestedProfilesMask and enforcedProfilesMask. Each bit set in each
bitmasks indicates the profile is supported, currently requested or currently engaged,
respectively.
nvmlReturn_t
nvmlDeviceWorkloadPowerProfileSetRequestedProfiles
(nvmlDevice_t device,
nvmlWorkloadPowerProfileRequestedProfiles_t
*requestedProfiles)
Parameters
device
The identifier of the target device
requestedProfiles
Reference to struct nvmlWorkloadPowerProfileRequestedProfiles_v1_t
Returns
‣ NVML_SUCCESS If the query is successful
‣ NVML_ERROR_UNINITIALIZED If the library has not been successfully initialized
‣ NVML_ERROR_INVALID_ARGUMENT If device is invalid or pointer to struct is
NULL
‣ NVML_ERROR_NOT_SUPPORTED If the device does not support this feature
‣ NVML_ERROR_GPU_IS_LOST If the target GPU has fallen off the bus or is
otherwise inaccessible
‣ NVML_ERROR_ARGUMENT_VERSION_MISMATCH If the provided version is
invalid/unsupported
‣ NVML_ERROR_UNKNOWN On any unexpected error
384
Modules
Description
Set Requested Performance Profiles
BLACKWELL_OR_NEWER% See nvmlWorkloadPowerProfileRequestedProfiles_v1_t
for more information on the struct. Reuqest one or more performance profiles
be activated using the input bitmask requestedProfilesMask, where each bit set
corresponds to a supported bit from the perfProfilesMask. These profiles will be added
to existing list of currently requested profiles. Requires root/admin permissions.
nvmlReturn_t
nvmlDeviceWorkloadPowerProfileClearRequestedProfiles
(nvmlDevice_t device,
nvmlWorkloadPowerProfileRequestedProfiles_t
*requestedProfiles)
Parameters
device
The identifier of the target device
requestedProfiles
Reference to struct nvmlWorkloadPowerProfileRequestedProfiles_v1_t
Returns
‣ NVML_SUCCESS If the query is successful
‣ NVML_ERROR_UNINITIALIZED If the library has not been successfully initialized
‣ NVML_ERROR_INVALID_ARGUMENT If device is invalid or pointer to struct is
NULL
‣ NVML_ERROR_NOT_SUPPORTED If the device does not support this feature
‣ NVML_ERROR_GPU_IS_LOST If the target GPU has fallen off the bus or is
otherwise inaccessible
‣ NVML_ERROR_ARGUMENT_VERSION_MISMATCH If the provided version is
invalid/unsupported
‣ NVML_ERROR_UNKNOWN On any unexpected error
Description
Clear Requested Performance Profiles
BLACKWELL_OR_NEWER% See nvmlWorkloadPowerProfileRequestedProfiles_v1_t
for more information on the struct. Clear one or more performance profiles be using the
input bitmask requestedProfilesMask, where each bit set corresponds to a supported
385
Modules
bit from the perfProfilesMask. These profiles will be removed from the existing list of
currently requested profiles. Requires root/admin permissions.
4.31. Power Smoothing Information
struct nvmlPowerSmoothingProfile_v1_t
struct nvmlPowerSmoothingState_v1_t
nvmlReturn_t
nvmlDevicePowerSmoothingActivatePresetProfile
(nvmlDevice_t device, nvmlPowerSmoothingProfile_t
*profile)
Parameters
device
The identifier of the target device
profile
Reference to nvmlPowerSmoothingProfile_v1_t. Note that only profile->profileId is
used and the rest of the structure is ignored.
Returns
‣ NVML_SUCCESS if the Desired Profile was successfully set
‣ NVML_ERROR_INVALID_ARGUMENT if device is invalid or structure was NULL
‣ NVML_ERROR_NO_PERMISSION if user does not have permission to change the
profile number
‣ NVML_ERROR_NOT_SUPPORTED if this feature is not supported by the device
Description
Activiate a specific preset profile for datacenter power smoothing. The API only sets the
active preset profile based on the input profileId, and ignores the other parameters of the
structure. Requires root/admin permissions.
BLACKWELL_OR_NEWER%
386
Modules
nvmlReturn_t
nvmlDevicePowerSmoothingUpdatePresetProfileParam
(nvmlDevice_t device, nvmlPowerSmoothingProfile_t
*profile)
Parameters
device
The identifier of the target device
profile
Reference to nvmlPowerSmoothingProfile_v1_t struct
Returns
‣ NVML_SUCCESS if the Active Profile was successfully set
‣ NVML_ERROR_INVALID_ARGUMENT if device is invalid or profile parameter/
value was invalid
‣ NVML_ERROR_NO_PERMISSION if user does not have permission to change any
profile parameters
‣ NVML_ERROR_ARGUMENT_VERSION_MISMATCH if the structure version is
not supported
Description
Update the value of a specific profile parameter contained within
nvmlPowerSmoothingProfile_v1_t. Requires root/admin permissions.
BLACKWELL_OR_NEWER%
NVML_POWER_SMOOTHING_PROFILE_PARAM_PERCENT_TMP_FLOOR
expects a value as a percentage from 00.00-100.00%
NVML_POWER_SMOOTHING_PROFILE_PARAM_RAMP_UP_RATE expects a value
in W/s NVML_POWER_SMOOTHING_PROFILE_PARAM_RAMP_DOWN_RATE
expects a value in W/s
NVML_POWER_SMOOTHING_PROFILE_PARAM_RAMP_DOWN_HYSTERESIS
expects a value in ms
387
Modules
nvmlReturn_t nvmlDevicePowerSmoothingSetState
(nvmlDevice_t device, nvmlPowerSmoothingState_t
*state)
Parameters
device
The identifier of the target device
state
Reference to nvmlPowerSmoothingState_v1_t
Returns
‣ NVML_SUCCESS if the feature state was successfully set
‣ NVML_ERROR_INVALID_ARGUMENT if device is invalid or state is NULL
‣ NVML_ERROR_NO_PERMISSION if user does not have permission to change
feature state
‣ NVML_ERROR_NOT_SUPPORTED if this feature is not supported by the device
Description
Enable or disable the Power Smoothing Feature. Requires root/admin permissions.
BLACKWELL_OR_NEWER%
See nvmlEnableState_t for details on allowed states
4.32. vGPU Enums, Constants, Structs
vGPU Enums
vGPU Constants
vGPU Structs
4.32.1. vGPU Enums
vGPU Enums, Constants, Structs
388
Modules
enum nvmlGpuVirtualizationMode_t
GPU virtualization mode types.
Values
NVML_GPU_VIRTUALIZATION_MODE_NONE = 0
Represents Bare Metal GPU.
NVML_GPU_VIRTUALIZATION_MODE_PASSTHROUGH = 1
Device is associated with GPU-Passthorugh.
NVML_GPU_VIRTUALIZATION_MODE_VGPU = 2
Device is associated with vGPU inside virtual machine.
NVML_GPU_VIRTUALIZATION_MODE_HOST_VGPU = 3
Device is associated with VGX hypervisor in vGPU mode.
NVML_GPU_VIRTUALIZATION_MODE_HOST_VSGA = 4
Device is associated with VGX hypervisor in vSGA mode.
enum nvmlHostVgpuMode_t
Host vGPU modes
Values
NVML_HOST_VGPU_MODE_NON_SRIOV = 0
Non SR-IOV mode.
NVML_HOST_VGPU_MODE_SRIOV = 1
SR-IOV mode.
enum nvmlVgpuVmIdType_t
Types of VM identifiers
Values
NVML_VGPU_VM_ID_DOMAIN_ID = 0
VM ID represents DOMAIN ID.
NVML_VGPU_VM_ID_UUID = 1
VM ID represents UUID.
enum nvmlVgpuGuestInfoState_t
vGPU GUEST info state
Values
NVML_VGPU_INSTANCE_GUEST_INFO_STATE_UNINITIALIZED = 0
Guest-dependent fields uninitialized.
389
Modules
NVML_VGPU_INSTANCE_GUEST_INFO_STATE_INITIALIZED = 1
Guest-dependent fields initialized.
enum nvmlGridLicenseFeatureCode_t
vGPU software licensable features
Values
NVML_GRID_LICENSE_FEATURE_CODE_UNKNOWN = 0
Unknown.
NVML_GRID_LICENSE_FEATURE_CODE_VGPU = 1
Virtual GPU.
NVML_GRID_LICENSE_FEATURE_CODE_NVIDIA_RTX = 2
Nvidia RTX.
NVML_GRID_LICENSE_FEATURE_CODE_VWORKSTATION =
NVML_GRID_LICENSE_FEATURE_CODE_NVIDIA_RTX
Deprecated, do not use.
NVML_GRID_LICENSE_FEATURE_CODE_GAMING = 3
Gaming.
NVML_GRID_LICENSE_FEATURE_CODE_COMPUTE = 4
Compute.
enum nvmlVgpuCapability_t
vGPU queryable capabilities
Values
NVML_VGPU_CAP_NVLINK_P2P = 0
P2P over NVLink is supported.
NVML_VGPU_CAP_GPUDIRECT = 1
GPUDirect capability is supported.
NVML_VGPU_CAP_MULTI_VGPU_EXCLUSIVE = 2
vGPU profile cannot be mixed with other vGPU profiles in same VM
NVML_VGPU_CAP_EXCLUSIVE_TYPE = 3
vGPU profile cannot run on a GPU alongside other profiles of different type
NVML_VGPU_CAP_EXCLUSIVE_SIZE = 4
vGPU profile cannot run on a GPU alongside other profiles of different size
NVML_VGPU_CAP_COUNT
enum nvmlVgpuDriverCapability_t
vGPU driver queryable capabilities
390
Modules
Values
NVML_VGPU_DRIVER_CAP_HETEROGENEOUS_MULTI_VGPU = 0
Supports mixing of different vGPU profiles within one guest VM.
NVML_VGPU_DRIVER_CAP_WARM_UPDATE = 1
Supports FSR and warm update of vGPU host driver without terminating the
running guest VM.
NVML_VGPU_DRIVER_CAP_COUNT
enum nvmlDeviceVgpuCapability_t
Device vGPU queryable capabilities
Values
NVML_DEVICE_VGPU_CAP_FRACTIONAL_MULTI_VGPU = 0
Query whether the fractional vGPU profiles on this GPU can be used in multi-vGPU
configurations.
NVML_DEVICE_VGPU_CAP_HETEROGENEOUS_TIMESLICE_PROFILES = 1
Query whether the GPU support concurrent execution of timesliced vGPU profiles of
differing types.
NVML_DEVICE_VGPU_CAP_HETEROGENEOUS_TIMESLICE_SIZES = 2
Query whether the GPU support concurrent execution of timesliced vGPU profiles of
differing framebuffer sizes.
NVML_DEVICE_VGPU_CAP_READ_DEVICE_BUFFER_BW = 3
Query the GPU's read_device_buffer expected bandwidth capacity in megabytes per
second.
NVML_DEVICE_VGPU_CAP_WRITE_DEVICE_BUFFER_BW = 4
Query the GPU's write_device_buffer expected bandwidth capacity in megabytes per
second.
NVML_DEVICE_VGPU_CAP_DEVICE_STREAMING = 5
Query whether the vGPU profiles on the GPU supports migration data streaming.
NVML_DEVICE_VGPU_CAP_MINI_QUARTER_GPU = 6
Set/Get support for mini-quarter vGPU profiles.
NVML_DEVICE_VGPU_CAP_COMPUTE_MEDIA_ENGINE_GPU = 7
Set/Get support for compute media engine vGPU profiles.
NVML_DEVICE_VGPU_CAP_WARM_UPDATE = 8
Query whether the GPU supports FSR and warm update.
NVML_DEVICE_VGPU_CAP_HOMOGENEOUS_PLACEMENTS = 9
Query whether the GPU supports reporting of placements of timesliced vGPU
profiles with identical framebuffer sizes.
NVML_DEVICE_VGPU_CAP_MIG_TIMESLICING_SUPPORTED = 10
Query whether the GPU supports timesliced vGPU on MIG.
391
Modules
NVML_DEVICE_VGPU_CAP_MIG_TIMESLICING_ENABLED = 11
Set/Get MIG timesliced mode reporting, without impacting the underlying
functionality.
NVML_DEVICE_VGPU_CAP_COUNT
#define NVML_GRID_LICENSE_EXPIRY_NOT_AVAILABLE 0
Expiry information not available.
Status codes for license expiry
#define NVML_GRID_LICENSE_EXPIRY_INVALID 1
Invalid expiry or error fetching expiry.
#define NVML_GRID_LICENSE_EXPIRY_VALID 2
Valid expiry.
#define NVML_GRID_LICENSE_EXPIRY_NOT_APPLICABLE 3
Expiry not applicable.
#define NVML_GRID_LICENSE_EXPIRY_PERMANENT 4
Permanent expiry.
4.32.2. vGPU Constants
vGPU Enums, Constants, Structs
#define NVML_GRID_LICENSE_BUFFER_SIZE 128
Buffer size guaranteed to be large enough for nvmlVgpuTypeGetLicense
#define NVML_VGPU_VIRTUALIZATION_CAP_MIGRATION 0:0
Macros for vGPU instance's virtualization capabilities bitfield.
#define NVML_VGPU_PGPU_VIRTUALIZATION_CAP_MIGRATION 0:0
Macros for pGPU's virtualization capabilities bitfield.
#define NVML_VGPU_PGPU_HETEROGENEOUS_MODE 0
Macros to indicate the vGPU mode of the GPU.
392
Modules
4.32.3. vGPU Structs
vGPU Enums, Constants, Structs
393
Modules
struct nvmlVgpuHeterogeneousMode_v1_t
struct nvmlVgpuPlacementId_v1_t
struct nvmlVgpuPlacementList_v1_t
struct nvmlVgpuPlacementList_v2_t
struct nvmlVgpuTypeBar1Info_v1_t
struct nvmlVgpuInstanceUtilizationSample_t
struct nvmlVgpuInstanceUtilizationInfo_v1_t
struct nvmlVgpuInstancesUtilizationInfo_v1_t
struct nvmlVgpuProcessUtilizationSample_t
struct nvmlVgpuProcessUtilizationInfo_v1_t
struct nvmlVgpuProcessesUtilizationInfo_v1_t
struct nvmlVgpuRuntimeState_v1_t
union nvmlVgpuSchedulerParams_t
struct nvmlVgpuSchedulerLogEntry_t
struct nvmlVgpuSchedulerLog_t
struct nvmlVgpuSchedulerGetState_t
union nvmlVgpuSchedulerSetParams_t
struct nvmlVgpuSchedulerSetState_t
struct nvmlVgpuSchedulerCapabilities_t
struct nvmlVgpuLicenseExpiry_t
struct nvmlGridLicenseExpiry_t
394
Modules
struct nvmlGridLicensableFeature_t
struct nvmlGridLicensableFeatures_t
struct nvmlVgpuTypeIdInfo_v1_t
struct nvmlVgpuTypeMaxInstance_v1_t
struct nvmlActiveVgpuInstanceInfo_v1_t
struct nvmlVgpuSchedulerState_v1_t
struct nvmlVgpuSchedulerStateInfo_v1_t
struct nvmlVgpuSchedulerLogInfo_v1_t
struct nvmlVgpuCreatablePlacementInfo_v1_t
enum nvmlDeviceGpuRecoveryAction_t
Enum describing the GPU Recovery Action
Values
NVML_GPU_RECOVERY_ACTION_NONE = 0
NVML_GPU_RECOVERY_ACTION_GPU_RESET = 1
NVML_GPU_RECOVERY_ACTION_NODE_REBOOT = 2
NVML_GPU_RECOVERY_ACTION_DRAIN_P2P = 3
NVML_GPU_RECOVERY_ACTION_DRAIN_AND_RESET = 4
#define NVML_VGPU_SCHEDULER_POLICY_UNKNOWN 0
vGPU scheduler policies
#define NVML_VGPU_SCHEDULER_ENGINE_TYPE_GRAPHICS 1
vGPU scheduler engine types
#define NVML_GRID_LICENSE_STATE_UNKNOWN 0
Unknown state.
vGPU license state
395
Modules
#define NVML_GRID_LICENSE_STATE_UNINITIALIZED 1
Uninitialized state.
#define NVML_GRID_LICENSE_STATE_UNLICENSED_UNRESTRICTED 2
Unlicensed unrestricted state.
#define NVML_GRID_LICENSE_STATE_UNLICENSED_RESTRICTED 3
Unlicensed restricted state.
#define NVML_GRID_LICENSE_STATE_UNLICENSED 4
Unlicensed state.
#define NVML_GRID_LICENSE_STATE_LICENSED 5
Licensed state.
4.33. NvmlClocksEventReasons
#define nvmlClocksEventReasonGpuIdle
0x0000000000000001LL
Nothing is running on the GPU and the clocks are dropping to Idle state
This limiter may be removed in a later release
#define
nvmlClocksEventReasonApplicationsClocksSetting
0x0000000000000002LL
GPU clocks are limited by current setting of applications clocks
See also:
nvmlDeviceSetApplicationsClocks
nvmlDeviceGetApplicationsClock
396
Modules
#define nvmlClocksThrottleReasonUserDefinedClocks
nvmlClocksEventReasonApplicationsClocksSetting
Deprecated Renamed to nvmlClocksThrottleReasonApplicationsClocksSetting as the
name describes the situation more accurately.
#define nvmlClocksEventReasonSwPowerCap
0x0000000000000004LL
The clocks have been optimized to ensure not to exceed currently set power limits
See also:
nvmlDeviceGetPowerUsage
nvmlDeviceSetPowerManagementLimit
nvmlDeviceGetPowerManagementLimit
#define nvmlClocksThrottleReasonHwSlowdown
0x0000000000000008LL
HW Slowdown (reducing the core clocks by a factor of 2 or more) is engaged
This is an indicator of:
‣ temperature being too high
‣ External Power Brake Assertion is triggered (e.g. by the system power supply)
‣ Power draw is too high and Fast Trigger protection is reducing the clocks
‣ May be also reported during PState or clock change
‣ This behavior may be removed in a later release.
See also:
nvmlDeviceGetTemperature
nvmlDeviceGetTemperatureThreshold
nvmlDeviceGetPowerUsage
#define nvmlClocksEventReasonSyncBoost
0x0000000000000010LL
Sync Boost
397
Modules
This GPU has been added to a Sync boost group with nvidia-smi or DCGM in order
to maximize performance per watt. All GPUs in the sync boost group will boost to the
minimum possible clocks across the entire group. Look at the throttle reasons for other
GPUs in the system to see why those GPUs are holding this one at lower clocks.
#define nvmlClocksEventReasonSwThermalSlowdown
0x0000000000000020LL
SW Thermal Slowdown
The current clocks have been optimized to ensure the the following is true:
‣ Current GPU temperature does not exceed GPU Max Operating Temperature
‣ Current memory temperature does not exceeed Memory Max Operating
Temperature
#define nvmlClocksThrottleReasonHwThermalSlowdown
0x0000000000000040LL
HW Thermal Slowdown (reducing the core clocks by a factor of 2 or more) is engaged
This is an indicator of:
‣ temperature being too high
See also:
nvmlDeviceGetTemperature
nvmlDeviceGetTemperatureThreshold
nvmlDeviceGetPowerUsage
#define
nvmlClocksThrottleReasonHwPowerBrakeSlowdown
0x0000000000000080LL
HW Power Brake Slowdown (reducing the core clocks by a factor of 2 or more) is
engaged
This is an indicator of:
‣ External Power Brake Assertion being triggered (e.g. by the system power supply)
See also:
nvmlDeviceGetTemperature
nvmlDeviceGetTemperatureThreshold
398
Modules
nvmlDeviceGetPowerUsage
#define nvmlClocksEventReasonDisplayClockSetting
0x0000000000000100LL
GPU clocks are limited by current setting of Display clocks
See also:
bug 1997531
#define nvmlClocksEventReasonNone
0x0000000000000000LL
Bit mask representing no clocks throttling
Clocks are as high as possible.
#define nvmlClocksEventReasonAll
(nvmlClocksThrottleReasonNone \ |
nvmlClocksEventReasonGpuIdle \ |
nvmlClocksEventReasonApplicationsClocksSetting
\ | nvmlClocksEventReasonSwPowerCap \
| nvmlClocksThrottleReasonHwSlowdown
\ | nvmlClocksEventReasonSyncBoost \ |
nvmlClocksEventReasonSwThermalSlowdown \ |
nvmlClocksThrottleReasonHwThermalSlowdown \ |
nvmlClocksThrottleReasonHwPowerBrakeSlowdown \ |
nvmlClocksEventReasonDisplayClockSetting \ )
Bit mask representing all supported clocks throttling reasons New reasons might be
added to this list in the future
#define nvmlClocksThrottleReasonGpuIdle
nvmlClocksEventReasonGpuIdle
Deprecated Use nvmlClocksEventReasonGpuIdle instead
399
Modules
#define
nvmlClocksThrottleReasonApplicationsClocksSetting
nvmlClocksEventReasonApplicationsClocksSetting
Deprecated Use nvmlClocksEventReasonApplicationsClocksSetting instead
#define nvmlClocksThrottleReasonSyncBoost
nvmlClocksEventReasonSyncBoost
Deprecated Use nvmlClocksEventReasonSyncBoost instead
#define nvmlClocksThrottleReasonSwPowerCap
nvmlClocksEventReasonSwPowerCap
Deprecated Use nvmlClocksEventReasonSwPowerCap instead
#define nvmlClocksThrottleReasonSwThermalSlowdown
nvmlClocksEventReasonSwThermalSlowdown
Deprecated Use nvmlClocksEventReasonSwThermalSlowdown instead
#define nvmlClocksThrottleReasonDisplayClockSetting
nvmlClocksEventReasonDisplayClockSetting
Deprecated Use nvmlClocksEventReasonDisplayClockSetting instead
#define nvmlClocksThrottleReasonNone
nvmlClocksEventReasonNone
Deprecated Use nvmlClocksEventReasonNone instead
#define nvmlClocksThrottleReasonAll
nvmlClocksEventReasonAll
Deprecated Use nvmlClocksEventReasonAll instead
400
Chapter 5.
DATA STRUCTURES
Here are the data structures with brief descriptions:
nvmlAccountingStats_t
nvmlActiveVgpuInstanceInfo_v1_t
nvmlBAR1Memory_t
nvmlBridgeChipHierarchy_t
nvmlBridgeChipInfo_t
nvmlC2cModeInfo_v1_t
nvmlClkMonFaultInfo_t
nvmlClkMonStatus_t
nvmlClockOffset_v1_t
nvmlComputeInstanceProfileInfo_t
nvmlComputeInstanceProfileInfo_v2_t
nvmlComputeInstanceProfileInfo_v3_t
nvmlConfComputeMemSizeInfo_t
nvmlDeviceCapabilities_v1_t
nvmlDeviceCurrentClockFreqs_v1_t
nvmlDevicePerfModes_v1_t
nvmlDramEncryptionInfo_v1_t
nvmlEccErrorCounts_t
nvmlEccSramErrorStatus_v1_t
nvmlEncoderSessionInfo_t
nvmlEventData_t
nvmlExcludedDeviceInfo_t
nvmlFanSpeedInfo_v1_t
nvmlFBCSessionInfo_t
nvmlFBCStats_t
nvmlFieldValue_t
nvmlGpmMetric_t
nvmlGpmMetricsGet_t
nvmlGpmSupport_t
401
Data Structures
nvmlGpuFabricInfo_t
nvmlGpuFabricInfo_v2_t
nvmlGpuInstanceProfileInfo_t
nvmlGpuInstanceProfileInfo_v2_t
nvmlGpuInstanceProfileInfo_v3_t
nvmlGpuThermalSettings_t
nvmlGridLicensableFeature_t
nvmlGridLicensableFeatures_t
nvmlGridLicenseExpiry_t
nvmlHwbcEntry_t
nvmlLedState_t
nvmlMarginTemperature_v1_t
nvmlMemory_t
nvmlMemory_v2_t
nvmlNvLinkUtilizationControl_t
nvmlPciInfo_t
nvmlPciInfoExt_v1_t
nvmlPlatformInfo_v1_t
nvmlPlatformInfo_v2_t
nvmlPowerSmoothingProfile_v1_t
nvmlPowerSmoothingState_v1_t
nvmlPowerValue_v2_t
nvmlProcessDetail_v1_t
nvmlProcessDetailList_v1_t
nvmlProcessesUtilizationInfo_v1_t
nvmlProcessInfo_t
nvmlProcessInfo_v1_t
nvmlProcessUtilizationInfo_v1_t
nvmlProcessUtilizationSample_t
nvmlPSUInfo_t
nvmlRowRemapperHistogramValues_t
nvmlSample_t
nvmlSystemConfComputeSettings_v1_t
nvmlSystemDriverBranchInfo_v1_t
nvmlSystemEventData_v1_t
nvmlSystemEventSetCreateRequest_v1_t
nvmlSystemEventSetFreeRequest_v1_t
nvmlSystemEventSetWaitRequest_v1_t
nvmlSystemRegisterEventRequest_v1_t
nvmlTemperature_v1_t
nvmlUnitFanInfo_t
nvmlUnitFanSpeeds_t
nvmlUnitInfo_t
402
Data Structures
nvmlUtilization_t
nvmlUUID_v1_t
nvmlUUIDValue_t
nvmlValue_t
nvmlVgpuCreatablePlacementInfo_v1_t
nvmlVgpuHeterogeneousMode_v1_t
nvmlVgpuInstancesUtilizationInfo_v1_t
nvmlVgpuInstanceUtilizationInfo_v1_t
nvmlVgpuInstanceUtilizationSample_t
nvmlVgpuLicenseExpiry_t
nvmlVgpuMetadata_t
nvmlVgpuPgpuCompatibility_t
nvmlVgpuPgpuMetadata_t
nvmlVgpuPlacementId_v1_t
nvmlVgpuPlacementList_v1_t
nvmlVgpuPlacementList_v2_t
nvmlVgpuProcessesUtilizationInfo_v1_t
nvmlVgpuProcessUtilizationInfo_v1_t
nvmlVgpuProcessUtilizationSample_t
nvmlVgpuRuntimeState_v1_t
nvmlVgpuSchedulerCapabilities_t
nvmlVgpuSchedulerGetState_t
nvmlVgpuSchedulerLog_t
nvmlVgpuSchedulerLogEntry_t
nvmlVgpuSchedulerLogInfo_v1_t
nvmlVgpuSchedulerParams_t
nvmlVgpuSchedulerSetParams_t
nvmlVgpuSchedulerSetState_t
nvmlVgpuSchedulerState_v1_t
nvmlVgpuSchedulerStateInfo_v1_t
nvmlVgpuTypeBar1Info_v1_t
nvmlVgpuTypeIdInfo_v1_t
nvmlVgpuTypeMaxInstance_v1_t
nvmlVgpuVersion_t
nvmlViolationTime_t
nvmlWorkloadPowerProfileCurrentProfiles_v1_t
nvmlWorkloadPowerProfileInfo_v1_t
nvmlWorkloadPowerProfileProfilesInfo_v1_t
nvmlWorkloadPowerProfileRequestedProfiles_v1_t
403
Data Structures
5.1. nvmlAccountingStats_t Struct Reference
Describes accounting statistics of a process.
unsigned int nvmlAccountingStats_t::gpuUtilization
Description
Percent of time over the process's lifetime during which one or more
kernels was executing on the GPU. Utilization stats just like returned by
nvmlDeviceGetUtilizationRates but for the life time of a process (not just the last sample
period). Set to NVML_VALUE_NOT_AVAILABLE if nvmlDeviceGetUtilizationRates is
not supported
unsigned int nvmlAccountingStats_t::memoryUtilization
Description
Percent of time over the process's lifetime during which global (device)
memory was being read or written. Set to NVML_VALUE_NOT_AVAILABLE if
nvmlDeviceGetUtilizationRates is not supported
unsigned long long
nvmlAccountingStats_t::maxMemoryUsage
Description
Maximum total memory in bytes that was ever allocated by the process. Set to
NVML_VALUE_NOT_AVAILABLE if nvmlProcessInfo_t->usedGpuMemory is not
supported
unsigned long long nvmlAccountingStats_t::time
Description
Amount of time in ms during which the compute context was active. The time is
reported as 0 if the process is not terminated
404
Data Structures
unsigned long long nvmlAccountingStats_t::startTime
CPU Timestamp in usec representing start time for the process.
unsigned int nvmlAccountingStats_t::isRunning
Flag to represent if the process is running (1 for running, 0 for terminated).
unsigned int nvmlAccountingStats_t::reserved
Reserved for future use.
5.2. nvmlActiveVgpuInstanceInfo_v1_t Struct
Reference
Structure to store active vGPU instance information -- Version 1
unsigned int nvmlActiveVgpuInstanceInfo_v1_t::version
IN: The version number of this struct.
unsigned int
nvmlActiveVgpuInstanceInfo_v1_t::vgpuCount
IN/OUT: Count of the active vGPU instances.
nvmlVgpuInstance_t
*nvmlActiveVgpuInstanceInfo_v1_t::vgpuInstances
IN/OUT: list of active vGPU instances.
5.3. nvmlBAR1Memory_t Struct Reference
BAR1 Memory allocation Information for a device
405
Data Structures
unsigned long long nvmlBAR1Memory_t::bar1Total
Total BAR1 Memory (in bytes).
unsigned long long nvmlBAR1Memory_t::bar1Free
Unallocated BAR1 Memory (in bytes).
unsigned long long nvmlBAR1Memory_t::bar1Used
Allocated Used Memory (in bytes).
5.4. nvmlBridgeChipHierarchy_t Struct Reference
This structure stores the complete Hierarchy of the Bridge Chip within the board. The
immediate bridge is stored at index 0 of bridgeInfoList, parent to immediate bridge is at
index 1 and so forth.
unsigned char nvmlBridgeChipHierarchy_t::bridgeCount
Number of Bridge Chips on the Board.
struct nvmlBridgeChipInfo_t
nvmlBridgeChipHierarchy_t::bridgeChipInfo
Hierarchy of Bridge Chips on the board.
5.5. nvmlBridgeChipInfo_t Struct Reference
Information about the Bridge Chip Firmware
nvmlBridgeChipType_t nvmlBridgeChipInfo_t::type
Type of Bridge Chip.
unsigned int nvmlBridgeChipInfo_t::fwVersion
Firmware Version. 0=Version is unavailable.
5.6. nvmlC2cModeInfo_v1_t Struct Reference
C2C Mode information for a device
406
Data Structures
5.7. nvmlClkMonFaultInfo_t Struct Reference
Clock Monitor error types
unsigned int nvmlClkMonFaultInfo_t::clkApiDomain
Description
The Domain which faulted
unsigned int
nvmlClkMonFaultInfo_t::clkDomainFaultMask
Description
Faults Information
5.8. nvmlClkMonStatus_t Struct Reference
Clock Monitor Status
unsigned int nvmlClkMonStatus_t::bGlobalStatus
Description
Fault status Indicator
unsigned int nvmlClkMonStatus_t::clkMonListSize
Description
Total faulted domain numbers
struct nvmlClkMonFaultInfo_t
nvmlClkMonStatus_t::clkMonList
Description
The fault Information structure
407
Data Structures
5.9. nvmlClockOffset_v1_t Struct Reference
Clock offset info.
unsigned int nvmlClockOffset_v1_t::version
The version number of this struct.
5.10. nvmlComputeInstanceProfileInfo_t Struct
Reference
Compute instance profile information.
408
Data Structures
unsigned int nvmlComputeInstanceProfileInfo_t::id
Unique profile ID within the GPU instance.
unsigned int
nvmlComputeInstanceProfileInfo_t::sliceCount
GPU Slice count.
unsigned int
nvmlComputeInstanceProfileInfo_t::instanceCount
Compute instance count.
unsigned int
nvmlComputeInstanceProfileInfo_t::multiprocessorCount
Streaming Multiprocessor count.
unsigned int
nvmlComputeInstanceProfileInfo_t::sharedCopyEngineCount
Shared Copy Engine count.
unsigned int
nvmlComputeInstanceProfileInfo_t::sharedDecoderCount
Shared Decoder Engine count.
unsigned int
nvmlComputeInstanceProfileInfo_t::sharedEncoderCount
Shared Encoder Engine count.
unsigned int
nvmlComputeInstanceProfileInfo_t::sharedJpegCount
Shared JPEG Engine count.
unsigned int
nvmlComputeInstanceProfileInfo_t::sharedOfaCount
Shared OFA Engine count.
409
Data Structures
5.11. nvmlComputeInstanceProfileInfo_v2_t Struct
Reference
Compute instance profile information (v2).
Version 2 adds the nvmlComputeInstanceProfileInfo_v2_t::version field to the start of
the structure, and the nvmlComputeInstanceProfileInfo_v2_t::name field to the end. This
structure is not backwards-compatible with nvmlComputeInstanceProfileInfo_t.
410
Data Structures
unsigned int
nvmlComputeInstanceProfileInfo_v2_t::version
Structure version identifier (set to nvmlComputeInstanceProfileInfo_v2).
unsigned int nvmlComputeInstanceProfileInfo_v2_t::id
Unique profile ID within the GPU instance.
unsigned int
nvmlComputeInstanceProfileInfo_v2_t::sliceCount
GPU Slice count.
unsigned int
nvmlComputeInstanceProfileInfo_v2_t::instanceCount
Compute instance count.
unsigned int
nvmlComputeInstanceProfileInfo_v2_t::multiprocessorCount
Streaming Multiprocessor count.
unsigned int
nvmlComputeInstanceProfileInfo_v2_t::sharedCopyEngineCount
Shared Copy Engine count.
unsigned int
nvmlComputeInstanceProfileInfo_v2_t::sharedDecoderCount
Shared Decoder Engine count.
unsigned int
nvmlComputeInstanceProfileInfo_v2_t::sharedEncoderCount
Shared Encoder Engine count.
unsigned int
nvmlComputeInstanceProfileInfo_v2_t::sharedJpegCount
Shared JPEG Engine count.
411
|
||
|
|
|