Clock, Power and Performance Control

Clock, Power and Performance Control#

AMD SMI: Clock, Power and Performance Control
Clock, Power and Performance Control

Functions

amdsmi_status_t amdsmi_set_gpu_perf_level (amdsmi_processor_handle processor_handle, amdsmi_dev_perf_level_t perf_lvl)
 Set the PowerPlay performance level associated with the device with provided processor handle with the provided value. It is not supported on virtual machine guest. More...
 
amdsmi_status_t amdsmi_set_gpu_overdrive_level (amdsmi_processor_handle processor_handle, uint32_t od)
 Set the overdrive percent associated with the device with provided processor handle with the provided value. See details for WARNING. It is not supported on virtual machine guest. More...
 
amdsmi_status_t amdsmi_set_clk_freq (amdsmi_processor_handle processor_handle, amdsmi_clk_type_t clk_type, uint64_t freq_bitmask)
 Control the set of allowed frequencies that can be used for the specified clock. It is not supported on virtual machine guest. More...
 
amdsmi_status_t amdsmi_get_dpm_policy (amdsmi_processor_handle processor_handle, amdsmi_dpm_policy_t *policy)
 Get the dpm policy for the processor. More...
 
amdsmi_status_t amdsmi_set_dpm_policy (amdsmi_processor_handle processor_handle, uint32_t policy_id)
 Set the dpm policy for the processor. More...
 
amdsmi_status_t amdsmi_get_xgmi_plpd (amdsmi_processor_handle processor_handle, amdsmi_dpm_policy_t *xgmi_plpd)
 Get the xgmi per-link power down policy parameter for the processor. More...
 
amdsmi_status_t amdsmi_set_xgmi_plpd (amdsmi_processor_handle processor_handle, uint32_t plpd_id)
 Set the xgmi per-link power down policy parameter for the processor. More...
 
amdsmi_status_t amdsmi_get_gpu_process_isolation (amdsmi_processor_handle processor_handle, uint32_t *pisolate)
 Get the status of the Process Isolation. More...
 
amdsmi_status_t amdsmi_set_gpu_process_isolation (amdsmi_processor_handle processor_handle, uint32_t pisolate)
 Enable/disable the system Process Isolation. More...
 
amdsmi_status_t amdsmi_set_gpu_clear_sram_data (amdsmi_processor_handle processor_handle, uint32_t sclean)
 Clear the GPU SRAM data. More...
 

Detailed Description

These functions provide control over clock frequencies, power and performance.

Function Documentation

◆ amdsmi_set_gpu_perf_level()

amdsmi_status_t amdsmi_set_gpu_perf_level ( amdsmi_processor_handle  processor_handle,
amdsmi_dev_perf_level_t  perf_lvl 
)

Set the PowerPlay performance level associated with the device with provided processor handle with the provided value. It is not supported on virtual machine guest.

Platform:
gpu_bm_linux

Given a processor handle processor_handle and an amdsmi_dev_perf_level_t perf_level, this function will set the PowerPlay performance level for the device to the value perf_lvl.

Note
This function requires root access
Parameters
[in]processor_handlea processor handle
[in]perf_lvlthe value to which the performance level should be set
Returns
amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail

◆ amdsmi_set_gpu_overdrive_level()

amdsmi_status_t amdsmi_set_gpu_overdrive_level ( amdsmi_processor_handle  processor_handle,
uint32_t  od 
)

Set the overdrive percent associated with the device with provided processor handle with the provided value. See details for WARNING. It is not supported on virtual machine guest.

Platform:
gpu_bm_linux

Given a processor handle processor_handle and an overdrive level od, this function will set the overdrive level for the device to the value od. The overdrive level is an integer value between 0 and 20, inclusive, which represents the overdrive percentage; e.g., a value of 5 specifies an overclocking of 5%.

The overdrive level is specific to the gpu system clock.

The overdrive level is the percentage above the maximum Performance Level to which overclocking will be limited. The overclocking percentage does not apply to clock speeds other than the maximum. This percentage is limited to 20%.

******WARNING****** Operating your AMD GPU outside of official AMD specifications or outside of factory settings, including but not limited to the conducting of overclocking (including use of this overclocking software, even if such software has been directly or indirectly provided by AMD or otherwise affiliated in any way with AMD), may cause damage to your AMD GPU, system components and/or result in system failure, as well as cause other problems. DAMAGES CAUSED BY USE OF YOUR AMD GPU OUTSIDE OF OFFICIAL AMD SPECIFICATIONS OR OUTSIDE OF FACTORY SETTINGS ARE NOT COVERED UNDER ANY AMD PRODUCT WARRANTY AND MAY NOT BE COVERED BY YOUR BOARD OR SYSTEM MANUFACTURER'S WARRANTY. Please use this utility with caution.

Parameters
[in]processor_handlea processor handle
[in]odthe value to which the overdrive level should be set
Returns
amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail

◆ amdsmi_set_clk_freq()

amdsmi_status_t amdsmi_set_clk_freq ( amdsmi_processor_handle  processor_handle,
amdsmi_clk_type_t  clk_type,
uint64_t  freq_bitmask 
)

Control the set of allowed frequencies that can be used for the specified clock. It is not supported on virtual machine guest.

Platform:
gpu_bm_linux

Given a processor handle processor_handle, a clock type clk_type, and a 64 bit bitmask freq_bitmask, this function will limit the set of allowable frequencies. If a bit in freq_bitmask has a value of 1, then the frequency (as ordered in an amdsmi_frequencies_t returned by amdsmi_get_clk_freq()) corresponding to that bit index will be allowed.

This function will change the performance level to AMDSMI_DEV_PERF_LEVEL_MANUAL in order to modify the set of allowable frequencies. Caller will need to set to AMDSMI_DEV_PERF_LEVEL_AUTO in order to get back to default state.

All bits with indices greater than or equal to amdsmi_frequencies_t::num_supported will be ignored.

Note
This function requires root access
Parameters
[in]processor_handlea processor handle
[in]clk_typethe type of clock for which the set of frequencies will be modified
[in]freq_bitmaskA bitmask indicating the indices of the frequencies that are to be enabled (1) and disabled (0). Only the lowest amdsmi_frequencies_t.num_supported bits of this mask are relevant.
Returns
amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail

◆ amdsmi_get_dpm_policy()

amdsmi_status_t amdsmi_get_dpm_policy ( amdsmi_processor_handle  processor_handle,
amdsmi_dpm_policy_t policy 
)

Get the dpm policy for the processor.

Platform:

gpu_bm_linux

guest_1vf

Given a processor handle processor_handle, this function will write current dpm policy settings to policy. All the processors at the same socket will have the same policy.

Parameters
[in]processor_handlea processor handle
[in,out]policythe dpm policy for this processor. If this parameter is nullptr, this function will return AMDSMI_STATUS_INVAL
Returns
amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail

◆ amdsmi_set_dpm_policy()

amdsmi_status_t amdsmi_set_dpm_policy ( amdsmi_processor_handle  processor_handle,
uint32_t  policy_id 
)

Set the dpm policy for the processor.

Platform:

gpu_bm_linux

guest_1vf

Given a processor handle processor_handle and a dpm policy policy_id, this function will set the dpm policy for this processor. All the processors at the same socket will be set to the same policy.

Note
This function requires root access
Parameters
[in]processor_handlea processor handle
[in]policy_idthe dpm policy id to set. The id is the id in amdsmi_dpm_policy_entry_t, which can be obtained by calling amdsmi_get_dpm_policy()
Returns
amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail

◆ amdsmi_get_xgmi_plpd()

amdsmi_status_t amdsmi_get_xgmi_plpd ( amdsmi_processor_handle  processor_handle,
amdsmi_dpm_policy_t xgmi_plpd 
)

Get the xgmi per-link power down policy parameter for the processor.

Platform:
gpu_bm_linux

Given a processor handle processor_handle, this function will write current xgmi plpd settings to policy. All the processors at the same socket will have the same policy.

Parameters
[in]processor_handlea processor handle
[in,out]policythe xgmi plpd for this processor. If this parameter is nullptr, this function will return AMDSMI_STATUS_INVAL
Returns
amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail

◆ amdsmi_set_xgmi_plpd()

amdsmi_status_t amdsmi_set_xgmi_plpd ( amdsmi_processor_handle  processor_handle,
uint32_t  plpd_id 
)

Set the xgmi per-link power down policy parameter for the processor.

Platform:
gpu_bm_linux

Given a processor handle processor_handle and a dpm policy plpd_id, this function will set the xgmi plpd for this processor. All the processors at the same socket will be set to the same policy.

Note
This function requires root access
Parameters
[in]processor_handlea processor handle
[in]xgmi_plpd_idthe xgmi plpd id to set. The id is the id in amdsmi_dpm_policy_entry_t, which can be obtained by calling amdsmi_get_xgmi_plpd()
Returns
amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail

◆ amdsmi_get_gpu_process_isolation()

amdsmi_status_t amdsmi_get_gpu_process_isolation ( amdsmi_processor_handle  processor_handle,
uint32_t *  pisolate 
)

Get the status of the Process Isolation.

Platform:

gpu_bm_linux

guest_1vf

Given a processor handle processor_handle, this function will write current process isolation status to pisolate. The 0 is the process isolation disabled, and the 1 is the process isolation enabled.

Parameters
[in]processor_handlea processor handle
[in,out]pisolatethe process isolation status. If this parameter is nullptr, this function will return AMDSMI_STATUS_INVAL
Returns
amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail

◆ amdsmi_set_gpu_process_isolation()

amdsmi_status_t amdsmi_set_gpu_process_isolation ( amdsmi_processor_handle  processor_handle,
uint32_t  pisolate 
)

Enable/disable the system Process Isolation.

Platform:

gpu_bm_linux

guest_1vf

Given a processor handle processor_handle and a process isolation pisolate, flag, this function will set the Process Isolation for this processor. The 0 is the process isolation disabled, and the 1 is the process isolation enabled.

Note
This function requires root access
Parameters
[in]processor_handlea processor handle
[in]pisolatethe process isolation status to set.
Returns
amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail

◆ amdsmi_set_gpu_clear_sram_data()

amdsmi_status_t amdsmi_set_gpu_clear_sram_data ( amdsmi_processor_handle  processor_handle,
uint32_t  sclean 
)

Clear the GPU SRAM data.

Platform:

gpu_bm_linux

guest_1vf

Given a processor handle processor_handle, and a sclean flag sclean, this function will clear the SRAM data of this processor. This can be called between user logins to prevent information leak.

Note
This function requires root access
Parameters
[in]processor_handlea processor handle
[in]scleanthe clean flag. Only 1 will take effect and other number are reserved for future usage.
Returns
amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail