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. | |
| 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. | |
| amdsmi_status_t | amdsmi_get_cpu_socket_power (amdsmi_processor_handle processor_handle, uint32_t *ppower) |
| Get the socket power. | |
| amdsmi_status_t | amdsmi_get_cpu_socket_power_cap (amdsmi_processor_handle processor_handle, uint32_t *pcap) |
| Get the socket power cap. | |
| amdsmi_status_t | amdsmi_get_cpu_socket_power_cap_max (amdsmi_processor_handle processor_handle, uint32_t *pmax) |
| Get the maximum power cap value for a given socket. | |
| amdsmi_status_t | amdsmi_get_cpu_pwr_svi_telemetry_all_rails (amdsmi_processor_handle processor_handle, uint32_t *power) |
| Get the SVI based power telemetry for all rails. | |
| amdsmi_status_t | amdsmi_set_cpu_socket_power_cap (amdsmi_processor_handle processor_handle, uint32_t pcap) |
| Set the power cap value for a given socket. | |
| amdsmi_status_t | amdsmi_set_cpu_pwr_efficiency_mode (amdsmi_processor_handle processor_handle, uint8_t mode) |
| Set the power efficiency profile policy. | |
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.
- Platform:
host
gpu_bm_linux
guest_1vf
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_handle A processor handle [in] sensor_ind a 0-based sensor index. Normally, this will be 0. If a processor has more than one sensor, it could be greater than 0. [in] cap a uint64_t that indicates the desired power cap. The capvalue must be greater than 0.
- 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.
- Platform:
- gpu_bm_linux
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_handle a processor 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
◆ amdsmi_get_cpu_socket_power()
| amdsmi_status_t amdsmi_get_cpu_socket_power | ( | amdsmi_processor_handle | processor_handle, |
| uint32_t * | ppower | ||
| ) |
Get the socket power.
- Platform:
- cpu_bm
- Parameters
-
[in] processor_handle Cpu socket which to query [in,out] ppower - Input buffer to return socket power
- Returns
- amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail
◆ amdsmi_get_cpu_socket_power_cap()
| amdsmi_status_t amdsmi_get_cpu_socket_power_cap | ( | amdsmi_processor_handle | processor_handle, |
| uint32_t * | pcap | ||
| ) |
Get the socket power cap.
- Platform:
- cpu_bm
- Parameters
-
[in] processor_handle Cpu socket which to query [in,out] pcap - Input buffer to return power cap.
- Returns
- amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail
◆ amdsmi_get_cpu_socket_power_cap_max()
| amdsmi_status_t amdsmi_get_cpu_socket_power_cap_max | ( | amdsmi_processor_handle | processor_handle, |
| uint32_t * | pmax | ||
| ) |
Get the maximum power cap value for a given socket.
- Platform:
- cpu_bm
- Parameters
-
[in] processor_handle Cpu socket which to query [in,out] pmax - Input buffer to return maximum power limit value
- Returns
- amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail
◆ amdsmi_get_cpu_pwr_svi_telemetry_all_rails()
| amdsmi_status_t amdsmi_get_cpu_pwr_svi_telemetry_all_rails | ( | amdsmi_processor_handle | processor_handle, |
| uint32_t * | power | ||
| ) |
Get the SVI based power telemetry for all rails.
- Platform:
- cpu_bm
- Parameters
-
[in] processor_handle Cpu socket which to query [in,out] power - Input buffer to return svi based power value
- Returns
- amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail
◆ amdsmi_set_cpu_socket_power_cap()
| amdsmi_status_t amdsmi_set_cpu_socket_power_cap | ( | amdsmi_processor_handle | processor_handle, |
| uint32_t | pcap | ||
| ) |
Set the power cap value for a given socket.
- Platform:
- cpu_bm
- Parameters
-
[in] processor_handle Cpu socket which to query [in] pcap - Input power limit value
- Returns
- amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail
◆ amdsmi_set_cpu_pwr_efficiency_mode()
| amdsmi_status_t amdsmi_set_cpu_pwr_efficiency_mode | ( | amdsmi_processor_handle | processor_handle, |
| uint8_t | mode | ||
| ) |
Set the power efficiency profile policy.
- Platform:
- cpu_bm
- Parameters
-
[in] processor_handle Cpu socket which to query [in] mode - mode to be set
- Returns
- amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail