[][src]Function nvml_binding::bindings::nvmlDeviceSetPowerManagementLimit

pub unsafe extern "C" fn nvmlDeviceSetPowerManagementLimit(
    device: nvmlDevice_t,
    limit: c_uint
) -> nvmlReturn_t

Set new power limit of this device.

For Kepler &tm; or newer fully supported devices. Requires root/admin permissions.

See \ref nvmlDeviceGetPowerManagementLimitConstraints to check the allowed ranges of values.

\note Limit is not persistent across reboots or driver unloads. Enable persistent mode to prevent driver from unloading when no application is using the device.

@param device The identifier of the target device @param limit Power management limit in milliwatts to set

@return - \ref NVML_SUCCESS if \a limit has been set - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a defaultLimit is out of range - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible - \ref NVML_ERROR_UNKNOWN on any unexpected error

@see nvmlDeviceGetPowerManagementLimitConstraints @see nvmlDeviceGetPowerManagementDefaultLimit