SWDEV-392359 - [AMDSMI] [Linux] [Guest] Documented unsupported APIs
Signed-off-by: Marko Oblak <Marko.Oblak@amd.com> Change-Id: I0cff925082e6bc637e4b5073df64445380b3a3f5
This commit is contained in:
@@ -492,21 +492,6 @@ int main() {
|
||||
: -1;
|
||||
};
|
||||
|
||||
// Get frequency ranges
|
||||
amdsmi_frequency_range_t freq_ranges = {};
|
||||
ret = amdsmi_get_gpu_target_frequency_range(
|
||||
processor_handles[j], CLK_TYPE_GFX, &freq_ranges);
|
||||
CHK_AMDSMI_RET(ret)
|
||||
printf(" Output of amdsmi_get_gpu_target_frequency_range:\n");
|
||||
printf("\tSupported min freq: %lu\n",
|
||||
freq_ranges.supported_freq_range.lower_bound);
|
||||
printf("\tSupported max freq: %lu\n",
|
||||
freq_ranges.supported_freq_range.upper_bound);
|
||||
printf("\tCurrent min freq: %lu\n",
|
||||
freq_ranges.current_freq_range.lower_bound);
|
||||
printf("\tCurrent max freq: %lu\n\n",
|
||||
freq_ranges.current_freq_range.upper_bound);
|
||||
|
||||
uint32_t num_process = 0;
|
||||
ret = amdsmi_get_gpu_process_list(processor_handles[j], &num_process,
|
||||
nullptr);
|
||||
|
||||
+76
-68
@@ -1407,7 +1407,8 @@ amdsmi_get_gpu_subsystem_name(amdsmi_processor_handle processor_handle, char *na
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Get the list of possible PCIe bandwidths that are available.
|
||||
* @brief Get the list of possible PCIe bandwidths that are available. It is not
|
||||
* supported on virtual machine guest
|
||||
*
|
||||
* @details Given a processor handle @p processor_handle and a pointer to a to an
|
||||
* ::amdsmi_pcie_bandwidth_t structure @p bandwidth, this function will fill in
|
||||
@@ -1481,7 +1482,7 @@ amdsmi_status_t amdsmi_get_gpu_bdf_id(amdsmi_processor_handle processor_handle,
|
||||
amdsmi_status_t amdsmi_get_gpu_topo_numa_affinity(amdsmi_processor_handle processor_handle, uint32_t *numa_node);
|
||||
|
||||
/**
|
||||
* @brief Get PCIe traffic information
|
||||
* @brief Get PCIe traffic information. It is not supported on virtual machine guest
|
||||
*
|
||||
* @details Give a processor handle @p processor_handle and pointers to a uint64_t's, @p
|
||||
* sent, @p received and @p max_pkt_sz, this function will write the number
|
||||
@@ -1536,7 +1537,8 @@ amdsmi_status_t amdsmi_get_gpu_pci_replay_counter(amdsmi_processor_handle proce
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Control the set of allowed PCIe bandwidths that can be used.
|
||||
* @brief Control the set of allowed PCIe bandwidths that can be used. It is not
|
||||
* supported on virtual machine guest
|
||||
*
|
||||
* @details Given a processor handle @p processor_handle and a 64 bit bitmask @p bw_bitmask,
|
||||
* this function will limit the set of allowable bandwidths. If a bit in @p
|
||||
@@ -1576,7 +1578,7 @@ amdsmi_status_t amdsmi_set_gpu_pci_bandwidth(amdsmi_processor_handle processor_
|
||||
|
||||
/**
|
||||
* @brief Get the energy accumulator counter of the processor with provided
|
||||
* processor handle.
|
||||
* processor handle. It is not supported on virtual machine guest
|
||||
*
|
||||
* @details Given a processor handle @p processor_handle, a pointer to a uint64_t
|
||||
* @p power, and a pointer to a uint64_t @p timestamp, this function will write
|
||||
@@ -1613,7 +1615,8 @@ amdsmi_get_energy_count(amdsmi_processor_handle processor_handle, uint64_t *powe
|
||||
* @{
|
||||
*/
|
||||
/**
|
||||
* @brief Set the maximum gpu power cap value
|
||||
* @brief Set the maximum gpu power cap value. It is not supported on virtual
|
||||
* machine guest
|
||||
*
|
||||
* @details This function will set the power cap to the provided value @p cap.
|
||||
* @p cap must be between the minimum and maximum power cap values set by the
|
||||
@@ -1633,7 +1636,7 @@ amdsmi_status_t
|
||||
amdsmi_set_power_cap(amdsmi_processor_handle processor_handle, uint32_t sensor_ind, uint64_t cap);
|
||||
|
||||
/**
|
||||
* @brief Set the power performance profile
|
||||
* @brief Set the power performance profile. It is not supported on virtual machine guest
|
||||
*
|
||||
* @details This function will attempt to set the current profile to the provided
|
||||
* profile, given a processor handle @p processor_handle and a @p profile. The provided
|
||||
@@ -1711,7 +1714,8 @@ amdsmi_get_gpu_memory_usage(amdsmi_processor_handle processor_handle, amdsmi_mem
|
||||
uint64_t *used);
|
||||
|
||||
/**
|
||||
* @brief Get the bad pages of a processor.
|
||||
* @brief Get the bad pages of a processor. It is not supported on virtual
|
||||
* machine guest
|
||||
* @details This call will query the device @p processor_handle for the
|
||||
* number of bad pages (written to @p num_pages address). The results are
|
||||
* written to address held by the @p info pointer.
|
||||
@@ -1729,7 +1733,8 @@ amdsmi_status_t
|
||||
amdsmi_get_gpu_bad_page_info(amdsmi_processor_handle processor_handle, uint32_t *num_pages, amdsmi_retired_page_record_t *info);
|
||||
|
||||
/**
|
||||
* @brief Returns if RAS features are enabled or disabled for given block
|
||||
* @brief Returns if RAS features are enabled or disabled for given block. It is not
|
||||
* supported on virtual machine guest
|
||||
*
|
||||
* @details Given a processor handle @p processor_handle, this function queries the
|
||||
* state of RAS features for a specific block @p block. Result will be written
|
||||
@@ -1753,7 +1758,8 @@ amdsmi_get_gpu_ras_block_features_enabled(amdsmi_processor_handle processor_hand
|
||||
amdsmi_ras_err_state_t *state);
|
||||
|
||||
/**
|
||||
* @brief Get information about reserved ("retired") memory pages
|
||||
* @brief Get information about reserved ("retired") memory pages. It is not supported on
|
||||
* virtual machine guest
|
||||
*
|
||||
* @details Given a processor handle @p processor_handle, this function returns retired page
|
||||
* information @p records corresponding to the device with the provided processor
|
||||
@@ -1796,7 +1802,7 @@ amdsmi_get_gpu_memory_reserved_pages(amdsmi_processor_handle processor_handle, u
|
||||
|
||||
/**
|
||||
* @brief Get the fan speed in RPMs of the device with the specified processor
|
||||
* handle and 0-based sensor index.
|
||||
* handle and 0-based sensor index. It is not supported on virtual machine guest
|
||||
*
|
||||
* @details Given a processor handle @p processor_handle and a pointer to a uint32_t
|
||||
* @p speed, this function will write the current fan speed in RPMs to the
|
||||
@@ -1821,7 +1827,7 @@ amdsmi_status_t amdsmi_get_gpu_fan_rpms(amdsmi_processor_handle processor_handle
|
||||
|
||||
/**
|
||||
* @brief Get the fan speed for the specified device as a value relative to
|
||||
* ::AMDSMI_MAX_FAN_SPEED
|
||||
* ::AMDSMI_MAX_FAN_SPEED. It is not supported on virtual machine guest
|
||||
*
|
||||
* @details Given a processor handle @p processor_handle and a pointer to a uint32_t
|
||||
* @p speed, this function will write the current fan speed (a value
|
||||
@@ -1846,7 +1852,8 @@ amdsmi_status_t amdsmi_get_gpu_fan_speed(amdsmi_processor_handle processor_handl
|
||||
uint32_t sensor_ind, int64_t *speed);
|
||||
|
||||
/**
|
||||
* @brief Get the max. fan speed of the device with provided processor handle.
|
||||
* @brief Get the max. fan speed of the device with provided processor handle. It is
|
||||
* not supported on virtual machine guest
|
||||
*
|
||||
* @details Given a processor handle @p processor_handle and a pointer to a uint32_t
|
||||
* @p max_speed, this function will write the maximum fan speed possible to
|
||||
@@ -1871,7 +1878,8 @@ amdsmi_status_t amdsmi_get_gpu_fan_speed_max(amdsmi_processor_handle processor_h
|
||||
|
||||
/**
|
||||
* @brief Get the temperature metric value for the specified metric, from the
|
||||
* specified temperature sensor on the specified device.
|
||||
* specified temperature sensor on the specified device. It is not supported on
|
||||
* virtual machine guest
|
||||
*
|
||||
* @details Given a processor handle @p processor_handle, a sensor type @p sensor_type, a
|
||||
* ::amdsmi_temperature_metric_t @p metric and a pointer to an int64_t @p
|
||||
@@ -1901,7 +1909,8 @@ amdsmi_status_t amdsmi_get_temp_metric(amdsmi_processor_handle processor_handle
|
||||
|
||||
/**
|
||||
* @brief Get the voltage metric value for the specified metric, from the
|
||||
* specified voltage sensor on the specified device.
|
||||
* specified voltage sensor on the specified device. It is not supported on
|
||||
* virtual machine guest
|
||||
*
|
||||
* @details Given a processor handle @p processor_handle, a sensor type @p sensor_type, a
|
||||
* ::amdsmi_voltage_metric_t @p metric and a pointer to an int64_t @p
|
||||
@@ -1938,7 +1947,8 @@ amdsmi_status_t amdsmi_get_gpu_volt_metric(amdsmi_processor_handle processor_ha
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Reset the fan to automatic driver control
|
||||
* @brief Reset the fan to automatic driver control. It is not supported on virtual
|
||||
* machine guest
|
||||
*
|
||||
* @details This function returns control of the fan to the system
|
||||
*
|
||||
@@ -1953,7 +1963,7 @@ amdsmi_status_t amdsmi_reset_gpu_fan(amdsmi_processor_handle processor_handle, u
|
||||
|
||||
/**
|
||||
* @brief Set the fan speed for the specified device with the provided speed,
|
||||
* in RPMs.
|
||||
* in RPMs. It is not supported on virtual machine guest
|
||||
*
|
||||
* @details Given a processor handle @p processor_handle and a integer value indicating
|
||||
* speed @p speed, this function will attempt to set the fan speed to @p speed.
|
||||
@@ -2014,7 +2024,8 @@ amdsmi_get_utilization_count(amdsmi_processor_handle processor_handle,
|
||||
uint64_t *timestamp);
|
||||
|
||||
/**
|
||||
* @brief Get current PCIE info of the device with provided processor handle.
|
||||
* @brief Get current PCIE info of the device with provided processor handle. It is not supported
|
||||
* on virtual machine guest
|
||||
*
|
||||
* @details Given a processor handle @p processor_handle, this function returns PCIE info of the
|
||||
* given device.
|
||||
@@ -2042,7 +2053,8 @@ amdsmi_status_t amdsmi_get_pcie_link_status(amdsmi_processor_handle processor_ha
|
||||
amdsmi_status_t amdsmi_get_pcie_link_caps(amdsmi_processor_handle processor_handle, amdsmi_pcie_info_t *info);
|
||||
|
||||
/**
|
||||
* @brief Get the performance level of the device
|
||||
* @brief Get the performance level of the device. It is not supported on virtual
|
||||
* machine guest
|
||||
*
|
||||
* @details This function will write the ::amdsmi_dev_perf_level_t to the uint32_t
|
||||
* pointed to by @p perf, for a given processor handle @p processor_handle and a pointer
|
||||
@@ -2063,7 +2075,8 @@ amdsmi_status_t amdsmi_get_gpu_perf_level(amdsmi_processor_handle processor_hand
|
||||
amdsmi_dev_perf_level_t *perf);
|
||||
|
||||
/**
|
||||
* @brief Enter performance determinism mode with provided processor handle.
|
||||
* @brief Enter performance determinism mode with provided processor handle. It is
|
||||
* not supported on virtual machine guest
|
||||
*
|
||||
* @details Given a processor handle @p processor_handle and @p clkvalue this function
|
||||
* will enable performance determinism mode, which enforces a GFXCLK frequency
|
||||
@@ -2084,7 +2097,7 @@ amdsmi_set_gpu_perf_determinism_mode(amdsmi_processor_handle processor_handle, u
|
||||
|
||||
/**
|
||||
* @brief Get the overdrive percent associated with the device with provided
|
||||
* processor handle.
|
||||
* processor handle. It is not supported on virtual machine guest
|
||||
*
|
||||
* @details Given a processor handle @p processor_handle and a pointer to a uint32_t @p od,
|
||||
* this function will write the overdrive percentage to the uint32_t pointed
|
||||
@@ -2106,7 +2119,7 @@ amdsmi_status_t amdsmi_get_gpu_overdrive_level(amdsmi_processor_handle processor
|
||||
|
||||
/**
|
||||
* @brief Get the list of possible system clock speeds of device for a
|
||||
* specified clock type.
|
||||
* specified clock type. It is not supported on virtual machine guest
|
||||
*
|
||||
* @details Given a processor handle @p processor_handle, a clock type @p clk_type, and a
|
||||
* pointer to a to an ::amdsmi_frequencies_t structure @p f, this function will
|
||||
@@ -2127,7 +2140,8 @@ amdsmi_status_t amdsmi_get_clk_freq(amdsmi_processor_handle processor_handle,
|
||||
amdsmi_clk_type_t clk_type, amdsmi_frequencies_t *f);
|
||||
|
||||
/**
|
||||
* @brief Reset the gpu associated with the device with provided processor handle
|
||||
* @brief Reset the gpu associated with the device with provided processor handle. It is not
|
||||
* supported on virtual machine guest
|
||||
*
|
||||
* @details Given a processor handle @p processor_handle, this function will reset the GPU
|
||||
*
|
||||
@@ -2138,7 +2152,8 @@ amdsmi_status_t amdsmi_get_clk_freq(amdsmi_processor_handle processor_handle,
|
||||
amdsmi_status_t amdsmi_reset_gpu(amdsmi_processor_handle processor_handle);
|
||||
|
||||
/**
|
||||
* @brief This function retrieves the voltage/frequency curve information
|
||||
* @brief This function retrieves the voltage/frequency curve information. It is
|
||||
* not supported on virtual machine guest
|
||||
*
|
||||
* @details Given a processor handle @p processor_handle and a pointer to a
|
||||
* ::amdsmi_od_volt_freq_data_t structure @p odv, this function will populate @p
|
||||
@@ -2158,7 +2173,8 @@ amdsmi_status_t amdsmi_get_gpu_od_volt_info(amdsmi_processor_handle processor_h
|
||||
amdsmi_od_volt_freq_data_t *odv);
|
||||
|
||||
/**
|
||||
* @brief This function retrieves the gpu metrics information
|
||||
* @brief This function retrieves the gpu metrics information. It is not supported
|
||||
* on virtual machine guest
|
||||
*
|
||||
* @details Given a processor handle @p processor_handle and a pointer to a
|
||||
* ::amdsmi_gpu_metrics_t structure @p pgpu_metrics, this function will populate
|
||||
@@ -2178,7 +2194,8 @@ amdsmi_status_t amdsmi_get_gpu_metrics_info(amdsmi_processor_handle processor_h
|
||||
amdsmi_gpu_metrics_t *pgpu_metrics);
|
||||
|
||||
/**
|
||||
* @brief This function sets the clock range information
|
||||
* @brief This function sets the clock range information. It is not supported on virtual
|
||||
* machine guest
|
||||
*
|
||||
* @details Given a processor handle @p processor_handle, a minimum clock value @p minclkvalue,
|
||||
* a maximum clock value @p maxclkvalue and a clock type @p clkType this function
|
||||
@@ -2201,7 +2218,8 @@ amdsmi_status_t amdsmi_set_gpu_clk_range(amdsmi_processor_handle processor_handl
|
||||
amdsmi_clk_type_t clkType);
|
||||
|
||||
/**
|
||||
* @brief This function sets the clock frequency information
|
||||
* @brief This function sets the clock frequency information. It is not supported on
|
||||
* virtual machine guest
|
||||
*
|
||||
* @details Given a processor handle @p processor_handle, a frequency level @p level,
|
||||
* a clock value @p clkvalue and a clock type @p clkType this function
|
||||
@@ -2224,7 +2242,8 @@ amdsmi_status_t amdsmi_set_gpu_od_clk_info(amdsmi_processor_handle processor_ha
|
||||
amdsmi_clk_type_t clkType);
|
||||
|
||||
/**
|
||||
* @brief This function sets 1 of the 3 voltage curve points.
|
||||
* @brief This function sets 1 of the 3 voltage curve points. It is not supported
|
||||
* on virtual machine guest
|
||||
*
|
||||
* @details Given a processor handle @p processor_handle, a voltage point @p vpoint
|
||||
* and a voltage value @p voltvalue this function will set voltage curve point
|
||||
@@ -2246,7 +2265,7 @@ amdsmi_status_t amdsmi_set_gpu_od_volt_info(amdsmi_processor_handle processor_h
|
||||
|
||||
/**
|
||||
* @brief This function will retrieve the current valid regions in the
|
||||
* frequency/voltage space.
|
||||
* frequency/voltage space. It is not supported on virtual machine guest
|
||||
*
|
||||
* @details Given a processor handle @p processor_handle, a pointer to an unsigned integer
|
||||
* @p num_regions and a buffer of ::amdsmi_freq_volt_region_t structures, @p
|
||||
@@ -2284,7 +2303,7 @@ amdsmi_status_t amdsmi_get_gpu_od_volt_curve_regions(amdsmi_processor_handle pr
|
||||
|
||||
/**
|
||||
* @brief Get the list of available preset power profiles and an indication of
|
||||
* which profile is currently active.
|
||||
* which profile is currently active. It is not supported on virtual machine guest
|
||||
*
|
||||
* @details Given a processor handle @p processor_handle and a pointer to a
|
||||
* ::amdsmi_power_profile_status_t @p status, this function will set the bits of
|
||||
@@ -2328,7 +2347,8 @@ amdsmi_status_t
|
||||
|
||||
/**
|
||||
* @brief Set the PowerPlay performance level associated with the device with
|
||||
* provided processor handle with the provided value.
|
||||
* provided processor handle with the provided value. It is not supported
|
||||
* on virtual machine guest
|
||||
*
|
||||
* @details Given a processor handle @p processor_handle and an ::amdsmi_dev_perf_level_t @p
|
||||
* perf_level, this function will set the PowerPlay performance level for the
|
||||
@@ -2347,7 +2367,8 @@ amdsmi_status_t
|
||||
|
||||
/**
|
||||
* @brief Set the overdrive percent associated with the device with provided
|
||||
* processor handle with the provided value. See details for WARNING.
|
||||
* processor handle with the provided value. See details for WARNING. It is
|
||||
* not supported on virtual machine guest
|
||||
*
|
||||
*
|
||||
* @details Given a processor handle @p processor_handle and an overdrive level @p od,
|
||||
@@ -2385,7 +2406,7 @@ amdsmi_status_t amdsmi_set_gpu_overdrive_level(amdsmi_processor_handle processo
|
||||
|
||||
/**
|
||||
* @brief Control the set of allowed frequencies that can be used for the
|
||||
* specified clock.
|
||||
* specified clock. It is not supported on virtual machine guest
|
||||
*
|
||||
* @details Given a processor handle @p processor_handle, a clock type @p clk_type, and a
|
||||
* 64 bit bitmask @p freq_bitmask, this function will limit the set of
|
||||
@@ -2451,7 +2472,8 @@ amdsmi_get_lib_version(amdsmi_version_t *version);
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Retrieve the error counts for a GPU block
|
||||
* @brief Retrieve the error counts for a GPU block. It is not supported on virtual
|
||||
* machine guest
|
||||
*
|
||||
* @details Given a processor handle @p processor_handle, an ::amdsmi_gpu_block_t @p block and a
|
||||
* pointer to an ::amdsmi_error_count_t @p ec, this function will write the error
|
||||
@@ -2475,7 +2497,7 @@ amdsmi_status_t amdsmi_get_gpu_ecc_count(amdsmi_processor_handle processor_hand
|
||||
amdsmi_gpu_block_t block, amdsmi_error_count_t *ec);
|
||||
|
||||
/**
|
||||
* @brief Retrieve the enabled ECC bit-mask
|
||||
* @brief Retrieve the enabled ECC bit-mask. It is not supported on virtual machine guest
|
||||
*
|
||||
* @details Given a processor handle @p processor_handle, and a pointer to a uint64_t @p
|
||||
* enabled_mask, this function will write bits to memory pointed to by
|
||||
@@ -2502,7 +2524,8 @@ amdsmi_status_t amdsmi_get_gpu_ecc_enabled(amdsmi_processor_handle processor_ha
|
||||
uint64_t *enabled_blocks);
|
||||
|
||||
/**
|
||||
* @brief Retrieve the ECC status for a GPU block
|
||||
* @brief Retrieve the ECC status for a GPU block. It is not supported on virtual machine
|
||||
* guest
|
||||
*
|
||||
* @details Given a processor handle @p processor_handle, an ::amdsmi_gpu_block_t @p block and
|
||||
* a pointer to an ::amdsmi_ras_err_state_t @p state, this function will write
|
||||
@@ -2646,7 +2669,8 @@ amdsmi_status_code_to_string(amdsmi_status_t status, const char **status_string)
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Tell if an event group is supported by a given device
|
||||
* @brief Tell if an event group is supported by a given device. It is not supported
|
||||
* on virtual machine guest
|
||||
*
|
||||
* @details Given a processor handle @p processor_handle and an event group specifier @p
|
||||
* group, tell if @p group type events are supported by the device associated
|
||||
@@ -2706,7 +2730,8 @@ amdsmi_status_t
|
||||
amdsmi_gpu_destroy_counter(amdsmi_event_handle_t evnt_handle);
|
||||
|
||||
/**
|
||||
* @brief Issue performance counter control commands
|
||||
* @brief Issue performance counter control commands. It is not supported on
|
||||
* virtual machine guest
|
||||
*
|
||||
* @details Issue a command @p cmd on the event counter associated with the
|
||||
* provided handle @p evt_handle.
|
||||
@@ -2746,7 +2771,8 @@ amdsmi_gpu_read_counter(amdsmi_event_handle_t evt_handle,
|
||||
amdsmi_counter_value_t *value);
|
||||
|
||||
/**
|
||||
* @brief Get the number of currently available counters
|
||||
* @brief Get the number of currently available counters. It is not supported on
|
||||
* virtual machine guest
|
||||
*
|
||||
* @details Given a processor handle @p processor_handle, a performance event group @p grp,
|
||||
* and a pointer to a uint32_t @p available, this function will write the
|
||||
@@ -2866,7 +2892,8 @@ amdsmi_get_gpu_compute_process_gpus(uint32_t pid, uint32_t *dv_indices,
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Retrieve the XGMI error status for a device
|
||||
* @brief Retrieve the XGMI error status for a device. It is not supported on
|
||||
* virtual machine guest
|
||||
*
|
||||
* @details Given a processor handle @p processor_handle, and a pointer to an
|
||||
* ::amdsmi_xgmi_status_t @p status, this function will write the current XGMI
|
||||
@@ -2888,7 +2915,8 @@ amdsmi_status_t
|
||||
amdsmi_gpu_xgmi_error_status(amdsmi_processor_handle processor_handle, amdsmi_xgmi_status_t *status);
|
||||
|
||||
/**
|
||||
* @brief Reset the XGMI error status for a device
|
||||
* @brief Reset the XGMI error status for a device. It is not supported on virtual
|
||||
* machine guest
|
||||
*
|
||||
* @details Given a processor handle @p processor_handle, this function will reset the
|
||||
* current XGMI error state ::amdsmi_xgmi_status_t for the device @p processor_handle to
|
||||
@@ -3224,7 +3252,7 @@ amdsmi_get_gpu_board_info(amdsmi_processor_handle processor_handle, amdsmi_board
|
||||
|
||||
/**
|
||||
* @brief Returns the power caps as currently configured in the
|
||||
* system.
|
||||
* system. It is not supported on virtual machine guest
|
||||
*
|
||||
* @param[in] processor_handle Device which to query
|
||||
* @param[in] sensor_ind A 0-based sensor index. Normally, this will be 0.
|
||||
@@ -3293,7 +3321,8 @@ amdsmi_get_gpu_vbios_info(amdsmi_processor_handle processor_handle, amdsmi_vbios
|
||||
|
||||
/**
|
||||
* @brief Returns the current usage of the GPU engines (GFX, MM and MEM).
|
||||
* Each usage is reported as a percentage from 0-100%.
|
||||
* Each usage is reported as a percentage from 0-100%. It is not
|
||||
* supported on virtual machine guest
|
||||
*
|
||||
* @param[in] processor_handle Device which to query
|
||||
*
|
||||
@@ -3307,6 +3336,7 @@ amdsmi_get_gpu_activity(amdsmi_processor_handle processor_handle, amdsmi_engine_
|
||||
/**
|
||||
* @brief Returns the current power and voltage of the GPU.
|
||||
* The voltage is in units of mV and the power in units of W.
|
||||
* It is not supported on virtual machine guest
|
||||
*
|
||||
* @param[in] processor_handle Device which to query
|
||||
*
|
||||
@@ -3320,7 +3350,8 @@ amdsmi_get_power_info(amdsmi_processor_handle processor_handle, amdsmi_power_inf
|
||||
/**
|
||||
* @brief Returns the measurements of the clocks in the GPU
|
||||
* for the GFX and multimedia engines and Memory. This call
|
||||
* reports the averages over 1s in MHz.
|
||||
* reports the averages over 1s in MHz. It is not supported
|
||||
* on virtual machine guest
|
||||
*
|
||||
* @param[in] processor_handle Device which to query
|
||||
*
|
||||
@@ -3351,30 +3382,6 @@ amdsmi_get_gpu_vram_usage(amdsmi_processor_handle processor_handle, amdsmi_vram_
|
||||
|
||||
/** @} End gpumon */
|
||||
|
||||
/*****************************************************************************/
|
||||
/** @defgroup powermon Power Management
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Returns current and supported frequency range
|
||||
* for the specified clock type.
|
||||
*
|
||||
* @param[in] processor_handle Device which to query
|
||||
*
|
||||
* @param[in] clk_type Clock type for which to get current and supported
|
||||
* frequency range.
|
||||
*
|
||||
* @param[out] range Reference to frequency range structure.
|
||||
* Must be allocated by user.
|
||||
*
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t
|
||||
amdsmi_get_gpu_target_frequency_range(amdsmi_processor_handle processor_handle, amdsmi_clk_type_t clk_type, amdsmi_frequency_range_t *range);
|
||||
|
||||
/** @} End powermon */
|
||||
|
||||
/*****************************************************************************/
|
||||
/** @defgroup processinfo Process information
|
||||
* @{
|
||||
@@ -3429,7 +3436,8 @@ amdsmi_get_gpu_process_info(amdsmi_processor_handle processor_handle, amdsmi_pro
|
||||
|
||||
/**
|
||||
* @brief Returns the total number of ECC errors (correctable and
|
||||
* uncorrectable) in the given GPU.
|
||||
* uncorrectable) in the given GPU. It is not supported on
|
||||
* virtual machine guest
|
||||
*
|
||||
* @param[in] processor_handle Device which to query
|
||||
*
|
||||
|
||||
+71
-112
@@ -373,7 +373,7 @@ except AmdSmiException as e:
|
||||
### amdsmi_get_power_cap_info
|
||||
|
||||
Description: Returns dictionary of power capabilities as currently configured
|
||||
on the given GPU
|
||||
on the given GPU. It is not supported on virtual machine guest
|
||||
|
||||
Input parameters:
|
||||
|
||||
@@ -494,7 +494,8 @@ except AmdSmiException as e:
|
||||
|
||||
### amdsmi_get_gpu_activity
|
||||
|
||||
Description: Returns the engine usage for the given GPU
|
||||
Description: Returns the engine usage for the given GPU.
|
||||
It is not supported on virtual machine guest
|
||||
|
||||
Input parameters:
|
||||
|
||||
@@ -533,7 +534,8 @@ except AmdSmiException as e:
|
||||
|
||||
### amdsmi_get_power_info
|
||||
|
||||
Description: Returns the current power and voltage for the given GPU
|
||||
Description: Returns the current power and voltage for the given GPU.
|
||||
It is not supported on virtual machine guest
|
||||
|
||||
Input parameters:
|
||||
|
||||
@@ -609,7 +611,8 @@ except AmdSmiException as e:
|
||||
|
||||
### amdsmi_get_clock_info
|
||||
|
||||
Description: Returns the clock measure for the given GPU
|
||||
Description: Returns the clock measure for the given GPU.
|
||||
It is not supported on virtual machine guest
|
||||
|
||||
Input parameters:
|
||||
|
||||
@@ -663,7 +666,8 @@ except AmdSmiException as e:
|
||||
|
||||
### amdsmi_get_pcie_link_status
|
||||
|
||||
Description: Returns the pcie link status for the given GPU
|
||||
Description: Returns the pcie link status for the given GPU.
|
||||
It is not supported on virtual machine guest
|
||||
|
||||
Input parameters:
|
||||
|
||||
@@ -737,7 +741,8 @@ except AmdSmiException as e:
|
||||
|
||||
### amdsmi_get_gpu_bad_page_info
|
||||
|
||||
Description: Returns bad page info for the given GPU
|
||||
Description: Returns bad page info for the given GPU.
|
||||
It is not supported on virtual machine guest
|
||||
|
||||
Input parameters:
|
||||
|
||||
@@ -780,80 +785,6 @@ except AmdSmiException as e:
|
||||
print(e)
|
||||
```
|
||||
|
||||
### amdsmi_get_gpu_target_frequency_range
|
||||
|
||||
Description: Returns the supported frequency target range for the given GPU
|
||||
|
||||
`Note: Not Supported`
|
||||
|
||||
Input parameters:
|
||||
|
||||
* `processor_handle` device which to query
|
||||
* `clock_type` one of `AmdSmiClkType` enum values:
|
||||
|
||||
Field | Description
|
||||
---|---
|
||||
`SYS` | SYS clock type
|
||||
`GFX` | GFX clock type
|
||||
`DF` | DF clock type
|
||||
`DCEF` | DCEF clock type
|
||||
`SOC` | SOC clock type
|
||||
`MEM` | MEM clock type
|
||||
`PCIE` | PCIE clock type
|
||||
`VCLK0` | VCLK0 clock type
|
||||
`VCLK1` | VCLK1 clock type
|
||||
`DCLK0` | DCLK0 clock type
|
||||
`DCLK1` | DCLK1 clock type
|
||||
|
||||
Output: Dictionary with fields
|
||||
|
||||
Field | Description
|
||||
---|---
|
||||
`supported_upper_bound` | Maximal value of target supported frequency in MHz
|
||||
`supported_lower_bound` | Minimal value of target supported frequency in MHz
|
||||
`current_upper_bound` | Maximal value of target current frequency in MHz
|
||||
`current_lower_bound` | Minimal value of target current frequency in MHz
|
||||
|
||||
Exceptions that can be thrown by `amdsmi_get_gpu_target_frequency_range` function:
|
||||
|
||||
* `AmdSmiLibraryException`
|
||||
* `AmdSmiRetryException`
|
||||
* `AmdSmiParameterException`
|
||||
|
||||
Example:
|
||||
|
||||
```python
|
||||
try:
|
||||
devices = amdsmi_get_processor_handles()
|
||||
if len(devices) == 0:
|
||||
print("No GPUs on machine")
|
||||
else:
|
||||
for device in devices:
|
||||
print("=============== GFX DOMAIN ================")
|
||||
freq_range = amdsmi_get_gpu_target_frequency_range(device,
|
||||
AmdSmiClkType.GFX)
|
||||
print(freq_range['supported_upper_bound'])
|
||||
print(freq_range['supported_lower_bound'])
|
||||
print(freq_range['current_upper_bound'])
|
||||
print(freq_range['current_lower_bound'])
|
||||
print("=============== MEM DOMAIN ================")
|
||||
freq_range = amdsmi_get_gpu_target_frequency_range(device,
|
||||
AmdSmiClkType.MEM)
|
||||
print(freq_range['supported_upper_bound'])
|
||||
print(freq_range['supported_lower_bound'])
|
||||
print(freq_range['current_upper_bound'])
|
||||
print(freq_range['current_lower_bound'])
|
||||
print("=============== VCLK0 DOMAIN ================")
|
||||
freq_range = amdsmi_get_gpu_target_frequency_range(device,
|
||||
AmdSmiClkType.VCLK0)
|
||||
print(freq_range['supported_upper_bound'])
|
||||
print(freq_range['supported_lower_bound'])
|
||||
print(freq_range['current_upper_bound'])
|
||||
print(freq_range['current_lower_bound'])
|
||||
except AmdSmiException as e:
|
||||
print(e)
|
||||
```
|
||||
|
||||
### amdsmi_get_gpu_process_list
|
||||
|
||||
Description: Returns the list of processes for the given GPU
|
||||
@@ -928,7 +859,8 @@ except AmdSmiException as e:
|
||||
|
||||
### amdsmi_get_gpu_total_ecc_count
|
||||
|
||||
Description: Returns the ECC error count for the given GPU
|
||||
Description: Returns the ECC error count for the given GPU.
|
||||
It is not supported on virtual machine guest
|
||||
|
||||
Input parameters:
|
||||
|
||||
@@ -1000,7 +932,8 @@ except AmdSmiException as e:
|
||||
|
||||
### amdsmi_get_gpu_ras_block_features_enabled
|
||||
|
||||
Description: Returns status of each RAS block for the given GPU
|
||||
Description: Returns status of each RAS block for the given GPU.
|
||||
It is not supported on virtual machine guest
|
||||
|
||||
Input parameters:
|
||||
|
||||
@@ -1107,6 +1040,7 @@ except AmdSmiException as e:
|
||||
### amdsmi_set_gpu_pci_bandwidth
|
||||
|
||||
Description: Control the set of allowed PCIe bandwidths that can be used
|
||||
It is not supported on virtual machine guest
|
||||
|
||||
Input parameters:
|
||||
|
||||
@@ -1138,7 +1072,8 @@ except AmdSmiException as e:
|
||||
|
||||
### amdsmi_set_power_cap
|
||||
|
||||
Description: Set the power cap value
|
||||
Description: Set the power cap value. It is not supported on virtual machine
|
||||
guest
|
||||
|
||||
Input parameters:
|
||||
|
||||
@@ -1172,7 +1107,7 @@ except AmdSmiException as e:
|
||||
|
||||
### amdsmi_set_gpu_power_profile
|
||||
|
||||
Description: Set the power profile
|
||||
Description: Set the power profile. It is not supported on virtual machine guest
|
||||
|
||||
Input parameters:
|
||||
|
||||
@@ -1206,7 +1141,8 @@ except AmdSmiException as e:
|
||||
|
||||
### amdsmi_set_gpu_clk_range
|
||||
|
||||
Description: This function sets the clock range information
|
||||
Description: This function sets the clock range information.
|
||||
It is not supported on virtual machine guest
|
||||
|
||||
Input parameters:
|
||||
|
||||
@@ -1283,6 +1219,7 @@ except AmdSmiException as e:
|
||||
### amdsmi_get_gpu_pci_bandwidth
|
||||
|
||||
Description: Get the list of possible PCIe bandwidths that are available.
|
||||
It is not supported on virtual machine guest
|
||||
|
||||
Input parameters:
|
||||
|
||||
@@ -1326,7 +1263,7 @@ except AmdSmiException as e:
|
||||
|
||||
### amdsmi_get_gpu_pci_throughput
|
||||
|
||||
Description: Get PCIe traffic information
|
||||
Description: Get PCIe traffic information. It is not supported on virtual machine guest
|
||||
|
||||
Input parameters:
|
||||
|
||||
@@ -1427,6 +1364,7 @@ except AmdSmiException as e:
|
||||
### amdsmi_get_energy_count
|
||||
|
||||
Description: Get the energy accumulator counter of the device.
|
||||
It is not supported on virtual machine guest
|
||||
|
||||
Input parameters:
|
||||
|
||||
@@ -1496,6 +1434,7 @@ except AmdSmiException as e:
|
||||
### amdsmi_set_gpu_od_clk_info
|
||||
|
||||
Description: This function sets the clock frequency information
|
||||
It is not supported on virtual machine guest
|
||||
|
||||
Input parameters:
|
||||
|
||||
@@ -1566,7 +1505,8 @@ except AmdSmiException as e:
|
||||
|
||||
### amdsmi_set_gpu_od_volt_info
|
||||
|
||||
Description: This function sets 1 of the 3 voltage curve points
|
||||
Description: This function sets 1 of the 3 voltage curve points.
|
||||
It is not supported on virtual machine guest
|
||||
|
||||
Input parameters:
|
||||
|
||||
@@ -1600,7 +1540,7 @@ except AmdSmiException as e:
|
||||
### amdsmi_get_gpu_fan_rpms
|
||||
|
||||
Description: Get the fan speed in RPMs of the device with the specified device
|
||||
handle and 0-based sensor index.
|
||||
handle and 0-based sensor index. It is not supported on virtual machine guest
|
||||
|
||||
Input parameters:
|
||||
|
||||
@@ -1634,7 +1574,7 @@ except AmdSmiException as e:
|
||||
### amdsmi_get_gpu_fan_speed
|
||||
|
||||
Description: Get the fan speed for the specified device as a value relative to
|
||||
AMDSMI_MAX_FAN_SPEED
|
||||
AMDSMI_MAX_FAN_SPEED. It is not supported on virtual machine guest
|
||||
|
||||
Input parameters:
|
||||
|
||||
@@ -1667,7 +1607,8 @@ except AmdSmiException as e:
|
||||
|
||||
### amdsmi_get_gpu_fan_speed_max
|
||||
|
||||
Description: Get the max fan speed of the device with provided device handle
|
||||
Description: Get the max fan speed of the device with provided device handle.
|
||||
It is not supported on virtual machine guest
|
||||
|
||||
Input parameters:
|
||||
|
||||
@@ -1701,7 +1642,8 @@ except AmdSmiException as e:
|
||||
### amdsmi_get_temp_metric
|
||||
|
||||
Description: Get the temperature metric value for the specified metric, from the
|
||||
specified temperature sensor on the specified device
|
||||
specified temperature sensor on the specified device. It is not supported on virtual
|
||||
machine guest
|
||||
|
||||
Input parameters:
|
||||
|
||||
@@ -1736,7 +1678,8 @@ except AmdSmiException as e:
|
||||
### amdsmi_get_gpu_volt_metric
|
||||
|
||||
Description: Get the voltage metric value for the specified metric, from the
|
||||
specified voltage sensor on the specified device
|
||||
specified voltage sensor on the specified device. It is not supported on virtual
|
||||
machine guest
|
||||
|
||||
Input parameters:
|
||||
|
||||
@@ -1816,7 +1759,8 @@ except AmdSmiException as e:
|
||||
|
||||
### amdsmi_get_gpu_perf_level
|
||||
|
||||
Description: Get the performance level of the device with provided device handle
|
||||
Description: Get the performance level of the device with provided device handle.
|
||||
It is not supported on virtual machine guest
|
||||
|
||||
Input parameters:
|
||||
|
||||
@@ -1847,7 +1791,8 @@ except AmdSmiException as e:
|
||||
|
||||
### amdsmi_set_gpu_perf_determinism_mode
|
||||
|
||||
Description: Enter performance determinism mode with provided device handle
|
||||
Description: Enter performance determinism mode with provided device handle.
|
||||
It is not supported on virtual machine guest
|
||||
|
||||
Input parameters:
|
||||
|
||||
@@ -1879,7 +1824,7 @@ except AmdSmiException as e:
|
||||
### amdsmi_get_gpu_overdrive_level
|
||||
|
||||
Description: Get the overdrive percent associated with the device with provided
|
||||
device handle
|
||||
device handle. It is not supported on virtual machine guest
|
||||
|
||||
Input parameters:
|
||||
|
||||
@@ -1911,7 +1856,7 @@ except AmdSmiException as e:
|
||||
### amdsmi_get_clk_freq
|
||||
|
||||
Description: Get the list of possible system clock speeds of device for a
|
||||
specified clock type
|
||||
specified clock type. It is not supported on virtual machine guest
|
||||
|
||||
Input parameters:
|
||||
|
||||
@@ -1949,6 +1894,7 @@ except AmdSmiException as e:
|
||||
### amdsmi_get_gpu_od_volt_info
|
||||
|
||||
Description: This function retrieves the voltage/frequency curve information
|
||||
It is not supported on virtual machine guest
|
||||
|
||||
Input parameters:
|
||||
|
||||
@@ -1987,7 +1933,8 @@ except AmdSmiException as e:
|
||||
|
||||
### amdsmi_get_gpu_metrics_info
|
||||
|
||||
Description: This function retrieves the gpu metrics information
|
||||
Description: This function retrieves the gpu metrics information. It is not
|
||||
supported on virtual machine guest
|
||||
|
||||
Input parameters:
|
||||
|
||||
@@ -2055,7 +2002,7 @@ except AmdSmiException as e:
|
||||
### amdsmi_get_gpu_od_volt_curve_regions
|
||||
|
||||
Description: This function will retrieve the current valid regions in the
|
||||
frequency/voltage space
|
||||
frequency/voltage space. It is not supported on virtual machine guest
|
||||
|
||||
Input parameters:
|
||||
|
||||
@@ -2092,7 +2039,7 @@ except AmdSmiException as e:
|
||||
### amdsmi_get_gpu_power_profile_presets
|
||||
|
||||
Description: Get the list of available preset power profiles and an indication of
|
||||
which profile is currently active
|
||||
which profile is currently active. It is not supported on virtual machine guest
|
||||
|
||||
Input parameters:
|
||||
|
||||
@@ -2129,7 +2076,8 @@ except AmdSmiException as e:
|
||||
|
||||
### amdsmi_gpu_counter_group_supported
|
||||
|
||||
Description: Tell if an event group is supported by a given device
|
||||
Description: Tell if an event group is supported by a given device.
|
||||
It is not supported on virtual machine guest
|
||||
|
||||
Input parameters:
|
||||
|
||||
@@ -2222,7 +2170,8 @@ except AmdSmiException as e:
|
||||
|
||||
### amdsmi_gpu_control_counter
|
||||
|
||||
Description: Issue performance counter control commands
|
||||
Description: Issue performance counter control commands. It is not supported
|
||||
on virtual machine guest
|
||||
|
||||
Input parameters:
|
||||
|
||||
@@ -2291,7 +2240,8 @@ except AmdSmiException as e:
|
||||
|
||||
### amdsmi_get_gpu_available_counters
|
||||
|
||||
Description: Get the number of currently available counters
|
||||
Description: Get the number of currently available counters. It is not supported
|
||||
on virtual machine guest
|
||||
|
||||
Input parameters:
|
||||
|
||||
@@ -2323,7 +2273,8 @@ except AmdSmiException as e:
|
||||
|
||||
### amdsmi_set_gpu_perf_level
|
||||
|
||||
Description: Set a desired performance level for given device
|
||||
Description: Set a desired performance level for given device. It is not
|
||||
supported on virtual machine guest
|
||||
|
||||
Input parameters:
|
||||
|
||||
@@ -2355,6 +2306,7 @@ except AmdSmiException as e:
|
||||
### amdsmi_reset_gpu
|
||||
|
||||
Description: Reset the gpu associated with the device with provided device handle
|
||||
It is not supported on virtual machine guest
|
||||
|
||||
Input parameters:
|
||||
|
||||
@@ -2385,7 +2337,7 @@ except AmdSmiException as e:
|
||||
### amdsmi_set_gpu_fan_speed
|
||||
|
||||
Description: Set the fan speed for the specified device with the provided speed,
|
||||
in RPMs
|
||||
in RPMs. It is not supported on virtual machine guest
|
||||
|
||||
Input parameters:
|
||||
|
||||
@@ -2417,7 +2369,8 @@ except AmdSmiException as e:
|
||||
|
||||
### amdsmi_reset_gpu_fan
|
||||
|
||||
Description: Reset the fan to automatic driver control
|
||||
Description: Reset the fan to automatic driver control. It is not
|
||||
supported on virtual machine guest
|
||||
|
||||
Input parameters:
|
||||
|
||||
@@ -2449,7 +2402,7 @@ except AmdSmiException as e:
|
||||
### amdsmi_set_clk_freq
|
||||
|
||||
Description: Control the set of allowed frequencies that can be used for the
|
||||
specified clock
|
||||
specified clock. It is not supported on virtual machine guest
|
||||
|
||||
Input parameters:
|
||||
|
||||
@@ -2486,7 +2439,8 @@ except AmdSmiException as e:
|
||||
### amdsmi_set_gpu_overdrive_level
|
||||
|
||||
Description: **deprecated** Set the overdrive percent associated with the
|
||||
device with provided device handle with the provided value
|
||||
device with provided device handle with the provided value. It is not
|
||||
supported on virtual machine guest
|
||||
|
||||
Input parameters:
|
||||
|
||||
@@ -2517,7 +2471,8 @@ except AmdSmiException as e:
|
||||
|
||||
### amdsmi_get_gpu_ecc_count
|
||||
|
||||
Description: Retrieve the error counts for a GPU block
|
||||
Description: Retrieve the error counts for a GPU block. It is not supported
|
||||
on virtual machine guest
|
||||
|
||||
Input parameters:
|
||||
|
||||
@@ -2554,7 +2509,8 @@ except AmdSmiException as e:
|
||||
|
||||
### amdsmi_get_gpu_ecc_enabled
|
||||
|
||||
Description: Retrieve the enabled ECC bit-mask
|
||||
Description: Retrieve the enabled ECC bit-mask. It is not supported on virtual
|
||||
machine guest
|
||||
|
||||
Input parameters:
|
||||
|
||||
@@ -2585,7 +2541,8 @@ except AmdSmiException as e:
|
||||
|
||||
### amdsmi_get_gpu_ecc_status
|
||||
|
||||
Description: Retrieve the ECC status for a GPU block
|
||||
Description: Retrieve the ECC status for a GPU block. It is not supported
|
||||
on virtual machine guest
|
||||
|
||||
Input parameters:
|
||||
|
||||
@@ -2735,7 +2692,8 @@ except AmdSmiException as e:
|
||||
|
||||
### amdsmi_gpu_xgmi_error_status
|
||||
|
||||
Description: Retrieve the XGMI error status for a device
|
||||
Description: Retrieve the XGMI error status for a device. It is not supported on
|
||||
virtual machine guest
|
||||
|
||||
Input parameters:
|
||||
|
||||
@@ -2766,7 +2724,8 @@ except AmdSmiException as e:
|
||||
|
||||
### amdsmi_reset_gpu_xgmi_error
|
||||
|
||||
Description: Reset the XGMI error status for a device
|
||||
Description: Reset the XGMI error status for a device. It is not supported
|
||||
on virtual machine guest
|
||||
|
||||
Input parameters:
|
||||
|
||||
|
||||
@@ -54,9 +54,6 @@ from .amdsmi_interface import amdsmi_get_pcie_link_status
|
||||
from .amdsmi_interface import amdsmi_get_pcie_link_caps
|
||||
from .amdsmi_interface import amdsmi_get_gpu_bad_page_info
|
||||
|
||||
# # Power Management
|
||||
from .amdsmi_interface import amdsmi_get_gpu_target_frequency_range
|
||||
|
||||
# # Process Information
|
||||
from .amdsmi_interface import amdsmi_get_gpu_process_list
|
||||
from .amdsmi_interface import amdsmi_get_gpu_process_info
|
||||
|
||||
@@ -761,34 +761,6 @@ def amdsmi_get_gpu_bad_page_info(
|
||||
return table_records
|
||||
|
||||
|
||||
def amdsmi_get_gpu_target_frequency_range(
|
||||
processor_handle: amdsmi_wrapper.amdsmi_processor_handle,
|
||||
clock_type: amdsmi_wrapper.amdsmi_clk_type_t,
|
||||
) -> Dict[str, Any]:
|
||||
if not isinstance(processor_handle, amdsmi_wrapper.amdsmi_processor_handle):
|
||||
raise AmdSmiParameterException(
|
||||
processor_handle, amdsmi_wrapper.amdsmi_processor_handle
|
||||
)
|
||||
if not isinstance(clock_type, AmdSmiClkType):
|
||||
raise AmdSmiParameterException(clock_type, AmdSmiClkType)
|
||||
|
||||
freq_range = amdsmi_wrapper.amdsmi_frequency_range_t()
|
||||
_check_res(
|
||||
amdsmi_wrapper.amdsmi_get_gpu_target_frequency_range(
|
||||
processor_handle,
|
||||
amdsmi_wrapper.amdsmi_clk_type_t(clock_type),
|
||||
ctypes.byref(freq_range),
|
||||
)
|
||||
)
|
||||
|
||||
return {
|
||||
"supported_upper_bound": freq_range.supported_freq_range.upper_bound,
|
||||
"supported_lower_bound": freq_range.supported_freq_range.lower_bound,
|
||||
"current_upper_bound": freq_range.current_freq_range.upper_bound,
|
||||
"current_lower_bound": freq_range.current_freq_range.lower_bound,
|
||||
}
|
||||
|
||||
|
||||
def amdsmi_get_gpu_total_ecc_count(
|
||||
processor_handle: amdsmi_wrapper.amdsmi_processor_handle,
|
||||
) -> Dict[str, Any]:
|
||||
|
||||
@@ -1646,9 +1646,6 @@ amdsmi_get_clock_info.argtypes = [amdsmi_processor_handle, amdsmi_clk_type_t, ct
|
||||
amdsmi_get_gpu_vram_usage = _libraries['libamd_smi.so'].amdsmi_get_gpu_vram_usage
|
||||
amdsmi_get_gpu_vram_usage.restype = amdsmi_status_t
|
||||
amdsmi_get_gpu_vram_usage.argtypes = [amdsmi_processor_handle, ctypes.POINTER(struct_c__SA_amdsmi_vram_info_t)]
|
||||
amdsmi_get_gpu_target_frequency_range = _libraries['libamd_smi.so'].amdsmi_get_gpu_target_frequency_range
|
||||
amdsmi_get_gpu_target_frequency_range.restype = amdsmi_status_t
|
||||
amdsmi_get_gpu_target_frequency_range.argtypes = [amdsmi_processor_handle, amdsmi_clk_type_t, ctypes.POINTER(struct_c__SA_amdsmi_frequency_range_t)]
|
||||
amdsmi_get_gpu_process_list = _libraries['libamd_smi.so'].amdsmi_get_gpu_process_list
|
||||
amdsmi_get_gpu_process_list.restype = amdsmi_status_t
|
||||
amdsmi_get_gpu_process_list.argtypes = [amdsmi_processor_handle, ctypes.POINTER(ctypes.c_uint32), ctypes.POINTER(ctypes.c_uint32)]
|
||||
@@ -1791,8 +1788,6 @@ __all__ = \
|
||||
'TEMPERATURE_TYPE_HBM_2', 'TEMPERATURE_TYPE_HBM_3',
|
||||
'TEMPERATURE_TYPE_JUNCTION', 'TEMPERATURE_TYPE_PLX',
|
||||
'TEMPERATURE_TYPE_VRAM', 'TEMPERATURE_TYPE__MAX', 'UNKNOWN',
|
||||
'amdsmi_get_gpu_bdf_id',
|
||||
'amdsmi_get_minmax_bandwith_between_processors',
|
||||
'amd_metrics_table_header_t', 'amdsmi_asic_info_t',
|
||||
'amdsmi_bdf_t', 'amdsmi_bit_field_t', 'amdsmi_board_info_t',
|
||||
'amdsmi_clk_info_t', 'amdsmi_clk_type_t',
|
||||
@@ -1815,7 +1810,8 @@ __all__ = \
|
||||
'amdsmi_get_clock_info', 'amdsmi_get_energy_count',
|
||||
'amdsmi_get_fw_info', 'amdsmi_get_gpu_activity',
|
||||
'amdsmi_get_gpu_asic_info', 'amdsmi_get_gpu_available_counters',
|
||||
'amdsmi_get_gpu_bad_page_info', 'amdsmi_get_gpu_board_info',
|
||||
'amdsmi_get_gpu_bad_page_info', 'amdsmi_get_gpu_bdf_id',
|
||||
'amdsmi_get_gpu_board_info',
|
||||
'amdsmi_get_gpu_compute_process_gpus',
|
||||
'amdsmi_get_gpu_compute_process_info',
|
||||
'amdsmi_get_gpu_compute_process_info_by_pid',
|
||||
@@ -1836,14 +1832,15 @@ __all__ = \
|
||||
'amdsmi_get_gpu_process_info', 'amdsmi_get_gpu_process_list',
|
||||
'amdsmi_get_gpu_ras_block_features_enabled',
|
||||
'amdsmi_get_gpu_subsystem_id', 'amdsmi_get_gpu_subsystem_name',
|
||||
'amdsmi_get_gpu_target_frequency_range',
|
||||
'amdsmi_get_gpu_topo_numa_affinity',
|
||||
'amdsmi_get_gpu_total_ecc_count', 'amdsmi_get_gpu_vbios_info',
|
||||
'amdsmi_get_gpu_vendor_name', 'amdsmi_get_gpu_volt_metric',
|
||||
'amdsmi_get_gpu_vram_usage', 'amdsmi_get_gpu_vram_vendor',
|
||||
'amdsmi_get_lib_version', 'amdsmi_get_pcie_link_caps',
|
||||
'amdsmi_get_pcie_link_status', 'amdsmi_get_power_cap_info',
|
||||
'amdsmi_get_power_info', 'amdsmi_get_processor_handle_from_bdf',
|
||||
'amdsmi_get_lib_version',
|
||||
'amdsmi_get_minmax_bandwith_between_processors',
|
||||
'amdsmi_get_pcie_link_caps', 'amdsmi_get_pcie_link_status',
|
||||
'amdsmi_get_power_cap_info', 'amdsmi_get_power_info',
|
||||
'amdsmi_get_processor_handle_from_bdf',
|
||||
'amdsmi_get_processor_handles', 'amdsmi_get_processor_type',
|
||||
'amdsmi_get_socket_handles', 'amdsmi_get_socket_info',
|
||||
'amdsmi_get_temp_metric', 'amdsmi_get_utilization_count',
|
||||
|
||||
@@ -1444,57 +1444,6 @@ amdsmi_get_power_info(amdsmi_processor_handle processor_handle, amdsmi_power_inf
|
||||
return status;
|
||||
}
|
||||
|
||||
amdsmi_status_t
|
||||
amdsmi_get_gpu_target_frequency_range(amdsmi_processor_handle processor_handle, amdsmi_clk_type_t clk_type, amdsmi_frequency_range_t *range) {
|
||||
AMDSMI_CHECK_INIT();
|
||||
|
||||
if (range == nullptr || clk_type > CLK_TYPE__MAX) {
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
}
|
||||
|
||||
amdsmi_gpu_metrics_t metrics = {};
|
||||
amd::smi::AMDSmiGPUDevice* gpu_device = nullptr;
|
||||
amdsmi_status_t r = get_gpu_device_from_handle(processor_handle, &gpu_device);
|
||||
if (r != AMDSMI_STATUS_SUCCESS)
|
||||
return r;
|
||||
|
||||
amdsmi_status_t status;
|
||||
|
||||
int min = 0, max = 0;
|
||||
status = amdsmi_get_gpu_metrics_info(processor_handle, &metrics);
|
||||
if (status != AMDSMI_STATUS_SUCCESS) {
|
||||
return status;
|
||||
}
|
||||
status = smi_amdgpu_get_ranges(gpu_device, clk_type, &max, &min, nullptr);
|
||||
if (status != AMDSMI_STATUS_SUCCESS) {
|
||||
return status;
|
||||
}
|
||||
|
||||
range->supported_freq_range.lower_bound = (long)min;
|
||||
range->current_freq_range.lower_bound = (long)min;
|
||||
range->supported_freq_range.upper_bound = (long)max;
|
||||
max = 0;
|
||||
switch (clk_type) {
|
||||
case CLK_TYPE_GFX:
|
||||
max = metrics.current_gfxclk;
|
||||
break;
|
||||
case CLK_TYPE_MEM:
|
||||
max = metrics.current_uclk;
|
||||
break;
|
||||
case CLK_TYPE_VCLK0:
|
||||
max = metrics.current_vclk0;
|
||||
break;
|
||||
case CLK_TYPE_VCLK1:
|
||||
max = metrics.current_vclk1;
|
||||
break;
|
||||
default:
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
}
|
||||
range->current_freq_range.upper_bound = (long)max;
|
||||
|
||||
return AMDSMI_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
amdsmi_status_t
|
||||
amdsmi_get_gpu_driver_version(amdsmi_processor_handle processor_handle, int *length, char *version) {
|
||||
AMDSMI_CHECK_INIT();
|
||||
|
||||
Reference in New Issue
Block a user