Power Control#
Power Control
Functions | |
amdsmi_status_t | amdsmi_dev_set_power_cap (amdsmi_device_handle device_handle, uint32_t sensor_ind, uint64_t cap) |
Set the maximum gpu power cap value. More... | |
amdsmi_status_t | amdsmi_dev_set_power_profile (amdsmi_device_handle device_handle, uint32_t reserved, amdsmi_power_profile_preset_masks_t profile) |
Set the power performance profile. More... | |
Detailed Description
These functions provide ways to control power usage.
Function Documentation
◆ amdsmi_dev_set_power_cap()
amdsmi_status_t amdsmi_dev_set_power_cap | ( | amdsmi_device_handle | device_handle, |
uint32_t | sensor_ind, | ||
uint64_t | cap | ||
) |
Set the maximum gpu power cap value.
This function will set the power cap to the provided value cap
. cap
must be between the minimum and maximum power cap values set by the system, which can be obtained from ::amdsmi_dev_power_cap_range_get.
- Parameters
-
[in] device_handle a device handle [in] sensor_ind a 0-based sensor index. Normally, this will be 0. If a device has more than one sensor, it could be greater than 0. [in] cap a uint64_t that indicates the desired power cap, in microwatts
- Returns
- amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail
◆ amdsmi_dev_set_power_profile()
amdsmi_status_t amdsmi_dev_set_power_profile | ( | amdsmi_device_handle | device_handle, |
uint32_t | reserved, | ||
amdsmi_power_profile_preset_masks_t | profile | ||
) |
Set the power performance profile.
This function will attempt to set the current profile to the provided profile, given a device handle device_handle
and a profile
. The provided profile must be one of the currently supported profiles, as indicated by a call to :: amdsmi_dev_get_power_profile_presets()
- Parameters
-
[in] device_handle a device handle [in] reserved Not currently used. Set to 0. [in] profile a amdsmi_power_profile_preset_masks_t that hold the mask of the desired new power profile
- Returns
- amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail