NvLink Methods#
This chapter describes methods that NVML can perform on NVLINK enabled devices.
Macros#
- NVML_NVLINK_BER_EXP_SHIFT
Shift for NVLink BER exponent.
- NVML_NVLINK_BER_EXP_WIDTH
Width for NVLink BER exponent.
- NVML_NVLINK_BER_MANTISSA_SHIFT
Shift for NVLink BER mantissa.
- NVML_NVLINK_BER_MANTISSA_WIDTH
Width for NVLink BER mantissa.
- NVML_NVLINK_ERROR_COUNTER_BER_GET
Nvlink Error counter BER can be obtained using the below macros Ex - NVML_NVLINK_ERROR_COUNTER_BER_GET(var, BER_MANTISSA)
- NVML_NVLINK_FIRMWARE_UCODE_TYPE_MSE
MSE ucode type.
- NVML_NVLINK_FIRMWARE_UCODE_TYPE_NETIR
NETIR ucode type.
- NVML_NVLINK_FIRMWARE_UCODE_TYPE_NETIR_CLN
NETIR CLN ucode type.
- NVML_NVLINK_FIRMWARE_UCODE_TYPE_NETIR_DLN
NETIR DLN ucode type.
- NVML_NVLINK_FIRMWARE_UCODE_TYPE_NETIR_UPHY
NETIR UPHY ucode type.
- NVML_NVLINK_FIRMWARE_VERSION_LENGTH
Length of firmware version string.
- NVML_NVLINK_STATE_ACTIVE
NVLink is active.
- NVML_NVLINK_STATE_ACTIVE_TRAFFIC_DISABLED
NVLink is active, but not usable for traffic.
- NVML_NVLINK_STATE_INACTIVE
NVLink is inactive.
- NVML_NVLINK_STATE_SLEEP
NVLink is in sleep state.
- NVML_NVLINK_TOTAL_SUPPORTED_BW_MODES
Total supported NVLink bandwidth modes.
- nvmlNvLinkInfo_v1
Version macro for nvmlNvLinkInfo_v1_t .
- nvmlNvLinkInfo_v2
Version macro for nvmlNvLinkInfo_v2_t .
- nvmlNvlinkGetBwMode_v1
Version macro for nvmlNvlinkGetBwMode_v1_t .
- nvmlNvlinkSetBwMode_v1
Version macro for nvmlNvlinkSetBwMode_v1_t .
- nvmlNvlinkSupportedBwModes_v1
Version macro for nvmlNvlinkSupportedBwModes_v1_t .
Enumerations#
- nvmlNvlinkTelemetrySampleType_t
Per-link NVLink telemetry sample types.
- nvmlNvlinkVersion_t
Represents Nvlink Version.
Functions#
- nvmlReturn_t nvmlDeviceFreezeNvLinkUtilizationCounter(nvmlDevice_t device, unsigned int link, unsigned int counter, nvmlEnableState_t freeze)
- nvmlReturn_t nvmlDeviceGetNvLinkCapability(nvmlDevice_t device, unsigned int link, nvmlNvLinkCapability_t capability, unsigned int *capResult)
Retrieves the requested capability from the device's NvLink for the link specified Please refer to the nvmlNvLinkCapability_t structure for the specific caps that can be queried The return value should be treated as a boolean.
- nvmlReturn_t nvmlDeviceGetNvLinkErrorCounter(nvmlDevice_t device, unsigned int link, nvmlNvLinkErrorCounter_t counter, unsigned long long *counterValue)
Retrieves the specified error counter value Please refer to nvmlNvLinkErrorCounter_t for error counters that are available.
- nvmlReturn_t nvmlDeviceGetNvLinkInfo(nvmlDevice_t device, nvmlNvLinkInfo_t *info)
Query NVLINK information associated with this device.
- nvmlReturn_t nvmlDeviceGetNvLinkRemoteDeviceType(nvmlDevice_t device, unsigned int link, nvmlIntNvLinkDeviceType_t *pNvLinkDeviceType)
Get the NVLink device type of the remote device connected over the given link.
- nvmlReturn_t nvmlDeviceGetNvLinkRemotePciInfo_v2(nvmlDevice_t device, unsigned int link, nvmlPciInfo_t *pci)
Retrieves the PCI information for the remote node on a NvLink link Note: pciSubSystemId is not filled in this function and is indeterminate.
- nvmlReturn_t nvmlDeviceGetNvLinkState(nvmlDevice_t device, unsigned int link, nvmlEnableState_t *isActive)
Retrieves the state of the device's NvLink for the link specified.
- nvmlReturn_t nvmlDeviceGetNvLinkTelemetrySamples_v1(nvmlDevice_t device, nvmlNvlinkTelemetrySamples_v1_t *samples)
Retrieve a batch of historical NVLink per-link telemetry samples.
- nvmlReturn_t nvmlDeviceGetNvLinkUtilizationControl(nvmlDevice_t device, unsigned int link, unsigned int counter, nvmlNvLinkUtilizationControl_t *control)
- nvmlReturn_t nvmlDeviceGetNvLinkUtilizationCounter(nvmlDevice_t device, unsigned int link, unsigned int counter, unsigned long long *rxcounter, unsigned long long *txcounter)
- nvmlReturn_t nvmlDeviceGetNvLinkVersion(nvmlDevice_t device, unsigned int link, unsigned int *version)
Retrieves the version of the device's NvLink for the link specified.
- nvmlReturn_t nvmlDeviceGetNvlinkBwMode(nvmlDevice_t device, nvmlNvlinkGetBwMode_t *getBwMode)
Get the NvLink Reduced Bandwidth Mode for the device.
- nvmlReturn_t nvmlDeviceGetNvlinkSupportedBwModes(nvmlDevice_t device, nvmlNvlinkSupportedBwModes_t *supportedBwMode)
Get the supported NvLink Reduced Bandwidth Modes of the device.
- nvmlReturn_t nvmlDeviceResetNvLinkErrorCounters(nvmlDevice_t device, unsigned int link)
Resets all error counters to zero Please refer to nvmlNvLinkErrorCounter_t for the list of error counters that are reset.
- nvmlReturn_t nvmlDeviceResetNvLinkUtilizationCounter(nvmlDevice_t device, unsigned int link, unsigned int counter)
- nvmlReturn_t nvmlDeviceSetNvLinkDeviceLowPowerThreshold(nvmlDevice_t device, nvmlNvLinkPowerThres_t *info)
Set NvLink Low Power Threshold for device.
- nvmlReturn_t nvmlDeviceSetNvLinkUtilizationControl(nvmlDevice_t device, unsigned int link, unsigned int counter, nvmlNvLinkUtilizationControl_t *control, unsigned int reset)
- nvmlReturn_t nvmlDeviceSetNvlinkBwMode(nvmlDevice_t device, nvmlNvlinkSetBwMode_t *setBwMode)
Set the NvLink Reduced Bandwidth Mode for the device.
- nvmlReturn_t nvmlDeviceSetNvlinkBwModeAsync_v1(nvmlDevice_t device, nvmlNvlinkSetBwModeAsync_v1_t *setBwModeAsync)
Set the NvLink Reduced Bandwidth Mode asynchronously for the device.
- nvmlReturn_t nvmlSystemGetNvlinkBwMode(unsigned int *nvlinkBwMode)
Get the global nvlink bandwith mode.
- nvmlReturn_t nvmlSystemSetNvlinkBwMode(unsigned int nvlinkBwMode)
Set the global nvlink bandwith mode.
Structs#
- nvmlNvLinkInfo_v1_t
Struct to represent per device NVLINK information v1.
- nvmlNvLinkInfo_v2_t
Struct to represent per device NVLINK information v2.
- nvmlNvlinkFirmwareInfo_t
Struct to represent NVLINK firmware information.
- nvmlNvlinkFirmwareVersion_t
Struct to represent NVLINK firmware Semantic versioning and ucode type.
- nvmlNvlinkGetBwMode_v1_t
- nvmlNvlinkSetBwModeAsync_v1_t
Describes the parameters involved to setting Nvlink RBM mode asynchronously.
- nvmlNvlinkSetBwMode_v1_t
- nvmlNvlinkSupportedBwModes_v1_t
- nvmlNvlinkTelemetrySample_v1_t
Struct representing one (link, metric) telemetry request / response slot.
- nvmlNvlinkTelemetrySamples_v1_t
Batched NVLink telemetry request.
Typedefs#
Macros#
-
NVML_NVLINK_BER_EXP_SHIFT#
Shift for NVLink BER exponent.
-
NVML_NVLINK_BER_EXP_WIDTH#
Width for NVLink BER exponent.
-
NVML_NVLINK_BER_MANTISSA_SHIFT#
Shift for NVLink BER mantissa.
-
NVML_NVLINK_BER_MANTISSA_WIDTH#
Width for NVLink BER mantissa.
-
NVML_NVLINK_ERROR_COUNTER_BER_GET(var, type)#
Nvlink Error counter BER can be obtained using the below macros Ex - NVML_NVLINK_ERROR_COUNTER_BER_GET(var, BER_MANTISSA)
-
NVML_NVLINK_FIRMWARE_UCODE_TYPE_MSE#
MSE ucode type.
-
NVML_NVLINK_FIRMWARE_UCODE_TYPE_NETIR#
NETIR ucode type.
-
NVML_NVLINK_FIRMWARE_UCODE_TYPE_NETIR_CLN#
NETIR CLN ucode type.
-
NVML_NVLINK_FIRMWARE_UCODE_TYPE_NETIR_DLN#
NETIR DLN ucode type.
-
NVML_NVLINK_FIRMWARE_UCODE_TYPE_NETIR_UPHY#
NETIR UPHY ucode type.
-
NVML_NVLINK_FIRMWARE_VERSION_LENGTH#
Length of firmware version string.
-
NVML_NVLINK_STATE_ACTIVE#
NVLink is active.
-
NVML_NVLINK_STATE_ACTIVE_TRAFFIC_DISABLED#
NVLink is active, but not usable for traffic.
-
NVML_NVLINK_STATE_INACTIVE#
NVLink is inactive.
-
NVML_NVLINK_STATE_SLEEP#
NVLink is in sleep state.
-
NVML_NVLINK_TOTAL_SUPPORTED_BW_MODES#
Total supported NVLink bandwidth modes.
-
nvmlNvLinkInfo_v1#
Version macro for nvmlNvLinkInfo_v1_t.
-
nvmlNvLinkInfo_v2#
Version macro for nvmlNvLinkInfo_v2_t.
-
nvmlNvlinkGetBwMode_v1#
Version macro for nvmlNvlinkGetBwMode_v1_t.
-
nvmlNvlinkSetBwMode_v1#
Version macro for nvmlNvlinkSetBwMode_v1_t.
-
nvmlNvlinkSupportedBwModes_v1#
Version macro for nvmlNvlinkSupportedBwModes_v1_t.
Enumerations#
-
enum nvmlNvlinkTelemetrySampleType_t#
Per-link NVLink telemetry sample types.
Values:
-
enumerator NVML_NVLINK_TELEMETRY_SAMPLE_TYPE_THROUGHPUT_RAW_TX#
Raw TX flit counter for a single link.
-
enumerator NVML_NVLINK_TELEMETRY_SAMPLE_TYPE_THROUGHPUT_RAW_RX#
Raw RX flit counter for a single link.
-
enumerator NVML_NVLINK_TELEMETRY_SAMPLE_TYPE_COUNT#
Number of valid sample types.
-
enumerator NVML_NVLINK_TELEMETRY_SAMPLE_TYPE_THROUGHPUT_RAW_TX#
-
enum nvmlNvlinkVersion_t#
Represents Nvlink Version.
Values:
-
enumerator NVML_NVLINK_VERSION_INVALID#
NVLink version is invalid.
-
enumerator NVML_NVLINK_VERSION_1_0#
NVLink Version 1.0.
-
enumerator NVML_NVLINK_VERSION_2_0#
NVLink Version 2.0.
-
enumerator NVML_NVLINK_VERSION_2_2#
NVLink Version 2.2.
-
enumerator NVML_NVLINK_VERSION_3_0#
NVLink Version 3.0.
-
enumerator NVML_NVLINK_VERSION_3_1#
NVLink Version 3.1.
-
enumerator NVML_NVLINK_VERSION_4_0#
NVLink Version 4.0.
-
enumerator NVML_NVLINK_VERSION_5_0#
NVLink Version 5.0.
-
enumerator NVML_NVLINK_VERSION_6_0#
NVLink Version 6.0.
-
enumerator NVML_NVLINK_VERSION_INVALID#
Functions#
- nvmlReturn_t nvmlDeviceFreezeNvLinkUtilizationCounter(
- nvmlDevice_t device,
- unsigned int link,
- unsigned int counter,
- nvmlEnableState_t freeze,
- Deprecated:
Freezing NVLINK utilization counters is no longer supported.
Freeze the NVLINK utilization counters Both the receive and transmit counters are operated on by this function
For Pascal or newer fully supported devices.
- Parameters:
device – The identifier of the target device
link – Specifies the NvLink link to be queried
counter – Specifies the counter that should be frozen (0 or 1).
freeze – NVML_FEATURE_ENABLED = freeze the receive and transmit counters NVML_FEATURE_DISABLED = unfreeze the receive and transmit counters
- Returns:
NVML_SUCCESS if counters were successfully frozen or unfrozen
NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
NVML_ERROR_INVALID_ARGUMENT if device, link, counter, or freeze is invalid
NVML_ERROR_NOT_SUPPORTED if the device doesn’t support this feature
NVML_ERROR_UNKNOWN on any unexpected error
- nvmlReturn_t nvmlDeviceGetNvLinkCapability(
- nvmlDevice_t device,
- unsigned int link,
- nvmlNvLinkCapability_t capability,
- unsigned int *capResult,
Retrieves the requested capability from the device’s NvLink for the link specified Please refer to the nvmlNvLinkCapability_t structure for the specific caps that can be queried The return value should be treated as a boolean.
For Pascal or newer fully supported devices.
- Parameters:
device – The identifier of the target device
link – Specifies the NvLink link to be queried
capability – Specifies the nvmlNvLinkCapability_t to be queried
capResult – A boolean for the queried capability indicating that feature is available
- Returns:
NVML_SUCCESS if capResult has been set
NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
NVML_ERROR_INVALID_ARGUMENT if device, link, or capability is invalid or capResult is NULL
NVML_ERROR_NOT_SUPPORTED if the device doesn’t support this feature
NVML_ERROR_UNKNOWN on any unexpected error
- nvmlReturn_t nvmlDeviceGetNvLinkErrorCounter(
- nvmlDevice_t device,
- unsigned int link,
- nvmlNvLinkErrorCounter_t counter,
- unsigned long long *counterValue,
Retrieves the specified error counter value Please refer to nvmlNvLinkErrorCounter_t for error counters that are available.
For Pascal or newer fully supported devices.
- Parameters:
device – The identifier of the target device
link – Specifies the NvLink link to be queried
counter – Specifies the NvLink counter to be queried
counterValue – Returned counter value
- Returns:
NVML_SUCCESS if counter has been set
NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
NVML_ERROR_INVALID_ARGUMENT if device, link, or counter is invalid or counterValue is NULL
NVML_ERROR_NOT_SUPPORTED if the device doesn’t support this feature
NVML_ERROR_UNKNOWN on any unexpected error
- nvmlReturn_t nvmlDeviceGetNvLinkInfo(
- nvmlDevice_t device,
- nvmlNvLinkInfo_t *info,
Query NVLINK information associated with this device.
- Parameters:
device – [in] The identifier of the target device
info – [out] Reference to nvmlNvLinkInfo_t
- Returns:
NVML_SUCCESS if query is success
NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
NVML_ERROR_INVALID_ARGUMENT if device is invalid, or info is NULL
NVML_ERROR_ARGUMENT_VERSION_MISMATCH if the version is invalid/unsupported
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_UNKNOWN on any unexpected error
- nvmlReturn_t nvmlDeviceGetNvLinkRemoteDeviceType(
- nvmlDevice_t device,
- unsigned int link,
- nvmlIntNvLinkDeviceType_t *pNvLinkDeviceType,
Get the NVLink device type of the remote device connected over the given link.
- Parameters:
device – The device handle of the target GPU
link – The NVLink link index on the target GPU
pNvLinkDeviceType – Pointer in which the output remote device type is returned
- Returns:
NVML_SUCCESS if pNvLinkDeviceType has been set
NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
NVML_ERROR_NOT_SUPPORTED if NVLink is not supported
NVML_ERROR_INVALID_ARGUMENT if device or link is invalid, or pNvLinkDeviceType is NULL
NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible
NVML_ERROR_UNKNOWN on any unexpected error
- nvmlReturn_t nvmlDeviceGetNvLinkRemotePciInfo_v2(
- nvmlDevice_t device,
- unsigned int link,
- nvmlPciInfo_t *pci,
Retrieves the PCI information for the remote node on a NvLink link Note: pciSubSystemId is not filled in this function and is indeterminate.
For Pascal or newer fully supported devices.
- Parameters:
device – The identifier of the target device
link – Specifies the NvLink link to be queried
pci – nvmlPciInfo_t of the remote node for the specified link
- Returns:
NVML_SUCCESS if pci has been set
NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
NVML_ERROR_INVALID_ARGUMENT if device or link is invalid or pci is NULL
NVML_ERROR_NOT_SUPPORTED if the device doesn’t support this feature
NVML_ERROR_UNKNOWN on any unexpected error
- nvmlReturn_t nvmlDeviceGetNvLinkState(
- nvmlDevice_t device,
- unsigned int link,
- nvmlEnableState_t *isActive,
Retrieves the state of the device’s NvLink for the link specified.
For Pascal or newer fully supported devices.
- Parameters:
device – The identifier of the target device
link – Specifies the NvLink link to be queried
isActive – nvmlEnableState_t where NVML_FEATURE_ENABLED indicates that the link is active and NVML_FEATURE_DISABLED indicates it is inactive
- Returns:
NVML_SUCCESS if isActive has been set
NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
NVML_ERROR_INVALID_ARGUMENT if device or link is invalid or isActive is NULL
NVML_ERROR_NOT_SUPPORTED if the device doesn’t support this feature
NVML_ERROR_UNKNOWN on any unexpected error
- nvmlReturn_t nvmlDeviceGetNvLinkTelemetrySamples_v1(
- nvmlDevice_t device,
- nvmlNvlinkTelemetrySamples_v1_t *samples,
Retrieve a batch of historical NVLink per-link telemetry samples.
Samples are taken at approximately 100 ms intervals. Intended for use with periodic polling every ~2 seconds. Longer polling intervals are possible, but can result in dropped samples if the supported
sampleCountis too low for the given polling interval.RUBIN_OR_NEWER%
- Parameters:
device – [in] The device handle of the GPU to retrieve samples for
samples – [inout] Request/response batch (see nvmlNvlinkTelemetrySamples_v1_t)
- Returns:
NVML_SUCCESS If the call succeeded.
NVML_ERROR_INVALID_ARGUMENT If any required pointer is NULL, a given enum value is out of range, a slot’s
linkIdis out of range, a slot’ssampleCountis non-zero with a NULLsamplespointer, or a slot’ssampleCountis greater than the supportedsampleCountfor the given link.NVML_ERROR_GPU_IS_LOST If the target GPU has fallen off the bus or is otherwise inaccessible.
NVML_ERROR_NOT_SUPPORTED If the given device does not support this API.
NVML_ERROR_UNKNOWN On any unexpected error.
- nvmlReturn_t nvmlDeviceGetNvLinkUtilizationControl(
- nvmlDevice_t device,
- unsigned int link,
- unsigned int counter,
- nvmlNvLinkUtilizationControl_t *control,
- Deprecated:
Getting utilization counter control is no longer supported.
Get the NVLINK utilization counter control information for the specified counter, 0 or 1. Please refer to nvmlNvLinkUtilizationControl_t for the structure definition
For Pascal or newer fully supported devices.
- Parameters:
device – The identifier of the target device
counter – Specifies the counter that should be set (0 or 1).
link – Specifies the NvLink link to be queried
control – A reference to the nvmlNvLinkUtilizationControl_t to place information
- Returns:
NVML_SUCCESS if the control has been set successfully
NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
NVML_ERROR_INVALID_ARGUMENT if device, counter, link, or control is invalid
NVML_ERROR_NOT_SUPPORTED if the device doesn’t support this feature
NVML_ERROR_UNKNOWN on any unexpected error
- nvmlReturn_t nvmlDeviceGetNvLinkUtilizationCounter(
- nvmlDevice_t device,
- unsigned int link,
- unsigned int counter,
- unsigned long long *rxcounter,
- unsigned long long *txcounter,
- Deprecated:
Use nvmlDeviceGetFieldValues with NVML_FI_DEV_NVLINK_THROUGHPUT_* as field values instead.
Retrieve the NVLINK utilization counter based on the current control for a specified counter. In general it is good practice to use nvmlDeviceSetNvLinkUtilizationControl before reading the utilization counters as they have no default state
For Pascal or newer fully supported devices.
- Parameters:
device – The identifier of the target device
link – Specifies the NvLink link to be queried
counter – Specifies the counter that should be read (0 or 1).
rxcounter – Receive counter return value
txcounter – Transmit counter return value
- Returns:
NVML_SUCCESS if rxcounter and txcounter have been successfully set
NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
NVML_ERROR_INVALID_ARGUMENT if device, counter, or link is invalid or rxcounter or txcounter are NULL
NVML_ERROR_NOT_SUPPORTED if the device doesn’t support this feature
NVML_ERROR_UNKNOWN on any unexpected error
- nvmlReturn_t nvmlDeviceGetNvLinkVersion(
- nvmlDevice_t device,
- unsigned int link,
- unsigned int *version,
Retrieves the version of the device’s NvLink for the link specified.
For Pascal or newer fully supported devices.
- Parameters:
device – The identifier of the target device
link – Specifies the NvLink link to be queried
version – Requested NvLink version from nvmlNvlinkVersion_t
- Returns:
NVML_SUCCESS if version has been set
NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
NVML_ERROR_INVALID_ARGUMENT if device or link is invalid or version is NULL
NVML_ERROR_NOT_SUPPORTED if the device doesn’t support this feature
NVML_ERROR_UNKNOWN on any unexpected error
- nvmlReturn_t nvmlDeviceGetNvlinkBwMode(
- nvmlDevice_t device,
- nvmlNvlinkGetBwMode_t *getBwMode,
Get the NvLink Reduced Bandwidth Mode for the device.
For Blackwell or newer fully supported devices.
- Parameters:
device – The identifier of the target device
getBwMode – Reference to nvmlNvlinkGetBwMode_t
- Returns:
NVML_SUCCESS if the query was successful
NVML_ERROR_INVALID_ARGUMENT if device is invalid or getBwMode is NULL
NVML_ERROR_NOT_SUPPORTED if this feature is not supported by the device
NVML_ERROR_ARGUMENT_VERSION_MISMATCH if the version specified is not supported
- nvmlReturn_t nvmlDeviceGetNvlinkSupportedBwModes(
- nvmlDevice_t device,
- nvmlNvlinkSupportedBwModes_t *supportedBwMode,
Get the supported NvLink Reduced Bandwidth Modes of the device.
For Blackwell or newer fully supported devices.
- Parameters:
device – The identifier of the target device
supportedBwMode – Reference to nvmlNvlinkSupportedBwModes_t
- Returns:
NVML_SUCCESS if the query was successful
NVML_ERROR_INVALID_ARGUMENT if device is invalid or supportedBwMode is NULL
NVML_ERROR_NOT_SUPPORTED if this feature is not supported by the device
NVML_ERROR_ARGUMENT_VERSION_MISMATCH if the version specified is not supported
- nvmlReturn_t nvmlDeviceResetNvLinkErrorCounters(
- nvmlDevice_t device,
- unsigned int link,
Resets all error counters to zero Please refer to nvmlNvLinkErrorCounter_t for the list of error counters that are reset.
For Pascal or newer fully supported devices.
- Parameters:
device – The identifier of the target device
link – Specifies the NvLink link to be queried
- Returns:
NVML_SUCCESS if the reset is successful
NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
NVML_ERROR_INVALID_ARGUMENT if device or link is invalid
NVML_ERROR_NOT_SUPPORTED if the device doesn’t support this feature
NVML_ERROR_UNKNOWN on any unexpected error
- nvmlReturn_t nvmlDeviceResetNvLinkUtilizationCounter(
- nvmlDevice_t device,
- unsigned int link,
- unsigned int counter,
- Deprecated:
Resetting NVLINK utilization counters is no longer supported.
Reset the NVLINK utilization counters Both the receive and transmit counters are operated on by this function
For Pascal or newer fully supported devices.
- Parameters:
device – The identifier of the target device
link – Specifies the NvLink link to be reset
counter – Specifies the counter that should be reset (0 or 1)
- Returns:
NVML_SUCCESS if counters were successfully reset
NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
NVML_ERROR_INVALID_ARGUMENT if device, link, or counter is invalid
NVML_ERROR_NOT_SUPPORTED if the device doesn’t support this feature
NVML_ERROR_UNKNOWN on any unexpected error
- nvmlReturn_t nvmlDeviceSetNvLinkDeviceLowPowerThreshold(
- nvmlDevice_t device,
- nvmlNvLinkPowerThres_t *info,
Set NvLink Low Power Threshold for device.
For Hopper or newer fully supported devices.
- Parameters:
device – The identifier of the target device
info – Reference to nvmlNvLinkPowerThres_t struct input parameters
- Returns:
NVML_SUCCESS if the Threshold is successfully set
NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
NVML_ERROR_INVALID_ARGUMENT if device is invalid or Threshold is not within range
NVML_ERROR_NOT_READY if an internal driver setting prevents the threshold from being used
NVML_ERROR_NOT_SUPPORTED if this query is not supported by the device
- nvmlReturn_t nvmlDeviceSetNvLinkUtilizationControl(
- nvmlDevice_t device,
- unsigned int link,
- unsigned int counter,
- nvmlNvLinkUtilizationControl_t *control,
- unsigned int reset,
- Deprecated:
Setting utilization counter control is no longer supported.
Set the NVLINK utilization counter control information for the specified counter, 0 or 1. Please refer to nvmlNvLinkUtilizationControl_t for the structure definition. Performs a reset of the counters if the reset parameter is non-zero.
For Pascal or newer fully supported devices.
- Parameters:
device – The identifier of the target device
counter – Specifies the counter that should be set (0 or 1).
link – Specifies the NvLink link to be queried
control – A reference to the nvmlNvLinkUtilizationControl_t to set
reset – Resets the counters on set if non-zero
- Returns:
NVML_SUCCESS if the control has been set successfully
NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
NVML_ERROR_INVALID_ARGUMENT if device, counter, link, or control is invalid
NVML_ERROR_NOT_SUPPORTED if the device doesn’t support this feature
NVML_ERROR_UNKNOWN on any unexpected error
- nvmlReturn_t nvmlDeviceSetNvlinkBwMode(
- nvmlDevice_t device,
- nvmlNvlinkSetBwMode_t *setBwMode,
Set the NvLink Reduced Bandwidth Mode for the device.
For Blackwell or newer fully supported devices.
- Parameters:
device – The identifier of the target device
setBwMode – Reference to nvmlNvlinkSetBwMode_t
- Returns:
NVML_SUCCESS if the Bandwidth mode was successfully set
NVML_ERROR_INVALID_ARGUMENT if device is invalid or setBwMode is NULL
NVML_ERROR_NO_PERMISSION if user does not have permission to change Bandwidth mode
NVML_ERROR_NOT_SUPPORTED if this feature is not supported by the device
NVML_ERROR_ARGUMENT_VERSION_MISMATCH if the version specified is not supported
- nvmlReturn_t nvmlDeviceSetNvlinkBwModeAsync_v1(
- nvmlDevice_t device,
- nvmlNvlinkSetBwModeAsync_v1_t *setBwModeAsync,
Set the NvLink Reduced Bandwidth Mode asynchronously for the device.
Polling should be done by checking for NVML_GPU_FABRIC_STATE_COMPLETED from nvmlDeviceGetGpuFabricInfoV().
RUBIN_OR_NEWER%
See also
- Parameters:
device – [in] The identifier of the target device
setBwModeAsync – [inout] Reference to nvmlNvlinkSetBwModeAsync_v1_t
- Returns:
NVML_SUCCESS if the Bandwidth mode was successfully set
NVML_ERROR_INVALID_ARGUMENT if device or
setBwModeAsyncis invalidNVML_ERROR_NO_PERMISSION if user does not have permission to change Bandwidth mode
NVML_ERROR_NOT_SUPPORTED if this feature is not supported by the device
-
nvmlReturn_t nvmlSystemGetNvlinkBwMode(unsigned int *nvlinkBwMode)#
Get the global nvlink bandwith mode.
- Parameters:
nvlinkBwMode – reference of nvlink bandwidth mode
- Returns:
NVML_SUCCESS on success
NVML_ERROR_INVALID_ARGUMENT if an invalid pointer is provided
NVML_ERROR_NOT_SUPPORTED if GPU is not Hopper or newer architecture.
NVML_ERROR_NO_PERMISSION if not root user
-
nvmlReturn_t nvmlSystemSetNvlinkBwMode(unsigned int nvlinkBwMode)#
Set the global nvlink bandwith mode.
- Parameters:
nvlinkBwMode – nvlink bandwidth mode
- Returns:
NVML_SUCCESS on success
NVML_ERROR_INVALID_ARGUMENT if an invalid argument is provided
NVML_ERROR_IN_USE if P2P object exists
NVML_ERROR_NOT_SUPPORTED if GPU is not Hopper or newer architecture.
NVML_ERROR_NO_PERMISSION if not root user
Typedefs#
-
typedef nvmlNvLinkInfo_v2_t nvmlNvLinkInfo_t#
-
typedef nvmlNvlinkGetBwMode_v1_t nvmlNvlinkGetBwMode_t#
-
typedef nvmlNvlinkSetBwMode_v1_t nvmlNvlinkSetBwMode_t#
-
typedef nvmlNvlinkSupportedBwModes_v1_t nvmlNvlinkSupportedBwModes_t#