Power Control

Power Control#

AMD SMI: Power Control
Power Control

Functions

amdsmi_status_t amdsmi_set_power_cap (amdsmi_processor_handle processor_handle, uint32_t sensor_ind, uint64_t cap)
 Set the maximum gpu power cap value. It is not supported on virtual machine guest. More...
 
amdsmi_status_t amdsmi_set_gpu_power_profile (amdsmi_processor_handle processor_handle, uint32_t reserved, amdsmi_power_profile_preset_masks_t profile)
 Set the power performance profile. It is not supported on virtual machine guest. More...
 

Detailed Description

These functions provide ways to control power usage.

Function Documentation

◆ amdsmi_set_power_cap()

amdsmi_status_t amdsmi_set_power_cap ( amdsmi_processor_handle  processor_handle,
uint32_t  sensor_ind,
uint64_t  cap 
)

Set the maximum gpu power cap value. It is not supported on virtual machine guest.

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]processor_handlea processor handle
[in]sensor_inda 0-based sensor index. Normally, this will be 0. If a processor has more than one sensor, it could be greater than 0.
[in]capa uint64_t that indicates the desired power cap, in microwatts
Returns
amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail

◆ amdsmi_set_gpu_power_profile()

amdsmi_status_t amdsmi_set_gpu_power_profile ( amdsmi_processor_handle  processor_handle,
uint32_t  reserved,
amdsmi_power_profile_preset_masks_t  profile 
)

Set the power performance profile. It is not supported on virtual machine guest.

This function will attempt to set the current profile to the provided profile, given a processor handle processor_handle and a profile. The provided profile must be one of the currently supported profiles, as indicated by a call to :: amdsmi_get_gpu_power_profile_presets()

Parameters
[in]processor_handlea processor handle
[in]reservedNot currently used. Set to 0.
[in]profilea 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