Merge amd-staging into amd-master 20221226
Signed-off-by: Hao Zhou <Hao.Zhou@amd.com> Change-Id: I0df8148f884113f53e7ccb4b9de0361c2663f7d5
Tá an tiomantas seo le fáil i:
+1
-1
@@ -133,7 +133,7 @@ int main() {
|
||||
|
||||
// Get temperature
|
||||
int64_t val_i64 = 0;
|
||||
ret = amdsmi_dev_temp_metric_get(device_handles[j], 0,
|
||||
ret = amdsmi_dev_get_temp_metric(device_handles[j], 0,
|
||||
AMDSMI_TEMP_CURRENT, &val_i64);
|
||||
std::cout << "\t\tTemperature: " << val_i64/1000 << "C" << std::endl;
|
||||
}
|
||||
|
||||
@@ -49,8 +49,10 @@
|
||||
#include <iostream>
|
||||
#include <pwd.h>
|
||||
#include <sys/stat.h>
|
||||
#include <string.h>
|
||||
#include <vector>
|
||||
|
||||
|
||||
#define CHK_AMDSMI_RET(RET) \
|
||||
{ \
|
||||
if (RET != AMDSMI_STATUS_SUCCESS) { \
|
||||
@@ -63,6 +65,152 @@
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
void getFWNameFromId(int id, char *name)
|
||||
{
|
||||
switch (id) {
|
||||
case FW_ID_SMU:
|
||||
strcpy(name, "SMU");
|
||||
break;
|
||||
case FW_ID_CP_CE:
|
||||
strcpy(name, "CP_CE");
|
||||
break;
|
||||
case FW_ID_CP_PFP:
|
||||
strcpy(name, "CP_PFP");
|
||||
break;
|
||||
case FW_ID_CP_ME:
|
||||
strcpy(name, "CP_ME");
|
||||
break;
|
||||
case FW_ID_CP_MEC_JT1:
|
||||
strcpy(name, "CP_MEC_JT1");
|
||||
break;
|
||||
case FW_ID_CP_MEC_JT2:
|
||||
strcpy(name, "CP_MEC_JT2");
|
||||
break;
|
||||
case FW_ID_CP_MEC1:
|
||||
strcpy(name, "CP_MEC1");
|
||||
break;
|
||||
case FW_ID_CP_MEC2:
|
||||
strcpy(name, "CP_MEC2");
|
||||
break;
|
||||
case FW_ID_RLC:
|
||||
strcpy(name, "RLC");
|
||||
break;
|
||||
case FW_ID_SDMA0:
|
||||
strcpy(name, "SDMA0");
|
||||
break;
|
||||
case FW_ID_SDMA1:
|
||||
strcpy(name, "SDMA1");
|
||||
break;
|
||||
case FW_ID_SDMA2:
|
||||
strcpy(name, "SDMA2");
|
||||
break;
|
||||
case FW_ID_SDMA3:
|
||||
strcpy(name, "SDMA3");
|
||||
break;
|
||||
case FW_ID_SDMA4:
|
||||
strcpy(name, "SDMA4");
|
||||
break;
|
||||
case FW_ID_SDMA5:
|
||||
strcpy(name, "SDMA5");
|
||||
break;
|
||||
case FW_ID_SDMA6:
|
||||
strcpy(name, "SDMA6");
|
||||
break;
|
||||
case FW_ID_SDMA7:
|
||||
strcpy(name, "SDMA7");
|
||||
break;
|
||||
case FW_ID_VCN:
|
||||
strcpy(name, "VCN");
|
||||
break;
|
||||
case FW_ID_UVD:
|
||||
strcpy(name, "UVD");
|
||||
break;
|
||||
case FW_ID_VCE:
|
||||
strcpy(name, "VCE");
|
||||
break;
|
||||
case FW_ID_ISP:
|
||||
strcpy(name, "ISP");
|
||||
break;
|
||||
case FW_ID_DMCU_ERAM:
|
||||
strcpy(name, "DMCU_ERAM");
|
||||
break;
|
||||
case FW_ID_DMCU_ISR:
|
||||
strcpy(name, "DMCU_ISR");
|
||||
break;
|
||||
case FW_ID_RLC_RESTORE_LIST_GPM_MEM:
|
||||
strcpy(name, "RLC_RESTORE_LIST_GPM_MEM");
|
||||
break;
|
||||
case FW_ID_RLC_RESTORE_LIST_SRM_MEM:
|
||||
strcpy(name, "RLC_RESTORE_LIST_SRM_MEM");
|
||||
break;
|
||||
case FW_ID_RLC_RESTORE_LIST_CNTL:
|
||||
strcpy(name, "RLC_RESTORE_LIST_CNTL");
|
||||
break;
|
||||
case FW_ID_RLC_V:
|
||||
strcpy(name, "RLC_V");
|
||||
break;
|
||||
case FW_ID_MMSCH:
|
||||
strcpy(name, "MMSCH");
|
||||
break;
|
||||
case FW_ID_PSP_SYSDRV:
|
||||
strcpy(name, "PSP_SYSDRV");
|
||||
break;
|
||||
case FW_ID_PSP_SOSDRV:
|
||||
strcpy(name, "PSP_SOSDRV");
|
||||
break;
|
||||
case FW_ID_PSP_TOC:
|
||||
strcpy(name, "PSP_TOC");
|
||||
break;
|
||||
case FW_ID_PSP_KEYDB:
|
||||
strcpy(name, "PSP_KEYDB");
|
||||
break;
|
||||
case FW_ID_DFC:
|
||||
strcpy(name, "DFC");
|
||||
break;
|
||||
case FW_ID_PSP_SPL:
|
||||
strcpy(name, "PSP_SPL");
|
||||
break;
|
||||
case FW_ID_DRV_CAP:
|
||||
strcpy(name, "DRV_CAP");
|
||||
break;
|
||||
case FW_ID_MC:
|
||||
strcpy(name, "MC");
|
||||
break;
|
||||
case FW_ID_PSP_BL:
|
||||
strcpy(name, "PSP_BL");
|
||||
break;
|
||||
case FW_ID_CP_PM4:
|
||||
strcpy(name, "CP_PM4");
|
||||
break;
|
||||
case FW_ID_ASD:
|
||||
strcpy(name, "ID_ASD");
|
||||
break;
|
||||
case FW_ID_TA_RAS:
|
||||
strcpy(name, "ID_TA_RAS");
|
||||
break;
|
||||
case FW_ID_XGMI:
|
||||
strcpy(name, "ID_XGMI");
|
||||
break;
|
||||
case FW_ID_RLC_SRLG:
|
||||
strcpy(name, "ID_RLC_SRLG");
|
||||
break;
|
||||
case FW_ID_RLC_SRLS:
|
||||
strcpy(name, "ID_RLC_SRLS");
|
||||
break;
|
||||
case FW_ID_SMC:
|
||||
strcpy(name, "ID_SMC");
|
||||
break;
|
||||
case FW_ID_DMCU:
|
||||
strcpy(name, "ID_DMCU");
|
||||
break;
|
||||
default:
|
||||
strcpy(name, "");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int main() {
|
||||
amdsmi_status_t ret;
|
||||
|
||||
@@ -198,62 +346,15 @@ int main() {
|
||||
|
||||
// Get firmware info
|
||||
amdsmi_fw_info_t fw_information = {};
|
||||
char ucode_name[AMDSMI_MAX_STRING_LENGTH];
|
||||
ret = amdsmi_get_fw_info(device_handles[j], &fw_information);
|
||||
CHK_AMDSMI_RET(ret)
|
||||
printf(" Output of amdsmi_get_fw_info:\n");
|
||||
printf("\tFirmware version: %d\n", fw_information.num_fw_info);
|
||||
printf("\tSMU: %ld\n",
|
||||
fw_information.fw_info_list[amdsmi_fw_block_t::FW_ID_SMU]
|
||||
.fw_version);
|
||||
printf("\tSMC: %ld\n",
|
||||
fw_information.fw_info_list[amdsmi_fw_block_t::FW_ID_SMC]
|
||||
.fw_version);
|
||||
printf("\tVCN: %ld\n",
|
||||
fw_information.fw_info_list[amdsmi_fw_block_t::FW_ID_VCN]
|
||||
.fw_version);
|
||||
printf("\tCP_ME: %ld\n",
|
||||
fw_information.fw_info_list[amdsmi_fw_block_t::FW_ID_CP_ME]
|
||||
.fw_version);
|
||||
printf("\tCP_PFP: %ld\n",
|
||||
fw_information.fw_info_list[amdsmi_fw_block_t::FW_ID_CP_PFP]
|
||||
.fw_version);
|
||||
printf("\tCP_CE: %ld\n",
|
||||
fw_information.fw_info_list[amdsmi_fw_block_t::FW_ID_CP_CE]
|
||||
.fw_version);
|
||||
printf("\tRLC: %ld\n",
|
||||
fw_information.fw_info_list[amdsmi_fw_block_t::FW_ID_RLC]
|
||||
.fw_version);
|
||||
printf("\tCP_MEC1: %ld\n",
|
||||
fw_information.fw_info_list[amdsmi_fw_block_t::FW_ID_CP_MEC1]
|
||||
.fw_version);
|
||||
printf("\tCP_MEC2: %ld\n",
|
||||
fw_information.fw_info_list[amdsmi_fw_block_t::FW_ID_CP_MEC2]
|
||||
.fw_version);
|
||||
printf("\tSDMA0: %ld\n",
|
||||
fw_information.fw_info_list[amdsmi_fw_block_t::FW_ID_SDMA0]
|
||||
.fw_version);
|
||||
printf("\tMC: %ld\n",
|
||||
fw_information.fw_info_list[amdsmi_fw_block_t::FW_ID_MC]
|
||||
.fw_version);
|
||||
printf("\tRLC RESTORE LIST CNTL: %ld\n",
|
||||
fw_information
|
||||
.fw_info_list
|
||||
[amdsmi_fw_block_t::FW_ID_RLC_RESTORE_LIST_CNTL]
|
||||
.fw_version);
|
||||
printf("\tRLC RESTORE LIST GPM MEM: %ld\n",
|
||||
fw_information
|
||||
.fw_info_list
|
||||
[amdsmi_fw_block_t::FW_ID_RLC_RESTORE_LIST_GPM_MEM]
|
||||
.fw_version);
|
||||
printf("\tRLC RESTORE LIST SRM MEM: %ld\n",
|
||||
fw_information
|
||||
.fw_info_list
|
||||
[amdsmi_fw_block_t::FW_ID_RLC_RESTORE_LIST_SRM_MEM]
|
||||
.fw_version);
|
||||
printf(
|
||||
"\tPSP SOSDRV: %ld\n\n",
|
||||
fw_information.fw_info_list[amdsmi_fw_block_t::FW_ID_PSP_SOSDRV]
|
||||
.fw_version);
|
||||
printf("Number of Microcodes: %d\n", fw_information.num_fw_info);
|
||||
for (int j = 0; j < fw_information.num_fw_info; j++) {
|
||||
getFWNameFromId(fw_information.fw_info_list[j].fw_id, ucode_name);
|
||||
printf(" %s: %d\n", ucode_name, fw_information.fw_info_list[j].fw_version);
|
||||
}
|
||||
|
||||
// Get GPU power limit info
|
||||
amdsmi_power_limit_t power_limit = {};
|
||||
@@ -548,10 +649,10 @@ int main() {
|
||||
|
||||
// Get temperature
|
||||
int64_t val_i64 = 0;
|
||||
ret = amdsmi_dev_temp_metric_get(device_handles[j], 0,
|
||||
ret = amdsmi_dev_get_temp_metric(device_handles[j], 0,
|
||||
AMDSMI_TEMP_CURRENT, &val_i64);
|
||||
CHK_AMDSMI_RET(ret)
|
||||
printf(" Output of amdsmi_dev_temp_metric_get:\n");
|
||||
printf(" Output of amdsmi_dev_get_temp_metric:\n");
|
||||
std::cout << "\t\tTemperature: " << val_i64 / 1000 << "C"
|
||||
<< "\n\n";
|
||||
|
||||
|
||||
@@ -299,10 +299,10 @@ int main() {
|
||||
|
||||
// Get temperature
|
||||
int64_t val_i64 = 0;
|
||||
ret = amdsmi_dev_temp_metric_get(device_handles[j], 0,
|
||||
ret = amdsmi_dev_get_temp_metric(device_handles[j], 0,
|
||||
AMDSMI_TEMP_CURRENT, &val_i64);
|
||||
CHK_AMDSMI_RET(ret)
|
||||
printf(" Output of amdsmi_dev_temp_metric_get:\n");
|
||||
printf(" Output of amdsmi_dev_get_temp_metric:\n");
|
||||
std::cout << "\t\tTemperature: " << val_i64 / 1000 << "C"
|
||||
<< "\n\n";
|
||||
|
||||
|
||||
+122
-122
@@ -677,7 +677,7 @@ typedef enum {
|
||||
/**
|
||||
* @brief Pre-set Profile Selections. These bitmasks can be AND'd with the
|
||||
* ::amdsmi_power_profile_status_t.available_profiles returned from
|
||||
* ::amdsmi_dev_power_profile_presets_get to determine which power profiles
|
||||
* :: amdsmi_dev_get_power_profile_presets to determine which power profiles
|
||||
* are supported by the system.
|
||||
*/
|
||||
typedef enum {
|
||||
@@ -1322,7 +1322,7 @@ amdsmi_status_t amdsmi_get_device_handle_from_bdf(amdsmi_bdf_t bdf, amdsmi_devic
|
||||
* @p id. This ID is an identification of the type of device, so calling this
|
||||
* function for different devices will give the same value if they are kind
|
||||
* of device. Consequently, this function should not be used to distinguish
|
||||
* one device from another. amdsmi_dev_pci_id_get() should be used to get a
|
||||
* one device from another. amdsmi_dev_get_pci_id() should be used to get a
|
||||
* unique identifier.
|
||||
*
|
||||
* @param[in] device_handle a device handle
|
||||
@@ -1336,7 +1336,7 @@ amdsmi_status_t amdsmi_get_device_handle_from_bdf(amdsmi_bdf_t bdf, amdsmi_devic
|
||||
*
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t amdsmi_dev_id_get(amdsmi_device_handle device_handle, uint16_t *id);
|
||||
amdsmi_status_t amdsmi_dev_get_id(amdsmi_device_handle device_handle, uint16_t *id);
|
||||
|
||||
/**
|
||||
* @brief Get the name string for a give vendor ID
|
||||
@@ -1369,7 +1369,7 @@ amdsmi_status_t amdsmi_dev_id_get(amdsmi_device_handle device_handle, uint16_t *
|
||||
*
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t amdsmi_dev_vendor_name_get(amdsmi_device_handle device_handle, char *name,
|
||||
amdsmi_status_t amdsmi_dev_get_vendor_name(amdsmi_device_handle device_handle, char *name,
|
||||
size_t len);
|
||||
|
||||
/**
|
||||
@@ -1382,7 +1382,7 @@ amdsmi_status_t amdsmi_dev_vendor_name_get(amdsmi_device_handle device_handle, c
|
||||
* buffer @p brand.
|
||||
*
|
||||
* If the vram vendor for the device is not found as one of the values
|
||||
* contained within amdsmi_dev_vram_vendor_get, then this function will return
|
||||
* contained within amdsmi_dev_get_vram_vendor, then this function will return
|
||||
* the string 'unknown' instead of the vram vendor.
|
||||
*
|
||||
* @param[in] device_handle a device handle
|
||||
@@ -1394,7 +1394,7 @@ amdsmi_status_t amdsmi_dev_vendor_name_get(amdsmi_device_handle device_handle, c
|
||||
*
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t amdsmi_dev_vram_vendor_get(amdsmi_device_handle device_handle, char *brand,
|
||||
amdsmi_status_t amdsmi_dev_get_vram_vendor(amdsmi_device_handle device_handle, char *brand,
|
||||
uint32_t len);
|
||||
|
||||
/**
|
||||
@@ -1416,7 +1416,7 @@ amdsmi_status_t amdsmi_dev_vram_vendor_get(amdsmi_device_handle device_handle, c
|
||||
*
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t amdsmi_dev_subsystem_id_get(amdsmi_device_handle device_handle, uint16_t *id);
|
||||
amdsmi_status_t amdsmi_dev_get_subsystem_id(amdsmi_device_handle device_handle, uint16_t *id);
|
||||
|
||||
/**
|
||||
* @brief Get the name string for the device subsytem
|
||||
@@ -1450,7 +1450,7 @@ amdsmi_status_t amdsmi_dev_subsystem_id_get(amdsmi_device_handle device_handle,
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t
|
||||
amdsmi_dev_subsystem_name_get(amdsmi_device_handle device_handle, char *name, size_t len);
|
||||
amdsmi_dev_get_subsystem_name(amdsmi_device_handle device_handle, char *name, size_t len);
|
||||
|
||||
/**
|
||||
* @brief Get the drm minor number associated with this device
|
||||
@@ -1466,7 +1466,7 @@ amdsmi_dev_subsystem_name_get(amdsmi_device_handle device_handle, char *name, si
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t
|
||||
amdsmi_dev_drm_render_minor_get(amdsmi_device_handle device_handle, uint32_t *minor);
|
||||
amdsmi_dev_get_drm_render_minor(amdsmi_device_handle device_handle, uint32_t *minor);
|
||||
|
||||
/** @} End IDQuer */
|
||||
|
||||
@@ -1493,7 +1493,7 @@ amdsmi_dev_drm_render_minor_get(amdsmi_device_handle device_handle, uint32_t *mi
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t
|
||||
amdsmi_dev_pci_bandwidth_get(amdsmi_device_handle device_handle, amdsmi_pcie_bandwidth_t *bandwidth);
|
||||
amdsmi_dev_get_pci_bandwidth(amdsmi_device_handle device_handle, amdsmi_pcie_bandwidth_t *bandwidth);
|
||||
|
||||
/**
|
||||
* @brief Get the unique PCI device identifier associated for a device
|
||||
@@ -1527,7 +1527,7 @@ amdsmi_dev_pci_bandwidth_get(amdsmi_device_handle device_handle, amdsmi_pcie_ban
|
||||
*
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t amdsmi_dev_pci_id_get(amdsmi_device_handle device_handle, uint64_t *bdfid);
|
||||
amdsmi_status_t amdsmi_dev_get_pci_id(amdsmi_device_handle device_handle, uint64_t *bdfid);
|
||||
|
||||
/**
|
||||
* @brief Get the NUMA node associated with a device
|
||||
@@ -1548,7 +1548,7 @@ amdsmi_status_t amdsmi_dev_pci_id_get(amdsmi_device_handle device_handle, uint64
|
||||
*
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t amdsmi_topo_numa_affinity_get(amdsmi_device_handle device_handle, uint32_t *numa_node);
|
||||
amdsmi_status_t amdsmi_topo_get_numa_affinity(amdsmi_device_handle device_handle, uint32_t *numa_node);
|
||||
|
||||
/**
|
||||
* @brief Get PCIe traffic information
|
||||
@@ -1572,7 +1572,7 @@ amdsmi_status_t amdsmi_topo_numa_affinity_get(amdsmi_device_handle device_handle
|
||||
*
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t amdsmi_dev_pci_throughput_get(amdsmi_device_handle device_handle, uint64_t *sent,
|
||||
amdsmi_status_t amdsmi_dev_get_pci_throughput(amdsmi_device_handle device_handle, uint64_t *sent,
|
||||
uint64_t *received, uint64_t *max_pkt_sz);
|
||||
|
||||
/**
|
||||
@@ -1594,7 +1594,7 @@ amdsmi_status_t amdsmi_dev_pci_throughput_get(amdsmi_device_handle device_handle
|
||||
*
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t amdsmi_dev_pci_replay_counter_get(amdsmi_device_handle device_handle,
|
||||
amdsmi_status_t amdsmi_dev_get_pci_replay_counter(amdsmi_device_handle device_handle,
|
||||
uint64_t *counter);
|
||||
|
||||
/** @} End PCIeQuer */
|
||||
@@ -1611,7 +1611,7 @@ amdsmi_status_t amdsmi_dev_pci_replay_counter_get(amdsmi_device_handle device_ha
|
||||
* @details Given a device handle @p device_handle and a 64 bit bitmask @p bw_bitmask,
|
||||
* this function will limit the set of allowable bandwidths. If a bit in @p
|
||||
* bw_bitmask has a value of 1, then the frequency (as ordered in an
|
||||
* ::amdsmi_frequencies_t returned by ::amdsmi_dev_gpu_clk_freq_get()) corresponding
|
||||
* ::amdsmi_frequencies_t returned by :: amdsmi_dev_get_gpu_clk_freq()) corresponding
|
||||
* to that bit index will be allowed.
|
||||
*
|
||||
* This function will change the performance level to
|
||||
@@ -1634,7 +1634,7 @@ amdsmi_status_t amdsmi_dev_pci_replay_counter_get(amdsmi_device_handle device_ha
|
||||
*
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t amdsmi_dev_pci_bandwidth_set(amdsmi_device_handle device_handle, uint64_t bw_bitmask);
|
||||
amdsmi_status_t amdsmi_dev_set_pci_bandwidth(amdsmi_device_handle device_handle, uint64_t bw_bitmask);
|
||||
|
||||
/** @} End PCIeCont */
|
||||
|
||||
@@ -1666,7 +1666,7 @@ amdsmi_status_t amdsmi_dev_pci_bandwidth_set(amdsmi_device_handle device_handle,
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t
|
||||
amdsmi_dev_power_ave_get(amdsmi_device_handle device_handle, uint32_t sensor_ind, uint64_t *power);
|
||||
amdsmi_dev_get_power_ave(amdsmi_device_handle device_handle, uint32_t sensor_ind, uint64_t *power);
|
||||
|
||||
/**
|
||||
* @brief Get the energy accumulator counter of the device with provided
|
||||
@@ -1676,7 +1676,7 @@ amdsmi_dev_power_ave_get(amdsmi_device_handle device_handle, uint32_t sensor_ind
|
||||
* @p power, and a pointer to a uint64_t @p timestamp, this function will write
|
||||
* amount of energy consumed to the uint64_t pointed to by @p power,
|
||||
* and the timestamp to the uint64_t pointed to by @p timestamp.
|
||||
* The amdsmi_dev_power_ave_get() is an average of a short time. This function
|
||||
* The amdsmi_dev_get_power_ave() is an average of a short time. This function
|
||||
* accumulates all energy consumed.
|
||||
*
|
||||
* @param[in] device_handle a device handle
|
||||
@@ -1696,7 +1696,7 @@ amdsmi_dev_power_ave_get(amdsmi_device_handle device_handle, uint32_t sensor_ind
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t
|
||||
amdsmi_dev_energy_count_get(amdsmi_device_handle device_handle, uint64_t *power,
|
||||
amdsmi_dev_get_energy_count(amdsmi_device_handle device_handle, uint64_t *power,
|
||||
float *counter_resolution, uint64_t *timestamp);
|
||||
|
||||
/** @} End PowerQuer */
|
||||
@@ -1724,7 +1724,7 @@ amdsmi_dev_energy_count_get(amdsmi_device_handle device_handle, uint64_t *power,
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t
|
||||
amdsmi_dev_power_cap_set(amdsmi_device_handle device_handle, uint32_t sensor_ind, uint64_t cap);
|
||||
amdsmi_dev_set_power_cap(amdsmi_device_handle device_handle, uint32_t sensor_ind, uint64_t cap);
|
||||
|
||||
/**
|
||||
* @brief Set the power performance profile
|
||||
@@ -1732,7 +1732,7 @@ amdsmi_dev_power_cap_set(amdsmi_device_handle device_handle, uint32_t sensor_ind
|
||||
* @details This function will attempt to set the current profile to the provided
|
||||
* profile, given a device handle @p device_handle and a @p profile. The provided
|
||||
* profile must be one of the currently supported profiles, as indicated by a
|
||||
* call to ::amdsmi_dev_power_profile_presets_get()
|
||||
* call to :: amdsmi_dev_get_power_profile_presets()
|
||||
*
|
||||
* @param[in] device_handle a device handle
|
||||
*
|
||||
@@ -1744,7 +1744,7 @@ amdsmi_dev_power_cap_set(amdsmi_device_handle device_handle, uint32_t sensor_ind
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t
|
||||
amdsmi_dev_power_profile_set(amdsmi_device_handle device_handle, uint32_t reserved,
|
||||
amdsmi_dev_set_power_profile(amdsmi_device_handle device_handle, uint32_t reserved,
|
||||
amdsmi_power_profile_preset_masks_t profile);
|
||||
|
||||
/** @} End PowerCont*/
|
||||
@@ -1777,7 +1777,7 @@ amdsmi_dev_power_profile_set(amdsmi_device_handle device_handle, uint32_t reserv
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t
|
||||
amdsmi_dev_memory_total_get(amdsmi_device_handle device_handle, amdsmi_memory_type_t mem_type,
|
||||
amdsmi_dev_get_memory_total(amdsmi_device_handle device_handle, amdsmi_memory_type_t mem_type,
|
||||
uint64_t *total);
|
||||
|
||||
/**
|
||||
@@ -1801,7 +1801,7 @@ amdsmi_dev_memory_total_get(amdsmi_device_handle device_handle, amdsmi_memory_ty
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t
|
||||
amdsmi_dev_memory_usage_get(amdsmi_device_handle device_handle, amdsmi_memory_type_t mem_type,
|
||||
amdsmi_dev_get_memory_usage(amdsmi_device_handle device_handle, amdsmi_memory_type_t mem_type,
|
||||
uint64_t *used);
|
||||
|
||||
/**
|
||||
@@ -1864,7 +1864,7 @@ amdsmi_get_ras_block_features_enabled(amdsmi_device_handle device_handle, amdsmi
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t
|
||||
amdsmi_dev_memory_busy_percent_get(amdsmi_device_handle device_handle, uint32_t *busy_percent);
|
||||
amdsmi_dev_get_memory_busy_percent(amdsmi_device_handle device_handle, uint32_t *busy_percent);
|
||||
|
||||
/**
|
||||
* @brief Get information about reserved ("retired") memory pages
|
||||
@@ -1897,7 +1897,7 @@ amdsmi_dev_memory_busy_percent_get(amdsmi_device_handle device_handle, uint32_t
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t
|
||||
amdsmi_dev_memory_reserved_pages_get(amdsmi_device_handle device_handle, uint32_t *num_pages,
|
||||
amdsmi_dev_get_memory_reserved_pages(amdsmi_device_handle device_handle, uint32_t *num_pages,
|
||||
amdsmi_retired_page_record_t *records);
|
||||
|
||||
/** @} End MemQuer */
|
||||
@@ -1930,7 +1930,7 @@ amdsmi_dev_memory_reserved_pages_get(amdsmi_device_handle device_handle, uint32_
|
||||
*
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t amdsmi_dev_fan_rpms_get(amdsmi_device_handle device_handle, uint32_t sensor_ind,
|
||||
amdsmi_status_t amdsmi_dev_get_fan_rpms(amdsmi_device_handle device_handle, uint32_t sensor_ind,
|
||||
int64_t *speed);
|
||||
|
||||
/**
|
||||
@@ -1956,7 +1956,7 @@ amdsmi_status_t amdsmi_dev_fan_rpms_get(amdsmi_device_handle device_handle, uint
|
||||
*
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t amdsmi_dev_fan_speed_get(amdsmi_device_handle device_handle,
|
||||
amdsmi_status_t amdsmi_dev_get_fan_speed(amdsmi_device_handle device_handle,
|
||||
uint32_t sensor_ind, int64_t *speed);
|
||||
|
||||
/**
|
||||
@@ -1980,7 +1980,7 @@ amdsmi_status_t amdsmi_dev_fan_speed_get(amdsmi_device_handle device_handle,
|
||||
*
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t amdsmi_dev_fan_speed_max_get(amdsmi_device_handle device_handle,
|
||||
amdsmi_status_t amdsmi_dev_get_fan_speed_max(amdsmi_device_handle device_handle,
|
||||
uint32_t sensor_ind, uint64_t *max_speed);
|
||||
|
||||
/**
|
||||
@@ -2009,7 +2009,7 @@ amdsmi_status_t amdsmi_dev_fan_speed_max_get(amdsmi_device_handle device_handle,
|
||||
*
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t amdsmi_dev_temp_metric_get(amdsmi_device_handle device_handle, uint32_t sensor_type,
|
||||
amdsmi_status_t amdsmi_dev_get_temp_metric(amdsmi_device_handle device_handle, uint32_t sensor_type,
|
||||
amdsmi_temperature_metric_t metric, int64_t *temperature);
|
||||
|
||||
/**
|
||||
@@ -2038,7 +2038,7 @@ amdsmi_status_t amdsmi_dev_temp_metric_get(amdsmi_device_handle device_handle, u
|
||||
*
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t amdsmi_dev_volt_metric_get(amdsmi_device_handle device_handle,
|
||||
amdsmi_status_t amdsmi_dev_get_volt_metric(amdsmi_device_handle device_handle,
|
||||
amdsmi_voltage_type_t sensor_type,
|
||||
amdsmi_voltage_metric_t metric, int64_t *voltage);
|
||||
|
||||
@@ -2062,7 +2062,7 @@ amdsmi_status_t amdsmi_dev_volt_metric_get(amdsmi_device_handle device_handle,
|
||||
*
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t amdsmi_dev_fan_reset(amdsmi_device_handle device_handle, uint32_t sensor_ind);
|
||||
amdsmi_status_t amdsmi_dev_reset_fan(amdsmi_device_handle device_handle, uint32_t sensor_ind);
|
||||
|
||||
/**
|
||||
* @brief Set the fan speed for the specified device with the provided speed,
|
||||
@@ -2084,7 +2084,7 @@ amdsmi_status_t amdsmi_dev_fan_reset(amdsmi_device_handle device_handle, uint32_
|
||||
*
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t amdsmi_dev_fan_speed_set(amdsmi_device_handle device_handle,
|
||||
amdsmi_status_t amdsmi_dev_set_fan_speed(amdsmi_device_handle device_handle,
|
||||
uint32_t sensor_ind, uint64_t speed);
|
||||
|
||||
/** @} End PhysCont */
|
||||
@@ -2116,7 +2116,7 @@ amdsmi_status_t amdsmi_dev_fan_speed_set(amdsmi_device_handle device_handle,
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t
|
||||
amdsmi_dev_busy_percent_get(amdsmi_device_handle device_handle, uint32_t *busy_percent);
|
||||
amdsmi_dev_get_busy_percent(amdsmi_device_handle device_handle, uint32_t *busy_percent);
|
||||
|
||||
/**
|
||||
* @brief Get coarse grain utilization counter of the specified device
|
||||
@@ -2143,7 +2143,7 @@ amdsmi_dev_busy_percent_get(amdsmi_device_handle device_handle, uint32_t *busy_p
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t
|
||||
amdsmi_utilization_count_get(amdsmi_device_handle device_handle,
|
||||
amdsmi_get_utilization_count(amdsmi_device_handle device_handle,
|
||||
amdsmi_utilization_counter_t utilization_counters[],
|
||||
uint32_t count,
|
||||
uint64_t *timestamp);
|
||||
@@ -2194,7 +2194,7 @@ amdsmi_status_t amdsmi_get_pcie_link_caps(amdsmi_device_handle device_handle, am
|
||||
*
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t amdsmi_dev_perf_level_get(amdsmi_device_handle device_handle,
|
||||
amdsmi_status_t amdsmi_dev_get_perf_level(amdsmi_device_handle device_handle,
|
||||
amdsmi_dev_perf_level_t *perf);
|
||||
|
||||
/**
|
||||
@@ -2215,7 +2215,7 @@ amdsmi_status_t amdsmi_dev_perf_level_get(amdsmi_device_handle device_handle,
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t
|
||||
amdsmi_perf_determinism_mode_set(amdsmi_device_handle device_handle, uint64_t clkvalue);
|
||||
amdsmi_set_perf_determinism_mode(amdsmi_device_handle device_handle, uint64_t clkvalue);
|
||||
|
||||
/**
|
||||
* @brief Get the overdrive percent associated with the device with provided
|
||||
@@ -2237,7 +2237,7 @@ amdsmi_perf_determinism_mode_set(amdsmi_device_handle device_handle, uint64_t cl
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
|
||||
amdsmi_status_t amdsmi_dev_overdrive_level_get(amdsmi_device_handle device_handle, uint32_t *od);
|
||||
amdsmi_status_t amdsmi_dev_get_overdrive_level(amdsmi_device_handle device_handle, uint32_t *od);
|
||||
|
||||
/**
|
||||
* @brief Get the list of possible system clock speeds of device for a
|
||||
@@ -2258,7 +2258,7 @@ amdsmi_status_t amdsmi_dev_overdrive_level_get(amdsmi_device_handle device_handl
|
||||
*
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t amdsmi_dev_gpu_clk_freq_get(amdsmi_device_handle device_handle,
|
||||
amdsmi_status_t amdsmi_dev_get_gpu_clk_freq(amdsmi_device_handle device_handle,
|
||||
amdsmi_clk_type_t clk_type, amdsmi_frequencies_t *f);
|
||||
|
||||
/**
|
||||
@@ -2270,7 +2270,7 @@ amdsmi_status_t amdsmi_dev_gpu_clk_freq_get(amdsmi_device_handle device_handle,
|
||||
*
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t amdsmi_dev_gpu_reset(amdsmi_device_handle device_handle);
|
||||
amdsmi_status_t amdsmi_dev_reset_gpu(amdsmi_device_handle device_handle);
|
||||
|
||||
/**
|
||||
* @brief This function retrieves the voltage/frequency curve information
|
||||
@@ -2289,7 +2289,7 @@ amdsmi_status_t amdsmi_dev_gpu_reset(amdsmi_device_handle device_handle);
|
||||
*
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t amdsmi_dev_od_volt_info_get(amdsmi_device_handle device_handle,
|
||||
amdsmi_status_t amdsmi_dev_get_od_volt_info(amdsmi_device_handle device_handle,
|
||||
amdsmi_od_volt_freq_data_t *odv);
|
||||
|
||||
/**
|
||||
@@ -2309,7 +2309,7 @@ amdsmi_status_t amdsmi_dev_od_volt_info_get(amdsmi_device_handle device_handle,
|
||||
*
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t amdsmi_dev_gpu_metrics_info_get(amdsmi_device_handle device_handle,
|
||||
amdsmi_status_t amdsmi_dev_get_gpu_metrics_info(amdsmi_device_handle device_handle,
|
||||
amdsmi_gpu_metrics_t *pgpu_metrics);
|
||||
|
||||
/**
|
||||
@@ -2331,7 +2331,7 @@ amdsmi_status_t amdsmi_dev_gpu_metrics_info_get(amdsmi_device_handle device_hand
|
||||
*
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t amdsmi_dev_clk_range_set(amdsmi_device_handle device_handle, uint64_t minclkvalue,
|
||||
amdsmi_status_t amdsmi_dev_set_clk_range(amdsmi_device_handle device_handle, uint64_t minclkvalue,
|
||||
uint64_t maxclkvalue,
|
||||
amdsmi_clk_type_t clkType);
|
||||
|
||||
@@ -2354,7 +2354,7 @@ amdsmi_status_t amdsmi_dev_clk_range_set(amdsmi_device_handle device_handle, uin
|
||||
*
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t amdsmi_dev_od_clk_info_set(amdsmi_device_handle device_handle, amdsmi_freq_ind_t level,
|
||||
amdsmi_status_t amdsmi_dev_set_od_clk_info(amdsmi_device_handle device_handle, amdsmi_freq_ind_t level,
|
||||
uint64_t clkvalue,
|
||||
amdsmi_clk_type_t clkType);
|
||||
|
||||
@@ -2376,7 +2376,7 @@ amdsmi_status_t amdsmi_dev_od_clk_info_set(amdsmi_device_handle device_handle, a
|
||||
*
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t amdsmi_dev_od_volt_info_set(amdsmi_device_handle device_handle, uint32_t vpoint,
|
||||
amdsmi_status_t amdsmi_dev_set_od_volt_info(amdsmi_device_handle device_handle, uint32_t vpoint,
|
||||
uint64_t clkvalue, uint64_t voltvalue);
|
||||
|
||||
/**
|
||||
@@ -2392,7 +2392,7 @@ amdsmi_status_t amdsmi_dev_od_volt_info_set(amdsmi_device_handle device_handle,
|
||||
* be written to @p buffer in @p num_regions.
|
||||
*
|
||||
* The number of regions to expect this function provide (@p num_regions) can
|
||||
* be obtained by calling ::amdsmi_dev_od_volt_info_get().
|
||||
* be obtained by calling :: amdsmi_dev_get_od_volt_info().
|
||||
*
|
||||
* @param[in] device_handle a device handle
|
||||
*
|
||||
@@ -2414,7 +2414,7 @@ amdsmi_status_t amdsmi_dev_od_volt_info_set(amdsmi_device_handle device_handle,
|
||||
*
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t amdsmi_dev_od_volt_curve_regions_get(amdsmi_device_handle device_handle,
|
||||
amdsmi_status_t amdsmi_dev_get_od_volt_curve_regions(amdsmi_device_handle device_handle,
|
||||
uint32_t *num_regions, amdsmi_freq_volt_region_t *buffer);
|
||||
|
||||
/**
|
||||
@@ -2449,7 +2449,7 @@ amdsmi_status_t amdsmi_dev_od_volt_curve_regions_get(amdsmi_device_handle device
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t
|
||||
amdsmi_dev_power_profile_presets_get(amdsmi_device_handle device_handle, uint32_t sensor_ind,
|
||||
amdsmi_dev_get_power_profile_presets(amdsmi_device_handle device_handle, uint32_t sensor_ind,
|
||||
amdsmi_power_profile_status_t *status);
|
||||
|
||||
/** @} End PerfQuer */
|
||||
@@ -2465,7 +2465,7 @@ amdsmi_dev_power_profile_presets_get(amdsmi_device_handle device_handle, uint32_
|
||||
* @brief Set the PowerPlay performance level associated with the device with
|
||||
* provided device handle with the provided value.
|
||||
*
|
||||
* @deprecated ::amdsmi_dev_perf_level_set_v1() is preferred, with an
|
||||
* @deprecated :: amdsmi_dev_set_perf_level_v1() is preferred, with an
|
||||
* interface that more closely matches the rest of the amd_smi API.
|
||||
*
|
||||
* @details Given a device handle @p device_handle and an ::amdsmi_dev_perf_level_t @p
|
||||
@@ -2481,7 +2481,7 @@ amdsmi_dev_power_profile_presets_get(amdsmi_device_handle device_handle, uint32_
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t
|
||||
amdsmi_dev_perf_level_set(amdsmi_device_handle device_handle, amdsmi_dev_perf_level_t perf_lvl);
|
||||
amdsmi_dev_set_perf_level(amdsmi_device_handle device_handle, amdsmi_dev_perf_level_t perf_lvl);
|
||||
|
||||
/**
|
||||
* @brief Set the PowerPlay performance level associated with the device with
|
||||
@@ -2500,13 +2500,13 @@ amdsmi_dev_perf_level_set(amdsmi_device_handle device_handle, amdsmi_dev_perf_le
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t
|
||||
amdsmi_dev_perf_level_set_v1(amdsmi_device_handle device_handle, amdsmi_dev_perf_level_t perf_lvl);
|
||||
amdsmi_dev_set_perf_level_v1(amdsmi_device_handle device_handle, amdsmi_dev_perf_level_t perf_lvl);
|
||||
|
||||
/**
|
||||
* @brief Set the overdrive percent associated with the device with provided
|
||||
* device handle with the provided value. See details for WARNING.
|
||||
*
|
||||
* @deprecated This function is deprecated. ::amdsmi_dev_overdrive_level_set_v1
|
||||
* @deprecated This function is deprecated. :: amdsmi_dev_set_overdrive_level_v1
|
||||
* has the same functionaltiy, with an interface that more closely
|
||||
* matches the rest of the amd_smi API.
|
||||
*
|
||||
@@ -2541,7 +2541,7 @@ amdsmi_dev_perf_level_set_v1(amdsmi_device_handle device_handle, amdsmi_dev_perf
|
||||
*
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t amdsmi_dev_overdrive_level_set(amdsmi_device_handle device_handle, uint32_t od);
|
||||
amdsmi_status_t amdsmi_dev_set_overdrive_level(amdsmi_device_handle device_handle, uint32_t od);
|
||||
|
||||
/**
|
||||
* @brief Set the overdrive percent associated with the device with provided
|
||||
@@ -2580,7 +2580,7 @@ amdsmi_status_t amdsmi_dev_overdrive_level_set(amdsmi_device_handle device_handl
|
||||
*
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t amdsmi_dev_overdrive_level_set_v1(amdsmi_device_handle device_handle, uint32_t od);
|
||||
amdsmi_status_t amdsmi_dev_set_overdrive_level_v1(amdsmi_device_handle device_handle, uint32_t od);
|
||||
|
||||
/**
|
||||
* @brief Control the set of allowed frequencies that can be used for the
|
||||
@@ -2590,7 +2590,7 @@ amdsmi_status_t amdsmi_dev_overdrive_level_set_v1(amdsmi_device_handle device_ha
|
||||
* 64 bit bitmask @p freq_bitmask, this function will limit the set of
|
||||
* allowable frequencies. If a bit in @p freq_bitmask has a value of 1, then
|
||||
* the frequency (as ordered in an ::amdsmi_frequencies_t returned by
|
||||
* amdsmi_dev_gpu_clk_freq_get()) corresponding to that bit index will be
|
||||
* amdsmi_dev_get_gpu_clk_freq()) corresponding to that bit index will be
|
||||
* allowed.
|
||||
*
|
||||
* This function will change the performance level to
|
||||
@@ -2614,7 +2614,7 @@ amdsmi_status_t amdsmi_dev_overdrive_level_set_v1(amdsmi_device_handle device_ha
|
||||
*
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t amdsmi_dev_gpu_clk_freq_set(amdsmi_device_handle device_handle,
|
||||
amdsmi_status_t amdsmi_dev_set_clk_freq(amdsmi_device_handle device_handle,
|
||||
amdsmi_clk_type_t clk_type, uint64_t freq_bitmask);
|
||||
|
||||
/** @} End PerfCont */
|
||||
@@ -2638,7 +2638,7 @@ amdsmi_status_t amdsmi_dev_gpu_clk_freq_set(amdsmi_device_handle device_handle,
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t
|
||||
amdsmi_version_get(amdsmi_version_t *version);
|
||||
amdsmi_get_version(amdsmi_version_t *version);
|
||||
|
||||
/**
|
||||
* @brief Get the driver version string for the current system.
|
||||
@@ -2664,7 +2664,7 @@ amdsmi_version_get(amdsmi_version_t *version);
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t
|
||||
amdsmi_version_str_get(amdsmi_sw_component_t component, char *ver_str,
|
||||
amdsmi_get_version_str(amdsmi_sw_component_t component, char *ver_str,
|
||||
uint32_t len);
|
||||
|
||||
/** @} End VersQuer */
|
||||
@@ -2697,7 +2697,7 @@ amdsmi_version_str_get(amdsmi_sw_component_t component, char *ver_str,
|
||||
*
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t amdsmi_dev_ecc_count_get(amdsmi_device_handle device_handle,
|
||||
amdsmi_status_t amdsmi_dev_get_ecc_count(amdsmi_device_handle device_handle,
|
||||
amdsmi_gpu_block_t block, amdsmi_error_count_t *ec);
|
||||
|
||||
/**
|
||||
@@ -2724,7 +2724,7 @@ amdsmi_status_t amdsmi_dev_ecc_count_get(amdsmi_device_handle device_handle,
|
||||
*
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t amdsmi_dev_ecc_enabled_get(amdsmi_device_handle device_handle,
|
||||
amdsmi_status_t amdsmi_dev_get_ecc_enabled(amdsmi_device_handle device_handle,
|
||||
uint64_t *enabled_blocks);
|
||||
|
||||
/**
|
||||
@@ -2748,7 +2748,7 @@ amdsmi_status_t amdsmi_dev_ecc_enabled_get(amdsmi_device_handle device_handle,
|
||||
*
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t amdsmi_dev_ecc_status_get(amdsmi_device_handle device_handle, amdsmi_gpu_block_t block,
|
||||
amdsmi_status_t amdsmi_dev_get_ecc_status(amdsmi_device_handle device_handle, amdsmi_gpu_block_t block,
|
||||
amdsmi_ras_err_state_t *state);
|
||||
|
||||
/**
|
||||
@@ -2787,24 +2787,24 @@ amdsmi_status_string(amdsmi_status_t status, const char **status_string);
|
||||
* (::amdsmi_event_group_t) are supported for a given device. Assuming a device
|
||||
* supports a given event type, we can then check to see if there are counters
|
||||
* available to count a specific event with
|
||||
* ::amdsmi_counter_available_counters_get(). Counters may be occupied by other
|
||||
* :: amdsmi_counter_get_available_counters(). Counters may be occupied by other
|
||||
* perf based programs.
|
||||
*
|
||||
* Once it is determined that events are supported and counters are available,
|
||||
* an event counter can be created/destroyed and controlled.
|
||||
*
|
||||
* ::amdsmi_dev_counter_create() allocates internal data structures that will be
|
||||
* ::amdsmi_dev_create_counter() allocates internal data structures that will be
|
||||
* used to used to control the event counter, and return a handle to this data
|
||||
* structure.
|
||||
*
|
||||
* Once an event counter handle is obtained, the event counter can be
|
||||
* controlled (i.e., started, stopped,...) with ::amdsmi_counter_control() by
|
||||
* controlled (i.e., started, stopped,...) with ::amdsmi_control_counter() by
|
||||
* passing ::amdsmi_counter_command_t commands. ::AMDSMI_CNTR_CMD_START starts an
|
||||
* event counter and ::AMDSMI_CNTR_CMD_STOP stops a counter.
|
||||
* ::amdsmi_counter_read() reads an event counter.
|
||||
* ::amdsmi_read_counter() reads an event counter.
|
||||
*
|
||||
* Once the counter is no longer needed, the resources it uses should be freed
|
||||
* by calling ::amdsmi_dev_counter_destroy().
|
||||
* by calling ::amdsmi_dev_destroy_counter().
|
||||
*
|
||||
*
|
||||
* Important Notes about Counter Values
|
||||
@@ -2812,12 +2812,12 @@ amdsmi_status_string(amdsmi_status_t status, const char **status_string);
|
||||
* - A running "absolute" counter is kept internally. For the discussion that
|
||||
* follows, we will call the internal counter value at time @a t @a
|
||||
* val<sub>t</sub>
|
||||
* - Issuing ::AMDSMI_CNTR_CMD_START or calling ::amdsmi_counter_read(), causes
|
||||
* - Issuing ::AMDSMI_CNTR_CMD_START or calling ::amdsmi_read_counter(), causes
|
||||
* AMDSMI (in kernel) to internally record the current absolute counter value
|
||||
* - ::amdsmi_counter_read() returns the number of events that have occurred
|
||||
* - ::amdsmi_read_counter() returns the number of events that have occurred
|
||||
* since the previously recorded value (ie, a relative value,
|
||||
* @a val<sub>t</sub> - val<sub>t-1</sub>) from the issuing of
|
||||
* ::AMDSMI_CNTR_CMD_START or calling ::amdsmi_counter_read()
|
||||
* ::AMDSMI_CNTR_CMD_START or calling ::amdsmi_read_counter()
|
||||
*
|
||||
* Example of event counting sequence:
|
||||
*
|
||||
@@ -2834,7 +2834,7 @@ amdsmi_status_string(amdsmi_status_t status, const char **status_string);
|
||||
* // See if there are counters available for device dv_ind for event
|
||||
* // AMDSMI_EVNT_GRP_XGMI
|
||||
*
|
||||
* ret = amdsmi_counter_available_counters_get(dv_ind,
|
||||
* ret = amdsmi_counter_get_available_counters(dv_ind,
|
||||
* AMDSMI_EVNT_GRP_XGMI, &counters_available);
|
||||
*
|
||||
* // Assuming AMDSMI_EVNT_GRP_XGMI is supported and there is at least 1
|
||||
@@ -2843,30 +2843,30 @@ amdsmi_status_string(amdsmi_status_t status, const char **status_string);
|
||||
* // AMDSMI_EVNT_XGMI_0_BEATS_TX) and get the handle
|
||||
* // (amdsmi_event_handle_t).
|
||||
*
|
||||
* ret = amdsmi_dev_counter_create(dv_ind, AMDSMI_EVNT_XGMI_0_BEATS_TX,
|
||||
* ret = amdsmi_dev_create_counter(dv_ind, AMDSMI_EVNT_XGMI_0_BEATS_TX,
|
||||
* &evnt_handle);
|
||||
*
|
||||
* // A program that generates the events of interest can be started
|
||||
* // immediately before or after starting the counters.
|
||||
* // Start counting:
|
||||
* ret = amdsmi_counter_control(evnt_handle, AMDSMI_CNTR_CMD_START, NULL);
|
||||
* ret = amdsmi_control_counter(evnt_handle, AMDSMI_CNTR_CMD_START, NULL);
|
||||
*
|
||||
* // Wait...
|
||||
*
|
||||
* // Get the number of events since AMDSMI_CNTR_CMD_START was issued:
|
||||
* ret = amdsmi_counter_read(amdsmi_event_handle_t evt_handle, &value)
|
||||
* ret = amdsmi_read_counter(amdsmi_event_handle_t evt_handle, &value)
|
||||
*
|
||||
* // Wait...
|
||||
*
|
||||
* // Get the number of events since amdsmi_counter_read() was last called:
|
||||
* ret = amdsmi_counter_read(amdsmi_event_handle_t evt_handle, &value)
|
||||
* // Get the number of events since amdsmi_read_counter() was last called:
|
||||
* ret = amdsmi_read_counter(amdsmi_event_handle_t evt_handle, &value)
|
||||
*
|
||||
* // Stop counting.
|
||||
* ret = amdsmi_counter_control(evnt_handle, AMDSMI_CNTR_CMD_STOP, NULL);
|
||||
* ret = amdsmi_control_counter(evnt_handle, AMDSMI_CNTR_CMD_STOP, NULL);
|
||||
*
|
||||
* // Release all resources (e.g., counter and memory resources) associated
|
||||
* with evnt_handle.
|
||||
* ret = amdsmi_dev_counter_destroy(evnt_handle);
|
||||
* ret = amdsmi_dev_destroy_counter(evnt_handle);
|
||||
* @endcode
|
||||
* @{
|
||||
*/
|
||||
@@ -2895,7 +2895,7 @@ amdsmi_dev_counter_group_supported(amdsmi_device_handle device_handle, amdsmi_ev
|
||||
* with a device handle of @p device_handle, and write a handle to the object to the
|
||||
* memory location pointed to by @p evnt_handle. @p evnt_handle can be used
|
||||
* with other performance event operations. The handle should be deallocated
|
||||
* with ::amdsmi_dev_counter_destroy() when no longer needed.
|
||||
* with ::amdsmi_dev_destroy_counter() when no longer needed.
|
||||
*
|
||||
* @note This function requires root access
|
||||
*
|
||||
@@ -2913,7 +2913,7 @@ amdsmi_dev_counter_group_supported(amdsmi_device_handle device_handle, amdsmi_ev
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t
|
||||
amdsmi_dev_counter_create(amdsmi_device_handle device_handle, amdsmi_event_type_t type,
|
||||
amdsmi_dev_create_counter(amdsmi_device_handle device_handle, amdsmi_event_type_t type,
|
||||
amdsmi_event_handle_t *evnt_handle);
|
||||
|
||||
/**
|
||||
@@ -2929,7 +2929,7 @@ amdsmi_dev_counter_create(amdsmi_device_handle device_handle, amdsmi_event_type_
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t
|
||||
amdsmi_dev_counter_destroy(amdsmi_event_handle_t evnt_handle);
|
||||
amdsmi_dev_destroy_counter(amdsmi_event_handle_t evnt_handle);
|
||||
|
||||
/**
|
||||
* @brief Issue performance counter control commands
|
||||
@@ -2948,7 +2948,7 @@ amdsmi_dev_counter_destroy(amdsmi_event_handle_t evnt_handle);
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t
|
||||
amdsmi_counter_control(amdsmi_event_handle_t evt_handle,
|
||||
amdsmi_control_counter(amdsmi_event_handle_t evt_handle,
|
||||
amdsmi_counter_command_t cmd, void *cmd_args);
|
||||
|
||||
/**
|
||||
@@ -2968,7 +2968,7 @@ amdsmi_counter_control(amdsmi_event_handle_t evt_handle,
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t
|
||||
amdsmi_counter_read(amdsmi_event_handle_t evt_handle,
|
||||
amdsmi_read_counter(amdsmi_event_handle_t evt_handle,
|
||||
amdsmi_counter_value_t *value);
|
||||
|
||||
/**
|
||||
@@ -2989,7 +2989,7 @@ amdsmi_counter_read(amdsmi_event_handle_t evt_handle,
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t
|
||||
amdsmi_counter_available_counters_get(amdsmi_device_handle device_handle,
|
||||
amdsmi_counter_get_available_counters(amdsmi_device_handle device_handle,
|
||||
amdsmi_event_group_t grp, uint32_t *available);
|
||||
|
||||
/** @} End PerfCntr */
|
||||
@@ -3029,7 +3029,7 @@ amdsmi_counter_available_counters_get(amdsmi_device_handle device_handle,
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t
|
||||
amdsmi_compute_process_info_get(amdsmi_process_info_t *procs, uint32_t *num_items);
|
||||
amdsmi_get_compute_process_info(amdsmi_process_info_t *procs, uint32_t *num_items);
|
||||
|
||||
/**
|
||||
* @brief Get process information about a specific process
|
||||
@@ -3048,7 +3048,7 @@ amdsmi_compute_process_info_get(amdsmi_process_info_t *procs, uint32_t *num_item
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t
|
||||
amdsmi_compute_process_info_by_pid_get(uint32_t pid, amdsmi_process_info_t *proc);
|
||||
amdsmi_get_compute_process_info_by_pid(uint32_t pid, amdsmi_process_info_t *proc);
|
||||
|
||||
/**
|
||||
* @brief Get the device indices currently being used by a process
|
||||
@@ -3080,7 +3080,7 @@ amdsmi_compute_process_info_by_pid_get(uint32_t pid, amdsmi_process_info_t *proc
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t
|
||||
amdsmi_compute_process_gpus_get(uint32_t pid, uint32_t *dv_indices,
|
||||
amdsmi_get_compute_process_gpus(uint32_t pid, uint32_t *dv_indices,
|
||||
uint32_t *num_devices);
|
||||
|
||||
/** @} End SysInfo */
|
||||
@@ -3125,7 +3125,7 @@ amdsmi_dev_xgmi_error_status(amdsmi_device_handle device_handle, amdsmi_xgmi_sta
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t
|
||||
amdsmi_dev_xgmi_error_reset(amdsmi_device_handle device_handle);
|
||||
amdsmi_dev_reset_xgmi_error(amdsmi_device_handle device_handle);
|
||||
|
||||
/** @} End SysInfo */
|
||||
|
||||
@@ -3197,7 +3197,7 @@ amdsmi_topo_get_link_weight(amdsmi_device_handle device_handle_src, amdsmi_devic
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t
|
||||
amdsmi_minmax_bandwidth_get(amdsmi_device_handle device_handle_src, amdsmi_device_handle device_handle_dst,
|
||||
amdsmi_get_minmax_bandwidth(amdsmi_device_handle device_handle_src, amdsmi_device_handle device_handle_dst,
|
||||
uint64_t *min_bandwidth, uint64_t *max_bandwidth);
|
||||
|
||||
/**
|
||||
@@ -3262,14 +3262,14 @@ amdsmi_is_P2P_accessible(amdsmi_device_handle device_handle_src, amdsmi_device_h
|
||||
*
|
||||
* Some functions have several variations ("variants") where some variants are
|
||||
* supported and others are not. For example, on a given device,
|
||||
* ::amdsmi_dev_temp_metric_get may support some types of temperature metrics
|
||||
* :: amdsmi_dev_get_temp_metric may support some types of temperature metrics
|
||||
* (e.g., ::AMDSMI_TEMP_CRITICAL_HYST), but not others
|
||||
* (e.g., ::AMDSMI_TEMP_EMERGENCY).
|
||||
*
|
||||
* In addition to a top level of variant support for a function, a function
|
||||
* may have varying support for monitors/sensors. These are considered
|
||||
* "sub-variants" in functions described in this section. Continuing the
|
||||
* ::amdsmi_dev_temp_metric_get example, if variant
|
||||
* :: amdsmi_dev_get_temp_metric example, if variant
|
||||
* ::AMDSMI_TEMP_CRITICAL_HYST is supported, perhaps
|
||||
* only the sub-variant sensors ::AMDSMI_TEMP_TYPE_EDGE
|
||||
* and ::AMDSMI_TEMP_TYPE_EDGE are supported, but not
|
||||
@@ -3301,17 +3301,17 @@ amdsmi_is_P2P_accessible(amdsmi_device_handle device_handle_src, amdsmi_device_h
|
||||
* // ... ...
|
||||
*
|
||||
* std::cout << "Supported AMDSMI Functions:" << std::endl; *
|
||||
* err = amdsmi_dev_supported_func_iterator_open(device, &iter_handle);
|
||||
* err = amdsmi_dev_open_supported_func_iterator(device, &iter_handle);
|
||||
*
|
||||
* while (1) {
|
||||
* err = amdsmi_func_iter_value_get(iter_handle, &value);
|
||||
* err = amdsmi_get_func_iter_value(iter_handle, &value);
|
||||
* std::cout << "Function Name: " << value.name << std::endl;
|
||||
*
|
||||
* err = amdsmi_dev_supported_variant_iterator_open(iter_handle, &var_iter);
|
||||
* err = amdsmi_dev_open_supported_variant_iterator(iter_handle, &var_iter);
|
||||
* if (err != AMDSMI_STATUS_NO_DATA) {
|
||||
* std::cout << "\tVariants/Monitors: ";
|
||||
* while (1) {
|
||||
* err = amdsmi_func_iter_value_get(var_iter, &value);
|
||||
* err = amdsmi_get_func_iter_value(var_iter, &value);
|
||||
* if (value.id == AMDSMI_DEFAULT_VARIANT) {
|
||||
* std::cout << "Default Variant ";
|
||||
* } else {
|
||||
@@ -3320,25 +3320,25 @@ amdsmi_is_P2P_accessible(amdsmi_device_handle device_handle_src, amdsmi_device_h
|
||||
* std::cout << " (";
|
||||
*
|
||||
* err =
|
||||
* amdsmi_dev_supported_variant_iterator_open(var_iter, &sub_var_iter);
|
||||
* amdsmi_dev_open_supported_variant_iterator(var_iter, &sub_var_iter);
|
||||
* if (err != AMDSMI_STATUS_NO_DATA) {
|
||||
*
|
||||
* while (1) {
|
||||
* err = amdsmi_func_iter_value_get(sub_var_iter, &value);
|
||||
* err = amdsmi_get_func_iter_value(sub_var_iter, &value);
|
||||
* std::cout << value.id << ", ";
|
||||
*
|
||||
* err = amdsmi_func_iter_next(sub_var_iter);
|
||||
* err = amdsmi_next_func_iter(sub_var_iter);
|
||||
*
|
||||
* if (err == AMDSMI_STATUS_NO_DATA) {
|
||||
* break;
|
||||
* }
|
||||
* }
|
||||
* err = amdsmi_dev_supported_func_iterator_close(&sub_var_iter);
|
||||
* err = amdsmi_dev_close_supported_func_iterator(&sub_var_iter);
|
||||
* }
|
||||
*
|
||||
* std::cout << "), ";
|
||||
*
|
||||
* err = amdsmi_func_iter_next(var_iter);
|
||||
* err = amdsmi_next_func_iter(var_iter);
|
||||
*
|
||||
* if (err == AMDSMI_STATUS_NO_DATA) {
|
||||
* break;
|
||||
@@ -3346,16 +3346,16 @@ amdsmi_is_P2P_accessible(amdsmi_device_handle device_handle_src, amdsmi_device_h
|
||||
* }
|
||||
* std::cout << std::endl;
|
||||
*
|
||||
* err = amdsmi_dev_supported_func_iterator_close(&var_iter);
|
||||
* err = amdsmi_dev_close_supported_func_iterator(&var_iter);
|
||||
* }
|
||||
*
|
||||
* err = amdsmi_func_iter_next(iter_handle);
|
||||
* err = amdsmi_next_func_iter(iter_handle);
|
||||
*
|
||||
* if (err == AMDSMI_STATUS_NO_DATA) {
|
||||
* break;
|
||||
* }
|
||||
* }
|
||||
* err = amdsmi_dev_supported_func_iterator_close(&iter_handle);
|
||||
* err = amdsmi_dev_close_supported_func_iterator(&iter_handle);
|
||||
* }
|
||||
* @endcode
|
||||
*
|
||||
@@ -3370,9 +3370,9 @@ amdsmi_is_P2P_accessible(amdsmi_device_handle device_handle_src, amdsmi_device_h
|
||||
* handle can be used to iterate through all the supported functions.
|
||||
*
|
||||
* Note that although this function takes in @p device_handle as an argument,
|
||||
* ::amdsmi_dev_supported_func_iterator_open itself will not be among the
|
||||
* ::amdsmi_dev_open_supported_func_iterator itself will not be among the
|
||||
* functions listed as supported. This is because
|
||||
* ::amdsmi_dev_supported_func_iterator_open does not depend on hardware or
|
||||
* ::amdsmi_dev_open_supported_func_iterator does not depend on hardware or
|
||||
* driver support and should always be supported.
|
||||
*
|
||||
* @param[in] device_handle a device handle of device for which support information is
|
||||
@@ -3384,7 +3384,7 @@ amdsmi_is_P2P_accessible(amdsmi_device_handle device_handle_src, amdsmi_device_h
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t
|
||||
amdsmi_dev_supported_func_iterator_open(amdsmi_device_handle device_handle,
|
||||
amdsmi_dev_open_supported_func_iterator(amdsmi_device_handle device_handle,
|
||||
amdsmi_func_id_iter_handle_t *handle);
|
||||
|
||||
/**
|
||||
@@ -3394,13 +3394,13 @@ amdsmi_dev_supported_func_iterator_open(amdsmi_device_handle device_handle,
|
||||
* write a function iterator handle to the caller-provided memory pointed to
|
||||
* by @p var_iter. This handle can be used to iterate through all the supported
|
||||
* variants of the provided handle. @p obj_h may be a handle to a function
|
||||
* object, as provided by a call to ::amdsmi_dev_supported_func_iterator_open, or
|
||||
* object, as provided by a call to ::amdsmi_dev_open_supported_func_iterator, or
|
||||
* it may be a variant itself (from a call to
|
||||
* ::amdsmi_dev_supported_variant_iterator_open), it which case @p var_iter will
|
||||
* ::amdsmi_dev_open_supported_variant_iterator), it which case @p var_iter will
|
||||
* be an iterator of the sub-variants of @p obj_h (e.g., monitors).
|
||||
*
|
||||
* This call allocates a small amount of memory to @p var_iter. To free this memory
|
||||
* ::amdsmi_dev_supported_func_iterator_close should be called on the returned
|
||||
* ::amdsmi_dev_close_supported_func_iterator should be called on the returned
|
||||
* iterator handle @p var_iter when it is no longer needed.
|
||||
*
|
||||
* @param[in] obj_h an iterator handle for which the variants are being requested
|
||||
@@ -3411,7 +3411,7 @@ amdsmi_dev_supported_func_iterator_open(amdsmi_device_handle device_handle,
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t
|
||||
amdsmi_dev_supported_variant_iterator_open(amdsmi_func_id_iter_handle_t obj_h,
|
||||
amdsmi_dev_open_supported_variant_iterator(amdsmi_func_id_iter_handle_t obj_h,
|
||||
amdsmi_func_id_iter_handle_t *var_iter);
|
||||
|
||||
/**
|
||||
@@ -3430,7 +3430,7 @@ amdsmi_dev_supported_variant_iterator_open(amdsmi_func_id_iter_handle_t obj_h,
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t
|
||||
amdsmi_func_iter_next(amdsmi_func_id_iter_handle_t handle);
|
||||
amdsmi_next_func_iter(amdsmi_func_id_iter_handle_t handle);
|
||||
|
||||
/**
|
||||
* @brief Close a variant iterator handle
|
||||
@@ -3443,7 +3443,7 @@ amdsmi_func_iter_next(amdsmi_func_id_iter_handle_t handle);
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t
|
||||
amdsmi_dev_supported_func_iterator_close(amdsmi_func_id_iter_handle_t *handle);
|
||||
amdsmi_dev_close_supported_func_iterator(amdsmi_func_id_iter_handle_t *handle);
|
||||
|
||||
/**
|
||||
* @brief Get the value associated with a function/variant iterator
|
||||
@@ -3463,7 +3463,7 @@ amdsmi_dev_supported_func_iterator_close(amdsmi_func_id_iter_handle_t *handle);
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t
|
||||
amdsmi_func_iter_value_get(amdsmi_func_id_iter_handle_t handle,
|
||||
amdsmi_get_func_iter_value(amdsmi_func_id_iter_handle_t handle,
|
||||
amdsmi_func_id_value_t *value);
|
||||
|
||||
/** @} End APISupport */
|
||||
@@ -3480,7 +3480,7 @@ amdsmi_func_iter_value_get(amdsmi_func_id_iter_handle_t handle,
|
||||
*
|
||||
* @details This function prepares to collect events for the GPU with device
|
||||
* ID @p device_handle, by initializing any required system parameters. This call
|
||||
* may open files which will remain open until ::amdsmi_event_notification_stop()
|
||||
* may open files which will remain open until ::amdsmi_stop_event_notification()
|
||||
* is called.
|
||||
*
|
||||
* @param device_handle a device handle corresponding to the device on which to
|
||||
@@ -3489,7 +3489,7 @@ amdsmi_func_iter_value_get(amdsmi_func_id_iter_handle_t handle,
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t
|
||||
amdsmi_event_notification_init(amdsmi_device_handle device_handle);
|
||||
amdsmi_init_event_notification(amdsmi_device_handle device_handle);
|
||||
|
||||
/**
|
||||
* @brief Specify which events to collect for a device
|
||||
@@ -3512,13 +3512,13 @@ amdsmi_event_notification_init(amdsmi_device_handle device_handle);
|
||||
* AMDSMI_EVT_NOTIF_THERMAL_THROTTLE event (which has a value of 2).
|
||||
*
|
||||
* @note ::AMDSMI_STATUS_INIT_ERROR is returned if
|
||||
* ::amdsmi_event_notification_init() has not been called before a call to this
|
||||
* ::amdsmi_init_event_notification() has not been called before a call to this
|
||||
* function
|
||||
*
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t
|
||||
amdsmi_event_notification_mask_set(amdsmi_device_handle device_handle, uint64_t mask);
|
||||
amdsmi_set_event_notification_mask(amdsmi_device_handle device_handle, uint64_t mask);
|
||||
|
||||
/**
|
||||
* @brief Collect event notifications, waiting a specified amount of time
|
||||
@@ -3534,10 +3534,10 @@ amdsmi_event_notification_mask_set(amdsmi_device_handle device_handle, uint64_t
|
||||
* to the buffer then poll for new events if there is still caller-provided
|
||||
* buffer available to write any new events that would be found.
|
||||
*
|
||||
* This function requires prior calls to ::amdsmi_event_notification_init() and
|
||||
* ::amdsmi_event_notification_mask_set(). This function polls for the
|
||||
* This function requires prior calls to ::amdsmi_init_event_notification() and
|
||||
* :: amdsmi_set_event_notification_mask(). This function polls for the
|
||||
* occurrance of the events on the respective devices that were previously
|
||||
* specified by ::amdsmi_event_notification_mask_set().
|
||||
* specified by :: amdsmi_set_event_notification_mask().
|
||||
*
|
||||
* @param[in] timeout_ms number of milliseconds to wait for an event
|
||||
* to occur
|
||||
@@ -3556,7 +3556,7 @@ amdsmi_event_notification_mask_set(amdsmi_device_handle device_handle, uint64_t
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t
|
||||
amdsmi_event_notification_get(int timeout_ms,
|
||||
amdsmi_get_event_notification(int timeout_ms,
|
||||
uint32_t *num_elem, amdsmi_evt_notification_data_t *data);
|
||||
|
||||
/**
|
||||
@@ -3566,14 +3566,14 @@ amdsmi_event_notification_get(int timeout_ms,
|
||||
* @details Any resources used by event notification for the GPU with
|
||||
* device handle @p device_handle will be free with this
|
||||
* function. This includes freeing any memory and closing file handles. This
|
||||
* should be called for every call to ::amdsmi_event_notification_init()
|
||||
* should be called for every call to ::amdsmi_init_event_notification()
|
||||
*
|
||||
* @param[in] device_handle The device handle of the GPU for which event
|
||||
* notification resources will be free
|
||||
*
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t amdsmi_event_notification_stop(amdsmi_device_handle device_handle);
|
||||
amdsmi_status_t amdsmi_stop_event_notification(amdsmi_device_handle device_handle);
|
||||
|
||||
/** @} End EvntNotif */
|
||||
|
||||
|
||||
@@ -44,5 +44,39 @@
|
||||
#ifndef AMD_SMI_INCLUDE_AMD_SMI_COMMON_H_
|
||||
#define AMD_SMI_INCLUDE_AMD_SMI_COMMON_H_
|
||||
|
||||
#include <map>
|
||||
#include "rocm_smi/rocm_smi.h"
|
||||
#include "amd_smi/amdsmi.h"
|
||||
|
||||
namespace amd {
|
||||
namespace smi {
|
||||
|
||||
// Define a map of rsmi status codes to amdsmi status codes
|
||||
const std::map<rsmi_status_t, amdsmi_status_t> rsmi_status_map = {
|
||||
{RSMI_STATUS_SUCCESS, AMDSMI_STATUS_SUCCESS},
|
||||
{RSMI_STATUS_INVALID_ARGS, AMDSMI_STATUS_INVAL},
|
||||
{RSMI_STATUS_NOT_SUPPORTED, AMDSMI_STATUS_NOT_SUPPORTED},
|
||||
{RSMI_STATUS_PERMISSION, AMDSMI_STATUS_NO_PERM},
|
||||
{RSMI_STATUS_OUT_OF_RESOURCES, AMDSMI_STATUS_OUT_OF_RESOURCES},
|
||||
{RSMI_STATUS_INTERNAL_EXCEPTION, AMDSMI_STATUS_INTERNAL_EXCEPTION},
|
||||
{RSMI_STATUS_INPUT_OUT_OF_BOUNDS, AMDSMI_STATUS_INPUT_OUT_OF_BOUNDS},
|
||||
{RSMI_STATUS_INIT_ERROR, AMDSMI_STATUS_NOT_INIT},
|
||||
{RSMI_INITIALIZATION_ERROR, AMDSMI_STATUS_NOT_INIT},
|
||||
{RSMI_STATUS_NOT_YET_IMPLEMENTED, AMDSMI_STATUS_NOT_YET_IMPLEMENTED},
|
||||
{RSMI_STATUS_NOT_FOUND, AMDSMI_STATUS_NOT_FOUND},
|
||||
{RSMI_STATUS_INSUFFICIENT_SIZE, AMDSMI_STATUS_INSUFFICIENT_SIZE},
|
||||
{RSMI_STATUS_INTERRUPT, AMDSMI_STATUS_INTERRUPT},
|
||||
{RSMI_STATUS_UNEXPECTED_SIZE, AMDSMI_STATUS_UNEXPECTED_SIZE},
|
||||
{RSMI_STATUS_NO_DATA, AMDSMI_STATUS_NO_DATA},
|
||||
{RSMI_STATUS_UNEXPECTED_DATA, AMDSMI_STATUS_UNEXPECTED_DATA},
|
||||
{RSMI_STATUS_BUSY, AMDSMI_STATUS_BUSY},
|
||||
{RSMI_STATUS_REFCOUNT_OVERFLOW, AMDSMI_STATUS_REFCOUNT_OVERFLOW},
|
||||
{RSMI_STATUS_UNKNOWN_ERROR, AMDSMI_STATUS_UNKNOWN_ERROR},
|
||||
};
|
||||
|
||||
amdsmi_status_t rsmi_to_amdsmi_status(rsmi_status_t status);
|
||||
|
||||
} // namespace smi
|
||||
} // namespace amd
|
||||
|
||||
#endif // AMD_SMI_INCLUDE_AMD_SMI_COMMON_H_
|
||||
|
||||
+211
-211
Tá difríocht comhad cosc orthu toisc go bhfuil sé ró-mhór
Difríocht Luchtaigh
@@ -75,106 +75,106 @@ from .amdsmi_interface import amdsmi_get_board_info
|
||||
from .amdsmi_interface import amdsmi_get_ras_block_features_enabled
|
||||
|
||||
# # Supported Function Checks
|
||||
from .amdsmi_interface import amdsmi_dev_supported_func_iterator_open
|
||||
from .amdsmi_interface import amdsmi_dev_supported_variant_iterator_open
|
||||
from .amdsmi_interface import amdsmi_dev_supported_func_iterator_close
|
||||
from .amdsmi_interface import amdsmi_func_iter_next
|
||||
from .amdsmi_interface import amdsmi_func_iter_value_get
|
||||
from .amdsmi_interface import amdsmi_dev_open_supported_func_iterator
|
||||
from .amdsmi_interface import amdsmi_dev_open_supported_variant_iterator
|
||||
from .amdsmi_interface import amdsmi_dev_close_supported_func_iterator
|
||||
from .amdsmi_interface import amdsmi_next_func_iter
|
||||
from .amdsmi_interface import amdsmi_get_func_iter_value
|
||||
|
||||
# # Unsupported Functions In Virtual Environment
|
||||
from .amdsmi_interface import amdsmi_dev_pci_bandwidth_set
|
||||
from .amdsmi_interface import amdsmi_dev_power_cap_set
|
||||
from .amdsmi_interface import amdsmi_dev_power_profile_set
|
||||
from .amdsmi_interface import amdsmi_dev_clk_range_set
|
||||
from .amdsmi_interface import amdsmi_dev_od_clk_info_set
|
||||
from .amdsmi_interface import amdsmi_dev_od_volt_info_set
|
||||
from .amdsmi_interface import amdsmi_dev_perf_level_set_v1
|
||||
from .amdsmi_interface import amdsmi_dev_perf_level_set
|
||||
from .amdsmi_interface import amdsmi_dev_power_profile_presets_get
|
||||
from .amdsmi_interface import amdsmi_dev_gpu_reset
|
||||
from .amdsmi_interface import amdsmi_perf_determinism_mode_set
|
||||
from .amdsmi_interface import amdsmi_dev_fan_speed_set
|
||||
from .amdsmi_interface import amdsmi_dev_fan_reset
|
||||
from .amdsmi_interface import amdsmi_dev_gpu_clk_freq_set
|
||||
from .amdsmi_interface import amdsmi_dev_overdrive_level_set_v1
|
||||
from .amdsmi_interface import amdsmi_dev_overdrive_level_set
|
||||
from .amdsmi_interface import amdsmi_dev_set_pci_bandwidth
|
||||
from .amdsmi_interface import amdsmi_dev_set_power_cap
|
||||
from .amdsmi_interface import amdsmi_dev_set_power_profile
|
||||
from .amdsmi_interface import amdsmi_dev_set_clk_range
|
||||
from .amdsmi_interface import amdsmi_dev_set_od_clk_info
|
||||
from .amdsmi_interface import amdsmi_dev_set_od_volt_info
|
||||
from .amdsmi_interface import amdsmi_dev_set_perf_level_v1
|
||||
from .amdsmi_interface import amdsmi_dev_set_perf_level
|
||||
from .amdsmi_interface import amdsmi_dev_get_power_profile_presets
|
||||
from .amdsmi_interface import amdsmi_dev_reset_gpu
|
||||
from .amdsmi_interface import amdsmi_set_perf_determinism_mode
|
||||
from .amdsmi_interface import amdsmi_dev_set_fan_speed
|
||||
from .amdsmi_interface import amdsmi_dev_reset_fan
|
||||
from .amdsmi_interface import amdsmi_dev_set_clk_freq
|
||||
from .amdsmi_interface import amdsmi_dev_set_overdrive_level_v1
|
||||
from .amdsmi_interface import amdsmi_dev_set_overdrive_level
|
||||
|
||||
# # Physical State Queries
|
||||
from .amdsmi_interface import amdsmi_dev_fan_rpms_get
|
||||
from .amdsmi_interface import amdsmi_dev_fan_speed_get
|
||||
from .amdsmi_interface import amdsmi_dev_fan_speed_max_get
|
||||
from .amdsmi_interface import amdsmi_dev_temp_metric_get
|
||||
from .amdsmi_interface import amdsmi_dev_volt_metric_get
|
||||
from .amdsmi_interface import amdsmi_dev_get_fan_rpms
|
||||
from .amdsmi_interface import amdsmi_dev_get_fan_speed
|
||||
from .amdsmi_interface import amdsmi_dev_get_fan_speed_max
|
||||
from .amdsmi_interface import amdsmi_dev_get_temp_metric
|
||||
from .amdsmi_interface import amdsmi_dev_get_volt_metric
|
||||
|
||||
# # Clock, Power and Performance Query
|
||||
from .amdsmi_interface import amdsmi_dev_busy_percent_get
|
||||
from .amdsmi_interface import amdsmi_utilization_count_get
|
||||
from .amdsmi_interface import amdsmi_dev_perf_level_get
|
||||
from .amdsmi_interface import amdsmi_perf_determinism_mode_set
|
||||
from .amdsmi_interface import amdsmi_dev_overdrive_level_get
|
||||
from .amdsmi_interface import amdsmi_dev_gpu_clk_freq_get
|
||||
from .amdsmi_interface import amdsmi_dev_od_volt_info_get
|
||||
from .amdsmi_interface import amdsmi_dev_gpu_metrics_info_get
|
||||
from .amdsmi_interface import amdsmi_dev_od_volt_curve_regions_get
|
||||
from .amdsmi_interface import amdsmi_dev_power_profile_presets_get
|
||||
from .amdsmi_interface import amdsmi_dev_get_busy_percent
|
||||
from .amdsmi_interface import amdsmi_get_utilization_count
|
||||
from .amdsmi_interface import amdsmi_dev_get_perf_level
|
||||
from .amdsmi_interface import amdsmi_set_perf_determinism_mode
|
||||
from .amdsmi_interface import amdsmi_dev_get_overdrive_level
|
||||
from .amdsmi_interface import amdsmi_dev_get_gpu_clk_freq
|
||||
from .amdsmi_interface import amdsmi_dev_get_od_volt_info
|
||||
from .amdsmi_interface import amdsmi_dev_get_gpu_metrics_info
|
||||
from .amdsmi_interface import amdsmi_dev_get_od_volt_curve_regions
|
||||
from .amdsmi_interface import amdsmi_dev_get_power_profile_presets
|
||||
|
||||
# # Performance Counters
|
||||
from .amdsmi_interface import amdsmi_dev_counter_group_supported
|
||||
from .amdsmi_interface import amdsmi_dev_counter_create
|
||||
from .amdsmi_interface import amdsmi_dev_counter_destroy
|
||||
from .amdsmi_interface import amdsmi_counter_control
|
||||
from .amdsmi_interface import amdsmi_counter_read
|
||||
from .amdsmi_interface import amdsmi_counter_available_counters_get
|
||||
from .amdsmi_interface import amdsmi_dev_create_counter
|
||||
from .amdsmi_interface import amdsmi_dev_destroy_counter
|
||||
from .amdsmi_interface import amdsmi_control_counter
|
||||
from .amdsmi_interface import amdsmi_read_counter
|
||||
from .amdsmi_interface import amdsmi_counter_get_available_counters
|
||||
|
||||
# # Error Query
|
||||
from .amdsmi_interface import amdsmi_dev_ecc_count_get
|
||||
from .amdsmi_interface import amdsmi_dev_ecc_enabled_get
|
||||
from .amdsmi_interface import amdsmi_dev_ecc_status_get
|
||||
from .amdsmi_interface import amdsmi_dev_get_ecc_count
|
||||
from .amdsmi_interface import amdsmi_dev_get_ecc_enabled
|
||||
from .amdsmi_interface import amdsmi_dev_get_ecc_status
|
||||
from .amdsmi_interface import amdsmi_status_string
|
||||
|
||||
# # System Information Query
|
||||
from .amdsmi_interface import amdsmi_compute_process_info_get
|
||||
from .amdsmi_interface import amdsmi_compute_process_info_by_pid_get
|
||||
from .amdsmi_interface import amdsmi_compute_process_gpus_get
|
||||
from .amdsmi_interface import amdsmi_get_compute_process_info
|
||||
from .amdsmi_interface import amdsmi_get_compute_process_info_by_pid
|
||||
from .amdsmi_interface import amdsmi_get_compute_process_gpus
|
||||
from .amdsmi_interface import amdsmi_dev_xgmi_error_status
|
||||
from .amdsmi_interface import amdsmi_dev_xgmi_error_reset
|
||||
from .amdsmi_interface import amdsmi_dev_reset_xgmi_error
|
||||
|
||||
# # PCIE information
|
||||
from .amdsmi_interface import amdsmi_dev_pci_id_get
|
||||
from .amdsmi_interface import amdsmi_dev_pci_bandwidth_get
|
||||
from .amdsmi_interface import amdsmi_dev_pci_throughput_get
|
||||
from .amdsmi_interface import amdsmi_dev_pci_replay_counter_get
|
||||
from .amdsmi_interface import amdsmi_topo_numa_affinity_get
|
||||
from .amdsmi_interface import amdsmi_dev_get_pci_id
|
||||
from .amdsmi_interface import amdsmi_dev_get_pci_bandwidth
|
||||
from .amdsmi_interface import amdsmi_dev_get_pci_throughput
|
||||
from .amdsmi_interface import amdsmi_dev_get_pci_replay_counter
|
||||
from .amdsmi_interface import amdsmi_topo_get_numa_affinity
|
||||
|
||||
# # Power information
|
||||
from .amdsmi_interface import amdsmi_dev_power_ave_get
|
||||
from .amdsmi_interface import amdsmi_dev_energy_count_get
|
||||
from .amdsmi_interface import amdsmi_dev_get_power_ave
|
||||
from .amdsmi_interface import amdsmi_dev_get_energy_count
|
||||
|
||||
# # Memory information
|
||||
from .amdsmi_interface import amdsmi_dev_memory_total_get
|
||||
from .amdsmi_interface import amdsmi_dev_memory_usage_get
|
||||
from .amdsmi_interface import amdsmi_dev_memory_busy_percent_get
|
||||
from .amdsmi_interface import amdsmi_dev_memory_reserved_pages_get
|
||||
from .amdsmi_interface import amdsmi_dev_get_memory_total
|
||||
from .amdsmi_interface import amdsmi_dev_get_memory_usage
|
||||
from .amdsmi_interface import amdsmi_dev_get_memory_busy_percent
|
||||
from .amdsmi_interface import amdsmi_dev_get_memory_reserved_pages
|
||||
|
||||
# # Events
|
||||
from .amdsmi_interface import AmdSmiEventReader
|
||||
|
||||
# # Device Identification information
|
||||
from .amdsmi_interface import amdsmi_dev_vendor_name_get
|
||||
from .amdsmi_interface import amdsmi_dev_id_get
|
||||
from .amdsmi_interface import amdsmi_dev_vram_vendor_get
|
||||
from .amdsmi_interface import amdsmi_dev_drm_render_minor_get
|
||||
from .amdsmi_interface import amdsmi_dev_subsystem_id_get
|
||||
from .amdsmi_interface import amdsmi_dev_subsystem_name_get
|
||||
from .amdsmi_interface import amdsmi_dev_get_vendor_name
|
||||
from .amdsmi_interface import amdsmi_dev_get_id
|
||||
from .amdsmi_interface import amdsmi_dev_get_vram_vendor
|
||||
from .amdsmi_interface import amdsmi_dev_get_drm_render_minor
|
||||
from .amdsmi_interface import amdsmi_dev_get_subsystem_id
|
||||
from .amdsmi_interface import amdsmi_dev_get_subsystem_name
|
||||
|
||||
# # Version information
|
||||
from .amdsmi_interface import amdsmi_version_get
|
||||
from .amdsmi_interface import amdsmi_version_str_get
|
||||
from .amdsmi_interface import amdsmi_get_version
|
||||
from .amdsmi_interface import amdsmi_get_version_str
|
||||
|
||||
# # Hardware topology query
|
||||
from .amdsmi_interface import amdsmi_topo_get_numa_node_number
|
||||
from .amdsmi_interface import amdsmi_topo_get_link_weight
|
||||
from .amdsmi_interface import amdsmi_minmax_bandwidth_get
|
||||
from .amdsmi_interface import amdsmi_get_minmax_bandwidth
|
||||
from .amdsmi_interface import amdsmi_topo_get_link_type
|
||||
from .amdsmi_interface import amdsmi_is_P2P_accessible
|
||||
from .amdsmi_interface import amdsmi_get_xgmi_info
|
||||
|
||||
Tá difríocht comhad cosc orthu toisc go bhfuil sé ró-mhór
Difríocht Luchtaigh
@@ -1639,80 +1639,79 @@ amdsmi_status_t__enumvalues = {
|
||||
0: 'AMDSMI_STATUS_SUCCESS',
|
||||
1: 'AMDSMI_STATUS_INVAL',
|
||||
2: 'AMDSMI_STATUS_NOT_SUPPORTED',
|
||||
3: 'AMDSMI_STATUS_FILE_ERROR',
|
||||
4: 'AMDSMI_STATUS_NO_PERM',
|
||||
5: 'AMDSMI_STATUS_OUT_OF_RESOURCES',
|
||||
6: 'AMDSMI_STATUS_INTERNAL_EXCEPTION',
|
||||
7: 'AMDSMI_STATUS_INPUT_OUT_OF_BOUNDS',
|
||||
8: 'AMDSMI_STATUS_INIT_ERROR',
|
||||
9: 'AMDSMI_STATUS_NOT_YET_IMPLEMENTED',
|
||||
10: 'AMDSMI_STATUS_NOT_FOUND',
|
||||
11: 'AMDSMI_STATUS_INSUFFICIENT_SIZE',
|
||||
12: 'AMDSMI_STATUS_INTERRUPT',
|
||||
13: 'AMDSMI_STATUS_UNEXPECTED_SIZE',
|
||||
14: 'AMDSMI_STATUS_NO_DATA',
|
||||
15: 'AMDSMI_STATUS_UNEXPECTED_DATA',
|
||||
16: 'AMDSMI_STATUS_BUSY',
|
||||
17: 'AMDSMI_STATUS_REFCOUNT_OVERFLOW',
|
||||
1000: 'AMDSMI_LIB_START',
|
||||
1000: 'AMDSMI_STATUS_FAIL_LOAD_MODULE',
|
||||
1001: 'AMDSMI_STATUS_FAIL_LOAD_SYMBOL',
|
||||
1002: 'AMDSMI_STATUS_DRM_ERROR',
|
||||
1003: 'AMDSMI_STATUS_IO',
|
||||
1004: 'AMDSMI_STATUS_FAULT',
|
||||
1005: 'AMDSMI_STATUS_API_FAILED',
|
||||
1006: 'AMDSMI_STATUS_TIMEOUT',
|
||||
1007: 'AMDSMI_STATUS_NO_SLOT',
|
||||
1008: 'AMDSMI_STATUS_RETRY',
|
||||
1009: 'AMDSMI_STATUS_NOT_INIT',
|
||||
3: 'AMDSMI_STATUS_NOT_YET_IMPLEMENTED',
|
||||
4: 'AMDSMI_STATUS_FAIL_LOAD_MODULE',
|
||||
5: 'AMDSMI_STATUS_FAIL_LOAD_SYMBOL',
|
||||
6: 'AMDSMI_STATUS_DRM_ERROR',
|
||||
7: 'AMDSMI_STATUS_API_FAILED',
|
||||
8: 'AMDSMI_STATUS_TIMEOUT',
|
||||
9: 'AMDSMI_STATUS_RETRY',
|
||||
10: 'AMDSMI_STATUS_NO_PERM',
|
||||
11: 'AMDSMI_STATUS_INTERRUPT',
|
||||
12: 'AMDSMI_STATUS_IO',
|
||||
13: 'AMDSMI_STATUS_ADDRESS_FAULT',
|
||||
14: 'AMDSMI_STATUS_FILE_ERROR',
|
||||
15: 'AMDSMI_STATUS_OUT_OF_RESOURCES',
|
||||
16: 'AMDSMI_STATUS_INTERNAL_EXCEPTION',
|
||||
17: 'AMDSMI_STATUS_INPUT_OUT_OF_BOUNDS',
|
||||
18: 'AMDSMI_STATUS_INIT_ERROR',
|
||||
19: 'AMDSMI_STATUS_REFCOUNT_OVERFLOW',
|
||||
30: 'AMDSMI_STATUS_BUSY',
|
||||
31: 'AMDSMI_STATUS_NOT_FOUND',
|
||||
32: 'AMDSMI_STATUS_NOT_INIT',
|
||||
33: 'AMDSMI_STATUS_NO_SLOT',
|
||||
40: 'AMDSMI_STATUS_NO_DATA',
|
||||
41: 'AMDSMI_STATUS_INSUFFICIENT_SIZE',
|
||||
42: 'AMDSMI_STATUS_UNEXPECTED_SIZE',
|
||||
43: 'AMDSMI_STATUS_UNEXPECTED_DATA',
|
||||
4294967294: 'AMDSMI_STATUS_MAP_ERROR',
|
||||
4294967295: 'AMDSMI_STATUS_UNKNOWN_ERROR',
|
||||
}
|
||||
AMDSMI_STATUS_SUCCESS = 0
|
||||
AMDSMI_STATUS_INVAL = 1
|
||||
AMDSMI_STATUS_NOT_SUPPORTED = 2
|
||||
AMDSMI_STATUS_FILE_ERROR = 3
|
||||
AMDSMI_STATUS_NO_PERM = 4
|
||||
AMDSMI_STATUS_OUT_OF_RESOURCES = 5
|
||||
AMDSMI_STATUS_INTERNAL_EXCEPTION = 6
|
||||
AMDSMI_STATUS_INPUT_OUT_OF_BOUNDS = 7
|
||||
AMDSMI_STATUS_INIT_ERROR = 8
|
||||
AMDSMI_STATUS_NOT_YET_IMPLEMENTED = 9
|
||||
AMDSMI_STATUS_NOT_FOUND = 10
|
||||
AMDSMI_STATUS_INSUFFICIENT_SIZE = 11
|
||||
AMDSMI_STATUS_INTERRUPT = 12
|
||||
AMDSMI_STATUS_UNEXPECTED_SIZE = 13
|
||||
AMDSMI_STATUS_NO_DATA = 14
|
||||
AMDSMI_STATUS_UNEXPECTED_DATA = 15
|
||||
AMDSMI_STATUS_BUSY = 16
|
||||
AMDSMI_STATUS_REFCOUNT_OVERFLOW = 17
|
||||
AMDSMI_LIB_START = 1000
|
||||
AMDSMI_STATUS_FAIL_LOAD_MODULE = 1000
|
||||
AMDSMI_STATUS_FAIL_LOAD_SYMBOL = 1001
|
||||
AMDSMI_STATUS_DRM_ERROR = 1002
|
||||
AMDSMI_STATUS_IO = 1003
|
||||
AMDSMI_STATUS_FAULT = 1004
|
||||
AMDSMI_STATUS_API_FAILED = 1005
|
||||
AMDSMI_STATUS_TIMEOUT = 1006
|
||||
AMDSMI_STATUS_NO_SLOT = 1007
|
||||
AMDSMI_STATUS_RETRY = 1008
|
||||
AMDSMI_STATUS_NOT_INIT = 1009
|
||||
AMDSMI_STATUS_NOT_YET_IMPLEMENTED = 3
|
||||
AMDSMI_STATUS_FAIL_LOAD_MODULE = 4
|
||||
AMDSMI_STATUS_FAIL_LOAD_SYMBOL = 5
|
||||
AMDSMI_STATUS_DRM_ERROR = 6
|
||||
AMDSMI_STATUS_API_FAILED = 7
|
||||
AMDSMI_STATUS_TIMEOUT = 8
|
||||
AMDSMI_STATUS_RETRY = 9
|
||||
AMDSMI_STATUS_NO_PERM = 10
|
||||
AMDSMI_STATUS_INTERRUPT = 11
|
||||
AMDSMI_STATUS_IO = 12
|
||||
AMDSMI_STATUS_ADDRESS_FAULT = 13
|
||||
AMDSMI_STATUS_FILE_ERROR = 14
|
||||
AMDSMI_STATUS_OUT_OF_RESOURCES = 15
|
||||
AMDSMI_STATUS_INTERNAL_EXCEPTION = 16
|
||||
AMDSMI_STATUS_INPUT_OUT_OF_BOUNDS = 17
|
||||
AMDSMI_STATUS_INIT_ERROR = 18
|
||||
AMDSMI_STATUS_REFCOUNT_OVERFLOW = 19
|
||||
AMDSMI_STATUS_BUSY = 30
|
||||
AMDSMI_STATUS_NOT_FOUND = 31
|
||||
AMDSMI_STATUS_NOT_INIT = 32
|
||||
AMDSMI_STATUS_NO_SLOT = 33
|
||||
AMDSMI_STATUS_NO_DATA = 40
|
||||
AMDSMI_STATUS_INSUFFICIENT_SIZE = 41
|
||||
AMDSMI_STATUS_UNEXPECTED_SIZE = 42
|
||||
AMDSMI_STATUS_UNEXPECTED_DATA = 43
|
||||
AMDSMI_STATUS_MAP_ERROR = 4294967294
|
||||
AMDSMI_STATUS_UNKNOWN_ERROR = 4294967295
|
||||
amdsmi_status_t = ctypes.c_uint32 # enum
|
||||
__all__ += \
|
||||
['AMDSMI_INIT_ALL_DEVICES', 'AMDSMI_INIT_AMD_CPUS',
|
||||
'AMDSMI_INIT_AMD_GPUS', 'AMDSMI_INIT_NON_AMD_CPUS',
|
||||
'AMDSMI_INIT_NON_AMD_GPUS', 'AMDSMI_LIB_START', 'AMDSMI_MM_UVD',
|
||||
'AMDSMI_MM_VCE', 'AMDSMI_MM_VCN', 'AMDSMI_MM__MAX',
|
||||
'AMDSMI_INIT_NON_AMD_GPUS', 'AMDSMI_MM_UVD', 'AMDSMI_MM_VCE',
|
||||
'AMDSMI_MM_VCN', 'AMDSMI_MM__MAX', 'AMDSMI_STATUS_ADDRESS_FAULT',
|
||||
'AMDSMI_STATUS_API_FAILED', 'AMDSMI_STATUS_BUSY',
|
||||
'AMDSMI_STATUS_DRM_ERROR', 'AMDSMI_STATUS_FAIL_LOAD_MODULE',
|
||||
'AMDSMI_STATUS_FAIL_LOAD_SYMBOL', 'AMDSMI_STATUS_FAULT',
|
||||
'AMDSMI_STATUS_FILE_ERROR', 'AMDSMI_STATUS_INIT_ERROR',
|
||||
'AMDSMI_STATUS_INPUT_OUT_OF_BOUNDS',
|
||||
'AMDSMI_STATUS_FAIL_LOAD_SYMBOL', 'AMDSMI_STATUS_FILE_ERROR',
|
||||
'AMDSMI_STATUS_INIT_ERROR', 'AMDSMI_STATUS_INPUT_OUT_OF_BOUNDS',
|
||||
'AMDSMI_STATUS_INSUFFICIENT_SIZE',
|
||||
'AMDSMI_STATUS_INTERNAL_EXCEPTION', 'AMDSMI_STATUS_INTERRUPT',
|
||||
'AMDSMI_STATUS_INVAL', 'AMDSMI_STATUS_IO',
|
||||
'AMDSMI_STATUS_NOT_FOUND', 'AMDSMI_STATUS_NOT_INIT',
|
||||
'AMDSMI_STATUS_NOT_SUPPORTED',
|
||||
'AMDSMI_STATUS_MAP_ERROR', 'AMDSMI_STATUS_NOT_FOUND',
|
||||
'AMDSMI_STATUS_NOT_INIT', 'AMDSMI_STATUS_NOT_SUPPORTED',
|
||||
'AMDSMI_STATUS_NOT_YET_IMPLEMENTED', 'AMDSMI_STATUS_NO_DATA',
|
||||
'AMDSMI_STATUS_NO_PERM', 'AMDSMI_STATUS_NO_SLOT',
|
||||
'AMDSMI_STATUS_OUT_OF_RESOURCES',
|
||||
@@ -1731,7 +1730,7 @@ __all__ += \
|
||||
|
||||
|
||||
|
||||
__all__ += ['amdsmi_init', 'amdsmi_shut_down', 'amdsmi_get_socket_handles', 'amdsmi_get_socket_info', 'amdsmi_get_device_handles', 'amdsmi_get_device_type', 'amdsmi_get_device_handle_from_bdf', 'amdsmi_dev_id_get', 'amdsmi_dev_vendor_name_get', 'amdsmi_dev_vram_vendor_get', 'amdsmi_dev_subsystem_id_get', 'amdsmi_dev_subsystem_name_get', 'amdsmi_dev_drm_render_minor_get', 'amdsmi_dev_pci_bandwidth_get', 'amdsmi_dev_pci_id_get', 'amdsmi_topo_numa_affinity_get', 'amdsmi_dev_pci_throughput_get', 'amdsmi_dev_pci_replay_counter_get', 'amdsmi_dev_pci_bandwidth_set', 'amdsmi_dev_power_ave_get', 'amdsmi_dev_energy_count_get', 'amdsmi_dev_power_cap_set', 'amdsmi_dev_power_profile_set', 'amdsmi_dev_memory_total_get', 'amdsmi_dev_memory_usage_get', 'amdsmi_get_bad_page_info', 'amdsmi_get_ras_block_features_enabled', 'amdsmi_dev_memory_busy_percent_get', 'amdsmi_dev_memory_reserved_pages_get', 'amdsmi_dev_fan_rpms_get', 'amdsmi_dev_fan_speed_get', 'amdsmi_dev_fan_speed_max_get', 'amdsmi_dev_temp_metric_get', 'amdsmi_dev_volt_metric_get', 'amdsmi_dev_fan_reset', 'amdsmi_dev_fan_speed_set', 'amdsmi_dev_busy_percent_get', 'amdsmi_utilization_count_get', 'amdsmi_get_pcie_link_status', 'amdsmi_get_pcie_link_caps', 'amdsmi_dev_perf_level_get', 'amdsmi_perf_determinism_mode_set', 'amdsmi_dev_overdrive_level_get', 'amdsmi_dev_gpu_clk_freq_get', 'amdsmi_dev_gpu_reset', 'amdsmi_dev_od_volt_info_get', 'amdsmi_dev_gpu_metrics_info_get', 'amdsmi_dev_clk_range_set', 'amdsmi_dev_od_clk_info_set', 'amdsmi_dev_od_volt_info_set', 'amdsmi_dev_od_volt_curve_regions_get', 'amdsmi_dev_power_profile_presets_get', 'amdsmi_dev_perf_level_set', 'amdsmi_dev_perf_level_set_v1', 'amdsmi_dev_overdrive_level_set', 'amdsmi_dev_overdrive_level_set_v1', 'amdsmi_dev_gpu_clk_freq_set', 'amdsmi_version_get', 'amdsmi_version_str_get', 'amdsmi_dev_ecc_count_get', 'amdsmi_dev_ecc_enabled_get', 'amdsmi_dev_ecc_status_get', 'amdsmi_status_string', 'amdsmi_dev_counter_group_supported', 'amdsmi_dev_counter_create', 'amdsmi_dev_counter_destroy', 'amdsmi_counter_control', 'amdsmi_counter_read', 'amdsmi_counter_available_counters_get', 'amdsmi_compute_process_info_get', 'amdsmi_compute_process_info_by_pid_get', 'amdsmi_compute_process_gpus_get', 'amdsmi_dev_xgmi_error_status', 'amdsmi_dev_xgmi_error_reset', 'amdsmi_topo_get_numa_node_number', 'amdsmi_topo_get_link_weight', 'amdsmi_minmax_bandwidth_get', 'amdsmi_topo_get_link_type', 'amdsmi_is_P2P_accessible', 'amdsmi_dev_supported_func_iterator_open', 'amdsmi_dev_supported_variant_iterator_open', 'amdsmi_func_iter_next', 'amdsmi_dev_supported_func_iterator_close', 'amdsmi_func_iter_value_get', 'amdsmi_event_notification_init', 'amdsmi_event_notification_mask_set', 'amdsmi_event_notification_get', 'amdsmi_event_notification_stop', 'amdsmi_get_device_bdf', 'amdsmi_get_device_uuid', 'amdsmi_get_driver_version', 'amdsmi_get_asic_info', 'amdsmi_get_board_info', 'amdsmi_get_power_cap_info', 'amdsmi_get_xgmi_info', 'amdsmi_get_caps_info', 'amdsmi_get_fw_info', 'amdsmi_get_vbios_info', 'amdsmi_get_gpu_activity', 'amdsmi_get_power_measure', 'amdsmi_get_clock_measure', 'amdsmi_get_temperature_measure', 'amdsmi_get_temperature_limit', 'amdsmi_get_power_limit', 'amdsmi_get_vram_usage', 'amdsmi_get_target_frequency_range', 'amdsmi_get_process_list', 'amdsmi_get_process_info', 'amdsmi_get_ecc_error_count']
|
||||
__all__ += ['amdsmi_init', 'amdsmi_shut_down', 'amdsmi_get_socket_handles', 'amdsmi_get_socket_info', 'amdsmi_get_device_handles', 'amdsmi_get_device_type', 'amdsmi_get_device_handle_from_bdf', 'amdsmi_dev_get_id', 'amdsmi_dev_get_vendor_name', 'amdsmi_dev_get_vram_vendor', 'amdsmi_dev_get_subsystem_id', 'amdsmi_dev_get_subsystem_name', 'amdsmi_dev_get_drm_render_minor', 'amdsmi_dev_get_pci_bandwidth', 'amdsmi_dev_get_pci_id', 'amdsmi_topo_get_numa_affinity', 'amdsmi_dev_get_pci_throughput', 'amdsmi_dev_get_pci_replay_counter', 'amdsmi_dev_set_pci_bandwidth', 'amdsmi_dev_get_power_ave', 'amdsmi_dev_get_energy_count', 'amdsmi_dev_set_power_cap', 'amdsmi_dev_set_power_profile', 'amdsmi_dev_get_memory_total', 'amdsmi_dev_get_memory_usage', 'amdsmi_get_bad_page_info', 'amdsmi_get_ras_block_features_enabled', 'amdsmi_dev_get_memory_busy_percent', 'amdsmi_dev_get_memory_reserved_pages', 'amdsmi_dev_get_fan_rpms', 'amdsmi_dev_get_fan_speed', 'amdsmi_dev_get_fan_speed_max', 'amdsmi_dev_get_temp_metric', 'amdsmi_dev_get_volt_metric', 'amdsmi_dev_reset_fan', 'amdsmi_dev_set_fan_speed', 'amdsmi_dev_get_busy_percent', 'amdsmi_get_utilization_count', 'amdsmi_get_pcie_link_status', 'amdsmi_get_pcie_link_caps', 'amdsmi_dev_get_perf_level', 'amdsmi_set_perf_determinism_mode', 'amdsmi_dev_get_overdrive_level', 'amdsmi_dev_get_gpu_clk_freq', 'amdsmi_dev_reset_gpu', 'amdsmi_dev_get_od_volt_info', 'amdsmi_dev_get_gpu_metrics_info', 'amdsmi_dev_set_clk_range', 'amdsmi_dev_set_od_clk_info', 'amdsmi_dev_set_od_volt_info', 'amdsmi_dev_get_od_volt_curve_regions', 'amdsmi_dev_get_power_profile_presets', 'amdsmi_dev_set_perf_level', 'amdsmi_dev_set_perf_level_v1', 'amdsmi_dev_set_overdrive_level', 'amdsmi_dev_set_overdrive_level_v1', 'amdsmi_dev_set_clk_freq', 'amdsmi_get_version', 'amdsmi_get_version_str', 'amdsmi_dev_get_ecc_count', 'amdsmi_dev_get_ecc_enabled', 'amdsmi_dev_get_ecc_status', 'amdsmi_status_string', 'amdsmi_dev_counter_group_supported', 'amdsmi_dev_create_counter', 'amdsmi_dev_destroy_counter', 'amdsmi_control_counter', 'amdsmi_read_counter', 'amdsmi_counter_get_available_counters', 'amdsmi_get_compute_process_info', 'amdsmi_get_compute_process_info_by_pid', 'amdsmi_get_compute_process_gpus', 'amdsmi_dev_xgmi_error_status', 'amdsmi_dev_reset_xgmi_error', 'amdsmi_topo_get_numa_node_number', 'amdsmi_topo_get_link_weight', 'amdsmi_get_minmax_bandwidth', 'amdsmi_topo_get_link_type', 'amdsmi_is_P2P_accessible', 'amdsmi_dev_open_supported_func_iterator', 'amdsmi_dev_open_supported_variant_iterator', 'amdsmi_next_func_iter', 'amdsmi_dev_close_supported_func_iterator', 'amdsmi_get_func_iter_value', 'amdsmi_init_event_notification', 'amdsmi_set_event_notification_mask', 'amdsmi_get_event_notification', 'amdsmi_stop_event_notification', 'amdsmi_get_device_bdf', 'amdsmi_get_device_uuid', 'amdsmi_get_driver_version', 'amdsmi_get_asic_info', 'amdsmi_get_board_info', 'amdsmi_get_power_cap_info', 'amdsmi_get_xgmi_info', 'amdsmi_get_caps_info', 'amdsmi_get_fw_info', 'amdsmi_get_vbios_info', 'amdsmi_get_gpu_activity', 'amdsmi_get_power_measure', 'amdsmi_get_clock_measure', 'amdsmi_get_temperature_measure', 'amdsmi_get_temperature_limit', 'amdsmi_get_power_limit', 'amdsmi_get_vram_usage', 'amdsmi_get_target_frequency_range', 'amdsmi_get_process_list', 'amdsmi_get_process_info', 'amdsmi_get_ecc_error_count']
|
||||
__all__ += []
|
||||
|
||||
_lib = CDLL(os.path.join(os.path.dirname(__file__), "libamd_smi.so"))
|
||||
@@ -1765,77 +1764,77 @@ _lib.amdsmi_get_device_handle_from_bdf.argtypes = [amdsmi_bdf_t,POINTER(amdsmi_d
|
||||
_lib.amdsmi_get_device_handle_from_bdf.restype = amdsmi_status_t
|
||||
amdsmi_get_device_handle_from_bdf = _lib.amdsmi_get_device_handle_from_bdf
|
||||
|
||||
_lib.amdsmi_dev_id_get.argtypes = [amdsmi_device_handle,POINTER(c_uint16)]
|
||||
_lib.amdsmi_dev_id_get.restype = amdsmi_status_t
|
||||
amdsmi_dev_id_get = _lib.amdsmi_dev_id_get
|
||||
_lib.amdsmi_dev_get_id.argtypes = [amdsmi_device_handle,POINTER(c_uint16)]
|
||||
_lib.amdsmi_dev_get_id.restype = amdsmi_status_t
|
||||
amdsmi_dev_get_id = _lib.amdsmi_dev_get_id
|
||||
|
||||
_lib.amdsmi_dev_vendor_name_get.argtypes = [amdsmi_device_handle,c_char_p,c_uint64]
|
||||
_lib.amdsmi_dev_vendor_name_get.restype = amdsmi_status_t
|
||||
amdsmi_dev_vendor_name_get = _lib.amdsmi_dev_vendor_name_get
|
||||
_lib.amdsmi_dev_get_vendor_name.argtypes = [amdsmi_device_handle,c_char_p,c_uint64]
|
||||
_lib.amdsmi_dev_get_vendor_name.restype = amdsmi_status_t
|
||||
amdsmi_dev_get_vendor_name = _lib.amdsmi_dev_get_vendor_name
|
||||
|
||||
_lib.amdsmi_dev_vram_vendor_get.argtypes = [amdsmi_device_handle,c_char_p,c_uint32]
|
||||
_lib.amdsmi_dev_vram_vendor_get.restype = amdsmi_status_t
|
||||
amdsmi_dev_vram_vendor_get = _lib.amdsmi_dev_vram_vendor_get
|
||||
_lib.amdsmi_dev_get_vram_vendor.argtypes = [amdsmi_device_handle,c_char_p,c_uint32]
|
||||
_lib.amdsmi_dev_get_vram_vendor.restype = amdsmi_status_t
|
||||
amdsmi_dev_get_vram_vendor = _lib.amdsmi_dev_get_vram_vendor
|
||||
|
||||
_lib.amdsmi_dev_subsystem_id_get.argtypes = [amdsmi_device_handle,POINTER(c_uint16)]
|
||||
_lib.amdsmi_dev_subsystem_id_get.restype = amdsmi_status_t
|
||||
amdsmi_dev_subsystem_id_get = _lib.amdsmi_dev_subsystem_id_get
|
||||
_lib.amdsmi_dev_get_subsystem_id.argtypes = [amdsmi_device_handle,POINTER(c_uint16)]
|
||||
_lib.amdsmi_dev_get_subsystem_id.restype = amdsmi_status_t
|
||||
amdsmi_dev_get_subsystem_id = _lib.amdsmi_dev_get_subsystem_id
|
||||
|
||||
_lib.amdsmi_dev_subsystem_name_get.argtypes = [amdsmi_device_handle,c_char_p,c_uint64]
|
||||
_lib.amdsmi_dev_subsystem_name_get.restype = amdsmi_status_t
|
||||
amdsmi_dev_subsystem_name_get = _lib.amdsmi_dev_subsystem_name_get
|
||||
_lib.amdsmi_dev_get_subsystem_name.argtypes = [amdsmi_device_handle,c_char_p,c_uint64]
|
||||
_lib.amdsmi_dev_get_subsystem_name.restype = amdsmi_status_t
|
||||
amdsmi_dev_get_subsystem_name = _lib.amdsmi_dev_get_subsystem_name
|
||||
|
||||
_lib.amdsmi_dev_drm_render_minor_get.argtypes = [amdsmi_device_handle,POINTER(c_uint32)]
|
||||
_lib.amdsmi_dev_drm_render_minor_get.restype = amdsmi_status_t
|
||||
amdsmi_dev_drm_render_minor_get = _lib.amdsmi_dev_drm_render_minor_get
|
||||
_lib.amdsmi_dev_get_drm_render_minor.argtypes = [amdsmi_device_handle,POINTER(c_uint32)]
|
||||
_lib.amdsmi_dev_get_drm_render_minor.restype = amdsmi_status_t
|
||||
amdsmi_dev_get_drm_render_minor = _lib.amdsmi_dev_get_drm_render_minor
|
||||
|
||||
_lib.amdsmi_dev_pci_bandwidth_get.argtypes = [amdsmi_device_handle,POINTER(amdsmi_pcie_bandwidth_t)]
|
||||
_lib.amdsmi_dev_pci_bandwidth_get.restype = amdsmi_status_t
|
||||
amdsmi_dev_pci_bandwidth_get = _lib.amdsmi_dev_pci_bandwidth_get
|
||||
_lib.amdsmi_dev_get_pci_bandwidth.argtypes = [amdsmi_device_handle,POINTER(amdsmi_pcie_bandwidth_t)]
|
||||
_lib.amdsmi_dev_get_pci_bandwidth.restype = amdsmi_status_t
|
||||
amdsmi_dev_get_pci_bandwidth = _lib.amdsmi_dev_get_pci_bandwidth
|
||||
|
||||
_lib.amdsmi_dev_pci_id_get.argtypes = [amdsmi_device_handle,POINTER(c_uint64)]
|
||||
_lib.amdsmi_dev_pci_id_get.restype = amdsmi_status_t
|
||||
amdsmi_dev_pci_id_get = _lib.amdsmi_dev_pci_id_get
|
||||
_lib.amdsmi_dev_get_pci_id.argtypes = [amdsmi_device_handle,POINTER(c_uint64)]
|
||||
_lib.amdsmi_dev_get_pci_id.restype = amdsmi_status_t
|
||||
amdsmi_dev_get_pci_id = _lib.amdsmi_dev_get_pci_id
|
||||
|
||||
_lib.amdsmi_topo_numa_affinity_get.argtypes = [amdsmi_device_handle,POINTER(c_uint32)]
|
||||
_lib.amdsmi_topo_numa_affinity_get.restype = amdsmi_status_t
|
||||
amdsmi_topo_numa_affinity_get = _lib.amdsmi_topo_numa_affinity_get
|
||||
_lib.amdsmi_topo_get_numa_affinity.argtypes = [amdsmi_device_handle,POINTER(c_uint32)]
|
||||
_lib.amdsmi_topo_get_numa_affinity.restype = amdsmi_status_t
|
||||
amdsmi_topo_get_numa_affinity = _lib.amdsmi_topo_get_numa_affinity
|
||||
|
||||
_lib.amdsmi_dev_pci_throughput_get.argtypes = [amdsmi_device_handle,POINTER(c_uint64),POINTER(c_uint64),POINTER(c_uint64)]
|
||||
_lib.amdsmi_dev_pci_throughput_get.restype = amdsmi_status_t
|
||||
amdsmi_dev_pci_throughput_get = _lib.amdsmi_dev_pci_throughput_get
|
||||
_lib.amdsmi_dev_get_pci_throughput.argtypes = [amdsmi_device_handle,POINTER(c_uint64),POINTER(c_uint64),POINTER(c_uint64)]
|
||||
_lib.amdsmi_dev_get_pci_throughput.restype = amdsmi_status_t
|
||||
amdsmi_dev_get_pci_throughput = _lib.amdsmi_dev_get_pci_throughput
|
||||
|
||||
_lib.amdsmi_dev_pci_replay_counter_get.argtypes = [amdsmi_device_handle,POINTER(c_uint64)]
|
||||
_lib.amdsmi_dev_pci_replay_counter_get.restype = amdsmi_status_t
|
||||
amdsmi_dev_pci_replay_counter_get = _lib.amdsmi_dev_pci_replay_counter_get
|
||||
_lib.amdsmi_dev_get_pci_replay_counter.argtypes = [amdsmi_device_handle,POINTER(c_uint64)]
|
||||
_lib.amdsmi_dev_get_pci_replay_counter.restype = amdsmi_status_t
|
||||
amdsmi_dev_get_pci_replay_counter = _lib.amdsmi_dev_get_pci_replay_counter
|
||||
|
||||
_lib.amdsmi_dev_pci_bandwidth_set.argtypes = [amdsmi_device_handle,c_uint64]
|
||||
_lib.amdsmi_dev_pci_bandwidth_set.restype = amdsmi_status_t
|
||||
amdsmi_dev_pci_bandwidth_set = _lib.amdsmi_dev_pci_bandwidth_set
|
||||
_lib.amdsmi_dev_set_pci_bandwidth.argtypes = [amdsmi_device_handle,c_uint64]
|
||||
_lib.amdsmi_dev_set_pci_bandwidth.restype = amdsmi_status_t
|
||||
amdsmi_dev_set_pci_bandwidth = _lib.amdsmi_dev_set_pci_bandwidth
|
||||
|
||||
_lib.amdsmi_dev_power_ave_get.argtypes = [amdsmi_device_handle,c_uint32,POINTER(c_uint64)]
|
||||
_lib.amdsmi_dev_power_ave_get.restype = amdsmi_status_t
|
||||
amdsmi_dev_power_ave_get = _lib.amdsmi_dev_power_ave_get
|
||||
_lib.amdsmi_dev_get_power_ave.argtypes = [amdsmi_device_handle,c_uint32,POINTER(c_uint64)]
|
||||
_lib.amdsmi_dev_get_power_ave.restype = amdsmi_status_t
|
||||
amdsmi_dev_get_power_ave = _lib.amdsmi_dev_get_power_ave
|
||||
|
||||
_lib.amdsmi_dev_energy_count_get.argtypes = [amdsmi_device_handle,POINTER(c_uint64),POINTER(c_float),POINTER(c_uint64)]
|
||||
_lib.amdsmi_dev_energy_count_get.restype = amdsmi_status_t
|
||||
amdsmi_dev_energy_count_get = _lib.amdsmi_dev_energy_count_get
|
||||
_lib.amdsmi_dev_get_energy_count.argtypes = [amdsmi_device_handle,POINTER(c_uint64),POINTER(c_float),POINTER(c_uint64)]
|
||||
_lib.amdsmi_dev_get_energy_count.restype = amdsmi_status_t
|
||||
amdsmi_dev_get_energy_count = _lib.amdsmi_dev_get_energy_count
|
||||
|
||||
_lib.amdsmi_dev_power_cap_set.argtypes = [amdsmi_device_handle,c_uint32,c_uint64]
|
||||
_lib.amdsmi_dev_power_cap_set.restype = amdsmi_status_t
|
||||
amdsmi_dev_power_cap_set = _lib.amdsmi_dev_power_cap_set
|
||||
_lib.amdsmi_dev_set_power_cap.argtypes = [amdsmi_device_handle,c_uint32,c_uint64]
|
||||
_lib.amdsmi_dev_set_power_cap.restype = amdsmi_status_t
|
||||
amdsmi_dev_set_power_cap = _lib.amdsmi_dev_set_power_cap
|
||||
|
||||
_lib.amdsmi_dev_power_profile_set.argtypes = [amdsmi_device_handle,c_uint32,amdsmi_power_profile_preset_masks_t]
|
||||
_lib.amdsmi_dev_power_profile_set.restype = amdsmi_status_t
|
||||
amdsmi_dev_power_profile_set = _lib.amdsmi_dev_power_profile_set
|
||||
_lib.amdsmi_dev_set_power_profile.argtypes = [amdsmi_device_handle,c_uint32,amdsmi_power_profile_preset_masks_t]
|
||||
_lib.amdsmi_dev_set_power_profile.restype = amdsmi_status_t
|
||||
amdsmi_dev_set_power_profile = _lib.amdsmi_dev_set_power_profile
|
||||
|
||||
_lib.amdsmi_dev_memory_total_get.argtypes = [amdsmi_device_handle,amdsmi_memory_type_t,POINTER(c_uint64)]
|
||||
_lib.amdsmi_dev_memory_total_get.restype = amdsmi_status_t
|
||||
amdsmi_dev_memory_total_get = _lib.amdsmi_dev_memory_total_get
|
||||
_lib.amdsmi_dev_get_memory_total.argtypes = [amdsmi_device_handle,amdsmi_memory_type_t,POINTER(c_uint64)]
|
||||
_lib.amdsmi_dev_get_memory_total.restype = amdsmi_status_t
|
||||
amdsmi_dev_get_memory_total = _lib.amdsmi_dev_get_memory_total
|
||||
|
||||
_lib.amdsmi_dev_memory_usage_get.argtypes = [amdsmi_device_handle,amdsmi_memory_type_t,POINTER(c_uint64)]
|
||||
_lib.amdsmi_dev_memory_usage_get.restype = amdsmi_status_t
|
||||
amdsmi_dev_memory_usage_get = _lib.amdsmi_dev_memory_usage_get
|
||||
_lib.amdsmi_dev_get_memory_usage.argtypes = [amdsmi_device_handle,amdsmi_memory_type_t,POINTER(c_uint64)]
|
||||
_lib.amdsmi_dev_get_memory_usage.restype = amdsmi_status_t
|
||||
amdsmi_dev_get_memory_usage = _lib.amdsmi_dev_get_memory_usage
|
||||
|
||||
_lib.amdsmi_get_bad_page_info.argtypes = [amdsmi_device_handle,POINTER(c_uint32),POINTER(amdsmi_retired_page_record_t)]
|
||||
_lib.amdsmi_get_bad_page_info.restype = amdsmi_status_t
|
||||
@@ -1845,49 +1844,49 @@ _lib.amdsmi_get_ras_block_features_enabled.argtypes = [amdsmi_device_handle,amds
|
||||
_lib.amdsmi_get_ras_block_features_enabled.restype = amdsmi_status_t
|
||||
amdsmi_get_ras_block_features_enabled = _lib.amdsmi_get_ras_block_features_enabled
|
||||
|
||||
_lib.amdsmi_dev_memory_busy_percent_get.argtypes = [amdsmi_device_handle,POINTER(c_uint32)]
|
||||
_lib.amdsmi_dev_memory_busy_percent_get.restype = amdsmi_status_t
|
||||
amdsmi_dev_memory_busy_percent_get = _lib.amdsmi_dev_memory_busy_percent_get
|
||||
_lib.amdsmi_dev_get_memory_busy_percent.argtypes = [amdsmi_device_handle,POINTER(c_uint32)]
|
||||
_lib.amdsmi_dev_get_memory_busy_percent.restype = amdsmi_status_t
|
||||
amdsmi_dev_get_memory_busy_percent = _lib.amdsmi_dev_get_memory_busy_percent
|
||||
|
||||
_lib.amdsmi_dev_memory_reserved_pages_get.argtypes = [amdsmi_device_handle,POINTER(c_uint32),POINTER(amdsmi_retired_page_record_t)]
|
||||
_lib.amdsmi_dev_memory_reserved_pages_get.restype = amdsmi_status_t
|
||||
amdsmi_dev_memory_reserved_pages_get = _lib.amdsmi_dev_memory_reserved_pages_get
|
||||
_lib.amdsmi_dev_get_memory_reserved_pages.argtypes = [amdsmi_device_handle,POINTER(c_uint32),POINTER(amdsmi_retired_page_record_t)]
|
||||
_lib.amdsmi_dev_get_memory_reserved_pages.restype = amdsmi_status_t
|
||||
amdsmi_dev_get_memory_reserved_pages = _lib.amdsmi_dev_get_memory_reserved_pages
|
||||
|
||||
_lib.amdsmi_dev_fan_rpms_get.argtypes = [amdsmi_device_handle,c_uint32,POINTER(c_int64)]
|
||||
_lib.amdsmi_dev_fan_rpms_get.restype = amdsmi_status_t
|
||||
amdsmi_dev_fan_rpms_get = _lib.amdsmi_dev_fan_rpms_get
|
||||
_lib.amdsmi_dev_get_fan_rpms.argtypes = [amdsmi_device_handle,c_uint32,POINTER(c_int64)]
|
||||
_lib.amdsmi_dev_get_fan_rpms.restype = amdsmi_status_t
|
||||
amdsmi_dev_get_fan_rpms = _lib.amdsmi_dev_get_fan_rpms
|
||||
|
||||
_lib.amdsmi_dev_fan_speed_get.argtypes = [amdsmi_device_handle,c_uint32,POINTER(c_int64)]
|
||||
_lib.amdsmi_dev_fan_speed_get.restype = amdsmi_status_t
|
||||
amdsmi_dev_fan_speed_get = _lib.amdsmi_dev_fan_speed_get
|
||||
_lib.amdsmi_dev_get_fan_speed.argtypes = [amdsmi_device_handle,c_uint32,POINTER(c_int64)]
|
||||
_lib.amdsmi_dev_get_fan_speed.restype = amdsmi_status_t
|
||||
amdsmi_dev_get_fan_speed = _lib.amdsmi_dev_get_fan_speed
|
||||
|
||||
_lib.amdsmi_dev_fan_speed_max_get.argtypes = [amdsmi_device_handle,c_uint32,POINTER(c_uint64)]
|
||||
_lib.amdsmi_dev_fan_speed_max_get.restype = amdsmi_status_t
|
||||
amdsmi_dev_fan_speed_max_get = _lib.amdsmi_dev_fan_speed_max_get
|
||||
_lib.amdsmi_dev_get_fan_speed_max.argtypes = [amdsmi_device_handle,c_uint32,POINTER(c_uint64)]
|
||||
_lib.amdsmi_dev_get_fan_speed_max.restype = amdsmi_status_t
|
||||
amdsmi_dev_get_fan_speed_max = _lib.amdsmi_dev_get_fan_speed_max
|
||||
|
||||
_lib.amdsmi_dev_temp_metric_get.argtypes = [amdsmi_device_handle,c_uint32,amdsmi_temperature_metric_t,POINTER(c_int64)]
|
||||
_lib.amdsmi_dev_temp_metric_get.restype = amdsmi_status_t
|
||||
amdsmi_dev_temp_metric_get = _lib.amdsmi_dev_temp_metric_get
|
||||
_lib.amdsmi_dev_get_temp_metric.argtypes = [amdsmi_device_handle,c_uint32,amdsmi_temperature_metric_t,POINTER(c_int64)]
|
||||
_lib.amdsmi_dev_get_temp_metric.restype = amdsmi_status_t
|
||||
amdsmi_dev_get_temp_metric = _lib.amdsmi_dev_get_temp_metric
|
||||
|
||||
_lib.amdsmi_dev_volt_metric_get.argtypes = [amdsmi_device_handle,amdsmi_voltage_type_t,amdsmi_voltage_metric_t,POINTER(c_int64)]
|
||||
_lib.amdsmi_dev_volt_metric_get.restype = amdsmi_status_t
|
||||
amdsmi_dev_volt_metric_get = _lib.amdsmi_dev_volt_metric_get
|
||||
_lib.amdsmi_dev_get_volt_metric.argtypes = [amdsmi_device_handle,amdsmi_voltage_type_t,amdsmi_voltage_metric_t,POINTER(c_int64)]
|
||||
_lib.amdsmi_dev_get_volt_metric.restype = amdsmi_status_t
|
||||
amdsmi_dev_get_volt_metric = _lib.amdsmi_dev_get_volt_metric
|
||||
|
||||
_lib.amdsmi_dev_fan_reset.argtypes = [amdsmi_device_handle,c_uint32]
|
||||
_lib.amdsmi_dev_fan_reset.restype = amdsmi_status_t
|
||||
amdsmi_dev_fan_reset = _lib.amdsmi_dev_fan_reset
|
||||
_lib.amdsmi_dev_reset_fan.argtypes = [amdsmi_device_handle,c_uint32]
|
||||
_lib.amdsmi_dev_reset_fan.restype = amdsmi_status_t
|
||||
amdsmi_dev_reset_fan = _lib.amdsmi_dev_reset_fan
|
||||
|
||||
_lib.amdsmi_dev_fan_speed_set.argtypes = [amdsmi_device_handle,c_uint32,c_uint64]
|
||||
_lib.amdsmi_dev_fan_speed_set.restype = amdsmi_status_t
|
||||
amdsmi_dev_fan_speed_set = _lib.amdsmi_dev_fan_speed_set
|
||||
_lib.amdsmi_dev_set_fan_speed.argtypes = [amdsmi_device_handle,c_uint32,c_uint64]
|
||||
_lib.amdsmi_dev_set_fan_speed.restype = amdsmi_status_t
|
||||
amdsmi_dev_set_fan_speed = _lib.amdsmi_dev_set_fan_speed
|
||||
|
||||
_lib.amdsmi_dev_busy_percent_get.argtypes = [amdsmi_device_handle,POINTER(c_uint32)]
|
||||
_lib.amdsmi_dev_busy_percent_get.restype = amdsmi_status_t
|
||||
amdsmi_dev_busy_percent_get = _lib.amdsmi_dev_busy_percent_get
|
||||
_lib.amdsmi_dev_get_busy_percent.argtypes = [amdsmi_device_handle,POINTER(c_uint32)]
|
||||
_lib.amdsmi_dev_get_busy_percent.restype = amdsmi_status_t
|
||||
amdsmi_dev_get_busy_percent = _lib.amdsmi_dev_get_busy_percent
|
||||
|
||||
_lib.amdsmi_utilization_count_get.argtypes = [amdsmi_device_handle,POINTER(amdsmi_utilization_counter_t),c_uint32,POINTER(c_uint64)]
|
||||
_lib.amdsmi_utilization_count_get.restype = amdsmi_status_t
|
||||
amdsmi_utilization_count_get = _lib.amdsmi_utilization_count_get
|
||||
_lib.amdsmi_get_utilization_count.argtypes = [amdsmi_device_handle,POINTER(amdsmi_utilization_counter_t),c_uint32,POINTER(c_uint64)]
|
||||
_lib.amdsmi_get_utilization_count.restype = amdsmi_status_t
|
||||
amdsmi_get_utilization_count = _lib.amdsmi_get_utilization_count
|
||||
|
||||
_lib.amdsmi_get_pcie_link_status.argtypes = [amdsmi_device_handle,POINTER(amdsmi_pcie_info_t)]
|
||||
_lib.amdsmi_get_pcie_link_status.restype = amdsmi_status_t
|
||||
@@ -1897,93 +1896,93 @@ _lib.amdsmi_get_pcie_link_caps.argtypes = [amdsmi_device_handle,POINTER(amdsmi_p
|
||||
_lib.amdsmi_get_pcie_link_caps.restype = amdsmi_status_t
|
||||
amdsmi_get_pcie_link_caps = _lib.amdsmi_get_pcie_link_caps
|
||||
|
||||
_lib.amdsmi_dev_perf_level_get.argtypes = [amdsmi_device_handle,POINTER(amdsmi_dev_perf_level_t)]
|
||||
_lib.amdsmi_dev_perf_level_get.restype = amdsmi_status_t
|
||||
amdsmi_dev_perf_level_get = _lib.amdsmi_dev_perf_level_get
|
||||
_lib.amdsmi_dev_get_perf_level.argtypes = [amdsmi_device_handle,POINTER(amdsmi_dev_perf_level_t)]
|
||||
_lib.amdsmi_dev_get_perf_level.restype = amdsmi_status_t
|
||||
amdsmi_dev_get_perf_level = _lib.amdsmi_dev_get_perf_level
|
||||
|
||||
_lib.amdsmi_perf_determinism_mode_set.argtypes = [amdsmi_device_handle,c_uint64]
|
||||
_lib.amdsmi_perf_determinism_mode_set.restype = amdsmi_status_t
|
||||
amdsmi_perf_determinism_mode_set = _lib.amdsmi_perf_determinism_mode_set
|
||||
_lib.amdsmi_set_perf_determinism_mode.argtypes = [amdsmi_device_handle,c_uint64]
|
||||
_lib.amdsmi_set_perf_determinism_mode.restype = amdsmi_status_t
|
||||
amdsmi_set_perf_determinism_mode = _lib.amdsmi_set_perf_determinism_mode
|
||||
|
||||
_lib.amdsmi_dev_overdrive_level_get.argtypes = [amdsmi_device_handle,POINTER(c_uint32)]
|
||||
_lib.amdsmi_dev_overdrive_level_get.restype = amdsmi_status_t
|
||||
amdsmi_dev_overdrive_level_get = _lib.amdsmi_dev_overdrive_level_get
|
||||
_lib.amdsmi_dev_get_overdrive_level.argtypes = [amdsmi_device_handle,POINTER(c_uint32)]
|
||||
_lib.amdsmi_dev_get_overdrive_level.restype = amdsmi_status_t
|
||||
amdsmi_dev_get_overdrive_level = _lib.amdsmi_dev_get_overdrive_level
|
||||
|
||||
_lib.amdsmi_dev_gpu_clk_freq_get.argtypes = [amdsmi_device_handle,amdsmi_clk_type_t,POINTER(amdsmi_frequencies_t)]
|
||||
_lib.amdsmi_dev_gpu_clk_freq_get.restype = amdsmi_status_t
|
||||
amdsmi_dev_gpu_clk_freq_get = _lib.amdsmi_dev_gpu_clk_freq_get
|
||||
_lib.amdsmi_dev_get_gpu_clk_freq.argtypes = [amdsmi_device_handle,amdsmi_clk_type_t,POINTER(amdsmi_frequencies_t)]
|
||||
_lib.amdsmi_dev_get_gpu_clk_freq.restype = amdsmi_status_t
|
||||
amdsmi_dev_get_gpu_clk_freq = _lib.amdsmi_dev_get_gpu_clk_freq
|
||||
|
||||
_lib.amdsmi_dev_gpu_reset.argtypes = [amdsmi_device_handle]
|
||||
_lib.amdsmi_dev_gpu_reset.restype = amdsmi_status_t
|
||||
amdsmi_dev_gpu_reset = _lib.amdsmi_dev_gpu_reset
|
||||
_lib.amdsmi_dev_reset_gpu.argtypes = [amdsmi_device_handle]
|
||||
_lib.amdsmi_dev_reset_gpu.restype = amdsmi_status_t
|
||||
amdsmi_dev_reset_gpu = _lib.amdsmi_dev_reset_gpu
|
||||
|
||||
_lib.amdsmi_dev_od_volt_info_get.argtypes = [amdsmi_device_handle,POINTER(amdsmi_od_volt_freq_data_t)]
|
||||
_lib.amdsmi_dev_od_volt_info_get.restype = amdsmi_status_t
|
||||
amdsmi_dev_od_volt_info_get = _lib.amdsmi_dev_od_volt_info_get
|
||||
_lib.amdsmi_dev_get_od_volt_info.argtypes = [amdsmi_device_handle,POINTER(amdsmi_od_volt_freq_data_t)]
|
||||
_lib.amdsmi_dev_get_od_volt_info.restype = amdsmi_status_t
|
||||
amdsmi_dev_get_od_volt_info = _lib.amdsmi_dev_get_od_volt_info
|
||||
|
||||
_lib.amdsmi_dev_gpu_metrics_info_get.argtypes = [amdsmi_device_handle,POINTER(amdsmi_gpu_metrics_t)]
|
||||
_lib.amdsmi_dev_gpu_metrics_info_get.restype = amdsmi_status_t
|
||||
amdsmi_dev_gpu_metrics_info_get = _lib.amdsmi_dev_gpu_metrics_info_get
|
||||
_lib.amdsmi_dev_get_gpu_metrics_info.argtypes = [amdsmi_device_handle,POINTER(amdsmi_gpu_metrics_t)]
|
||||
_lib.amdsmi_dev_get_gpu_metrics_info.restype = amdsmi_status_t
|
||||
amdsmi_dev_get_gpu_metrics_info = _lib.amdsmi_dev_get_gpu_metrics_info
|
||||
|
||||
_lib.amdsmi_dev_clk_range_set.argtypes = [amdsmi_device_handle,c_uint64,c_uint64,amdsmi_clk_type_t]
|
||||
_lib.amdsmi_dev_clk_range_set.restype = amdsmi_status_t
|
||||
amdsmi_dev_clk_range_set = _lib.amdsmi_dev_clk_range_set
|
||||
_lib.amdsmi_dev_set_clk_range.argtypes = [amdsmi_device_handle,c_uint64,c_uint64,amdsmi_clk_type_t]
|
||||
_lib.amdsmi_dev_set_clk_range.restype = amdsmi_status_t
|
||||
amdsmi_dev_set_clk_range = _lib.amdsmi_dev_set_clk_range
|
||||
|
||||
_lib.amdsmi_dev_od_clk_info_set.argtypes = [amdsmi_device_handle,amdsmi_freq_ind_t,c_uint64,amdsmi_clk_type_t]
|
||||
_lib.amdsmi_dev_od_clk_info_set.restype = amdsmi_status_t
|
||||
amdsmi_dev_od_clk_info_set = _lib.amdsmi_dev_od_clk_info_set
|
||||
_lib.amdsmi_dev_set_od_clk_info.argtypes = [amdsmi_device_handle,amdsmi_freq_ind_t,c_uint64,amdsmi_clk_type_t]
|
||||
_lib.amdsmi_dev_set_od_clk_info.restype = amdsmi_status_t
|
||||
amdsmi_dev_set_od_clk_info = _lib.amdsmi_dev_set_od_clk_info
|
||||
|
||||
_lib.amdsmi_dev_od_volt_info_set.argtypes = [amdsmi_device_handle,c_uint32,c_uint64,c_uint64]
|
||||
_lib.amdsmi_dev_od_volt_info_set.restype = amdsmi_status_t
|
||||
amdsmi_dev_od_volt_info_set = _lib.amdsmi_dev_od_volt_info_set
|
||||
_lib.amdsmi_dev_set_od_volt_info.argtypes = [amdsmi_device_handle,c_uint32,c_uint64,c_uint64]
|
||||
_lib.amdsmi_dev_set_od_volt_info.restype = amdsmi_status_t
|
||||
amdsmi_dev_set_od_volt_info = _lib.amdsmi_dev_set_od_volt_info
|
||||
|
||||
_lib.amdsmi_dev_od_volt_curve_regions_get.argtypes = [amdsmi_device_handle,POINTER(c_uint32),POINTER(amdsmi_freq_volt_region_t)]
|
||||
_lib.amdsmi_dev_od_volt_curve_regions_get.restype = amdsmi_status_t
|
||||
amdsmi_dev_od_volt_curve_regions_get = _lib.amdsmi_dev_od_volt_curve_regions_get
|
||||
_lib.amdsmi_dev_get_od_volt_curve_regions.argtypes = [amdsmi_device_handle,POINTER(c_uint32),POINTER(amdsmi_freq_volt_region_t)]
|
||||
_lib.amdsmi_dev_get_od_volt_curve_regions.restype = amdsmi_status_t
|
||||
amdsmi_dev_get_od_volt_curve_regions = _lib.amdsmi_dev_get_od_volt_curve_regions
|
||||
|
||||
_lib.amdsmi_dev_power_profile_presets_get.argtypes = [amdsmi_device_handle,c_uint32,POINTER(amdsmi_power_profile_status_t)]
|
||||
_lib.amdsmi_dev_power_profile_presets_get.restype = amdsmi_status_t
|
||||
amdsmi_dev_power_profile_presets_get = _lib.amdsmi_dev_power_profile_presets_get
|
||||
_lib.amdsmi_dev_get_power_profile_presets.argtypes = [amdsmi_device_handle,c_uint32,POINTER(amdsmi_power_profile_status_t)]
|
||||
_lib.amdsmi_dev_get_power_profile_presets.restype = amdsmi_status_t
|
||||
amdsmi_dev_get_power_profile_presets = _lib.amdsmi_dev_get_power_profile_presets
|
||||
|
||||
_lib.amdsmi_dev_perf_level_set.argtypes = [amdsmi_device_handle,amdsmi_dev_perf_level_t]
|
||||
_lib.amdsmi_dev_perf_level_set.restype = amdsmi_status_t
|
||||
amdsmi_dev_perf_level_set = _lib.amdsmi_dev_perf_level_set
|
||||
_lib.amdsmi_dev_set_perf_level.argtypes = [amdsmi_device_handle,amdsmi_dev_perf_level_t]
|
||||
_lib.amdsmi_dev_set_perf_level.restype = amdsmi_status_t
|
||||
amdsmi_dev_set_perf_level = _lib.amdsmi_dev_set_perf_level
|
||||
|
||||
_lib.amdsmi_dev_perf_level_set_v1.argtypes = [amdsmi_device_handle,amdsmi_dev_perf_level_t]
|
||||
_lib.amdsmi_dev_perf_level_set_v1.restype = amdsmi_status_t
|
||||
amdsmi_dev_perf_level_set_v1 = _lib.amdsmi_dev_perf_level_set_v1
|
||||
_lib.amdsmi_dev_set_perf_level_v1.argtypes = [amdsmi_device_handle,amdsmi_dev_perf_level_t]
|
||||
_lib.amdsmi_dev_set_perf_level_v1.restype = amdsmi_status_t
|
||||
amdsmi_dev_set_perf_level_v1 = _lib.amdsmi_dev_set_perf_level_v1
|
||||
|
||||
_lib.amdsmi_dev_overdrive_level_set.argtypes = [amdsmi_device_handle,c_uint32]
|
||||
_lib.amdsmi_dev_overdrive_level_set.restype = amdsmi_status_t
|
||||
amdsmi_dev_overdrive_level_set = _lib.amdsmi_dev_overdrive_level_set
|
||||
_lib.amdsmi_dev_set_overdrive_level.argtypes = [amdsmi_device_handle,c_uint32]
|
||||
_lib.amdsmi_dev_set_overdrive_level.restype = amdsmi_status_t
|
||||
amdsmi_dev_set_overdrive_level = _lib.amdsmi_dev_set_overdrive_level
|
||||
|
||||
_lib.amdsmi_dev_overdrive_level_set_v1.argtypes = [amdsmi_device_handle,c_uint32]
|
||||
_lib.amdsmi_dev_overdrive_level_set_v1.restype = amdsmi_status_t
|
||||
amdsmi_dev_overdrive_level_set_v1 = _lib.amdsmi_dev_overdrive_level_set_v1
|
||||
_lib.amdsmi_dev_set_overdrive_level_v1.argtypes = [amdsmi_device_handle,c_uint32]
|
||||
_lib.amdsmi_dev_set_overdrive_level_v1.restype = amdsmi_status_t
|
||||
amdsmi_dev_set_overdrive_level_v1 = _lib.amdsmi_dev_set_overdrive_level_v1
|
||||
|
||||
_lib.amdsmi_dev_gpu_clk_freq_set.argtypes = [amdsmi_device_handle,amdsmi_clk_type_t,c_uint64]
|
||||
_lib.amdsmi_dev_gpu_clk_freq_set.restype = amdsmi_status_t
|
||||
amdsmi_dev_gpu_clk_freq_set = _lib.amdsmi_dev_gpu_clk_freq_set
|
||||
_lib.amdsmi_dev_set_clk_freq.argtypes = [amdsmi_device_handle,amdsmi_clk_type_t,c_uint64]
|
||||
_lib.amdsmi_dev_set_clk_freq.restype = amdsmi_status_t
|
||||
amdsmi_dev_set_clk_freq = _lib.amdsmi_dev_set_clk_freq
|
||||
|
||||
_lib.amdsmi_version_get.argtypes = [POINTER(amdsmi_version_t)]
|
||||
_lib.amdsmi_version_get.restype = amdsmi_status_t
|
||||
amdsmi_version_get = _lib.amdsmi_version_get
|
||||
_lib.amdsmi_get_version.argtypes = [POINTER(amdsmi_version_t)]
|
||||
_lib.amdsmi_get_version.restype = amdsmi_status_t
|
||||
amdsmi_get_version = _lib.amdsmi_get_version
|
||||
|
||||
_lib.amdsmi_version_str_get.argtypes = [amdsmi_sw_component_t,c_char_p,c_uint32]
|
||||
_lib.amdsmi_version_str_get.restype = amdsmi_status_t
|
||||
amdsmi_version_str_get = _lib.amdsmi_version_str_get
|
||||
_lib.amdsmi_get_version_str.argtypes = [amdsmi_sw_component_t,c_char_p,c_uint32]
|
||||
_lib.amdsmi_get_version_str.restype = amdsmi_status_t
|
||||
amdsmi_get_version_str = _lib.amdsmi_get_version_str
|
||||
|
||||
_lib.amdsmi_dev_ecc_count_get.argtypes = [amdsmi_device_handle,amdsmi_gpu_block_t,POINTER(amdsmi_error_count_t)]
|
||||
_lib.amdsmi_dev_ecc_count_get.restype = amdsmi_status_t
|
||||
amdsmi_dev_ecc_count_get = _lib.amdsmi_dev_ecc_count_get
|
||||
_lib.amdsmi_dev_get_ecc_count.argtypes = [amdsmi_device_handle,amdsmi_gpu_block_t,POINTER(amdsmi_error_count_t)]
|
||||
_lib.amdsmi_dev_get_ecc_count.restype = amdsmi_status_t
|
||||
amdsmi_dev_get_ecc_count = _lib.amdsmi_dev_get_ecc_count
|
||||
|
||||
_lib.amdsmi_dev_ecc_enabled_get.argtypes = [amdsmi_device_handle,POINTER(c_uint64)]
|
||||
_lib.amdsmi_dev_ecc_enabled_get.restype = amdsmi_status_t
|
||||
amdsmi_dev_ecc_enabled_get = _lib.amdsmi_dev_ecc_enabled_get
|
||||
_lib.amdsmi_dev_get_ecc_enabled.argtypes = [amdsmi_device_handle,POINTER(c_uint64)]
|
||||
_lib.amdsmi_dev_get_ecc_enabled.restype = amdsmi_status_t
|
||||
amdsmi_dev_get_ecc_enabled = _lib.amdsmi_dev_get_ecc_enabled
|
||||
|
||||
_lib.amdsmi_dev_ecc_status_get.argtypes = [amdsmi_device_handle,amdsmi_gpu_block_t,POINTER(amdsmi_ras_err_state_t)]
|
||||
_lib.amdsmi_dev_ecc_status_get.restype = amdsmi_status_t
|
||||
amdsmi_dev_ecc_status_get = _lib.amdsmi_dev_ecc_status_get
|
||||
_lib.amdsmi_dev_get_ecc_status.argtypes = [amdsmi_device_handle,amdsmi_gpu_block_t,POINTER(amdsmi_ras_err_state_t)]
|
||||
_lib.amdsmi_dev_get_ecc_status.restype = amdsmi_status_t
|
||||
amdsmi_dev_get_ecc_status = _lib.amdsmi_dev_get_ecc_status
|
||||
|
||||
_lib.amdsmi_status_string.argtypes = [amdsmi_status_t,POINTER(c_char_p)]
|
||||
_lib.amdsmi_status_string.restype = amdsmi_status_t
|
||||
@@ -1993,45 +1992,45 @@ _lib.amdsmi_dev_counter_group_supported.argtypes = [amdsmi_device_handle,amdsmi_
|
||||
_lib.amdsmi_dev_counter_group_supported.restype = amdsmi_status_t
|
||||
amdsmi_dev_counter_group_supported = _lib.amdsmi_dev_counter_group_supported
|
||||
|
||||
_lib.amdsmi_dev_counter_create.argtypes = [amdsmi_device_handle,amdsmi_event_type_t,POINTER(amdsmi_event_handle_t)]
|
||||
_lib.amdsmi_dev_counter_create.restype = amdsmi_status_t
|
||||
amdsmi_dev_counter_create = _lib.amdsmi_dev_counter_create
|
||||
_lib.amdsmi_dev_create_counter.argtypes = [amdsmi_device_handle,amdsmi_event_type_t,POINTER(amdsmi_event_handle_t)]
|
||||
_lib.amdsmi_dev_create_counter.restype = amdsmi_status_t
|
||||
amdsmi_dev_create_counter = _lib.amdsmi_dev_create_counter
|
||||
|
||||
_lib.amdsmi_dev_counter_destroy.argtypes = [amdsmi_event_handle_t]
|
||||
_lib.amdsmi_dev_counter_destroy.restype = amdsmi_status_t
|
||||
amdsmi_dev_counter_destroy = _lib.amdsmi_dev_counter_destroy
|
||||
_lib.amdsmi_dev_destroy_counter.argtypes = [amdsmi_event_handle_t]
|
||||
_lib.amdsmi_dev_destroy_counter.restype = amdsmi_status_t
|
||||
amdsmi_dev_destroy_counter = _lib.amdsmi_dev_destroy_counter
|
||||
|
||||
_lib.amdsmi_counter_control.argtypes = [amdsmi_event_handle_t,amdsmi_counter_command_t,c_void_p]
|
||||
_lib.amdsmi_counter_control.restype = amdsmi_status_t
|
||||
amdsmi_counter_control = _lib.amdsmi_counter_control
|
||||
_lib.amdsmi_control_counter.argtypes = [amdsmi_event_handle_t,amdsmi_counter_command_t,c_void_p]
|
||||
_lib.amdsmi_control_counter.restype = amdsmi_status_t
|
||||
amdsmi_control_counter = _lib.amdsmi_control_counter
|
||||
|
||||
_lib.amdsmi_counter_read.argtypes = [amdsmi_event_handle_t,POINTER(amdsmi_counter_value_t)]
|
||||
_lib.amdsmi_counter_read.restype = amdsmi_status_t
|
||||
amdsmi_counter_read = _lib.amdsmi_counter_read
|
||||
_lib.amdsmi_read_counter.argtypes = [amdsmi_event_handle_t,POINTER(amdsmi_counter_value_t)]
|
||||
_lib.amdsmi_read_counter.restype = amdsmi_status_t
|
||||
amdsmi_read_counter = _lib.amdsmi_read_counter
|
||||
|
||||
_lib.amdsmi_counter_available_counters_get.argtypes = [amdsmi_device_handle,amdsmi_event_group_t,POINTER(c_uint32)]
|
||||
_lib.amdsmi_counter_available_counters_get.restype = amdsmi_status_t
|
||||
amdsmi_counter_available_counters_get = _lib.amdsmi_counter_available_counters_get
|
||||
_lib.amdsmi_counter_get_available_counters.argtypes = [amdsmi_device_handle,amdsmi_event_group_t,POINTER(c_uint32)]
|
||||
_lib.amdsmi_counter_get_available_counters.restype = amdsmi_status_t
|
||||
amdsmi_counter_get_available_counters = _lib.amdsmi_counter_get_available_counters
|
||||
|
||||
_lib.amdsmi_compute_process_info_get.argtypes = [POINTER(amdsmi_process_info_t),POINTER(c_uint32)]
|
||||
_lib.amdsmi_compute_process_info_get.restype = amdsmi_status_t
|
||||
amdsmi_compute_process_info_get = _lib.amdsmi_compute_process_info_get
|
||||
_lib.amdsmi_get_compute_process_info.argtypes = [POINTER(amdsmi_process_info_t),POINTER(c_uint32)]
|
||||
_lib.amdsmi_get_compute_process_info.restype = amdsmi_status_t
|
||||
amdsmi_get_compute_process_info = _lib.amdsmi_get_compute_process_info
|
||||
|
||||
_lib.amdsmi_compute_process_info_by_pid_get.argtypes = [c_uint32,POINTER(amdsmi_process_info_t)]
|
||||
_lib.amdsmi_compute_process_info_by_pid_get.restype = amdsmi_status_t
|
||||
amdsmi_compute_process_info_by_pid_get = _lib.amdsmi_compute_process_info_by_pid_get
|
||||
_lib.amdsmi_get_compute_process_info_by_pid.argtypes = [c_uint32,POINTER(amdsmi_process_info_t)]
|
||||
_lib.amdsmi_get_compute_process_info_by_pid.restype = amdsmi_status_t
|
||||
amdsmi_get_compute_process_info_by_pid = _lib.amdsmi_get_compute_process_info_by_pid
|
||||
|
||||
_lib.amdsmi_compute_process_gpus_get.argtypes = [c_uint32,POINTER(c_uint32),POINTER(c_uint32)]
|
||||
_lib.amdsmi_compute_process_gpus_get.restype = amdsmi_status_t
|
||||
amdsmi_compute_process_gpus_get = _lib.amdsmi_compute_process_gpus_get
|
||||
_lib.amdsmi_get_compute_process_gpus.argtypes = [c_uint32,POINTER(c_uint32),POINTER(c_uint32)]
|
||||
_lib.amdsmi_get_compute_process_gpus.restype = amdsmi_status_t
|
||||
amdsmi_get_compute_process_gpus = _lib.amdsmi_get_compute_process_gpus
|
||||
|
||||
_lib.amdsmi_dev_xgmi_error_status.argtypes = [amdsmi_device_handle,POINTER(amdsmi_xgmi_status_t)]
|
||||
_lib.amdsmi_dev_xgmi_error_status.restype = amdsmi_status_t
|
||||
amdsmi_dev_xgmi_error_status = _lib.amdsmi_dev_xgmi_error_status
|
||||
|
||||
_lib.amdsmi_dev_xgmi_error_reset.argtypes = [amdsmi_device_handle]
|
||||
_lib.amdsmi_dev_xgmi_error_reset.restype = amdsmi_status_t
|
||||
amdsmi_dev_xgmi_error_reset = _lib.amdsmi_dev_xgmi_error_reset
|
||||
_lib.amdsmi_dev_reset_xgmi_error.argtypes = [amdsmi_device_handle]
|
||||
_lib.amdsmi_dev_reset_xgmi_error.restype = amdsmi_status_t
|
||||
amdsmi_dev_reset_xgmi_error = _lib.amdsmi_dev_reset_xgmi_error
|
||||
|
||||
_lib.amdsmi_topo_get_numa_node_number.argtypes = [amdsmi_device_handle,POINTER(c_uint32)]
|
||||
_lib.amdsmi_topo_get_numa_node_number.restype = amdsmi_status_t
|
||||
@@ -2041,9 +2040,9 @@ _lib.amdsmi_topo_get_link_weight.argtypes = [amdsmi_device_handle,amdsmi_device_
|
||||
_lib.amdsmi_topo_get_link_weight.restype = amdsmi_status_t
|
||||
amdsmi_topo_get_link_weight = _lib.amdsmi_topo_get_link_weight
|
||||
|
||||
_lib.amdsmi_minmax_bandwidth_get.argtypes = [amdsmi_device_handle,amdsmi_device_handle,POINTER(c_uint64),POINTER(c_uint64)]
|
||||
_lib.amdsmi_minmax_bandwidth_get.restype = amdsmi_status_t
|
||||
amdsmi_minmax_bandwidth_get = _lib.amdsmi_minmax_bandwidth_get
|
||||
_lib.amdsmi_get_minmax_bandwidth.argtypes = [amdsmi_device_handle,amdsmi_device_handle,POINTER(c_uint64),POINTER(c_uint64)]
|
||||
_lib.amdsmi_get_minmax_bandwidth.restype = amdsmi_status_t
|
||||
amdsmi_get_minmax_bandwidth = _lib.amdsmi_get_minmax_bandwidth
|
||||
|
||||
_lib.amdsmi_topo_get_link_type.argtypes = [amdsmi_device_handle,amdsmi_device_handle,POINTER(c_uint64),POINTER(AMDSMI_IO_LINK_TYPE)]
|
||||
_lib.amdsmi_topo_get_link_type.restype = amdsmi_status_t
|
||||
@@ -2053,41 +2052,41 @@ _lib.amdsmi_is_P2P_accessible.argtypes = [amdsmi_device_handle,amdsmi_device_han
|
||||
_lib.amdsmi_is_P2P_accessible.restype = amdsmi_status_t
|
||||
amdsmi_is_P2P_accessible = _lib.amdsmi_is_P2P_accessible
|
||||
|
||||
_lib.amdsmi_dev_supported_func_iterator_open.argtypes = [amdsmi_device_handle,POINTER(amdsmi_func_id_iter_handle_t)]
|
||||
_lib.amdsmi_dev_supported_func_iterator_open.restype = amdsmi_status_t
|
||||
amdsmi_dev_supported_func_iterator_open = _lib.amdsmi_dev_supported_func_iterator_open
|
||||
_lib.amdsmi_dev_open_supported_func_iterator.argtypes = [amdsmi_device_handle,POINTER(amdsmi_func_id_iter_handle_t)]
|
||||
_lib.amdsmi_dev_open_supported_func_iterator.restype = amdsmi_status_t
|
||||
amdsmi_dev_open_supported_func_iterator = _lib.amdsmi_dev_open_supported_func_iterator
|
||||
|
||||
_lib.amdsmi_dev_supported_variant_iterator_open.argtypes = [amdsmi_func_id_iter_handle_t,POINTER(amdsmi_func_id_iter_handle_t)]
|
||||
_lib.amdsmi_dev_supported_variant_iterator_open.restype = amdsmi_status_t
|
||||
amdsmi_dev_supported_variant_iterator_open = _lib.amdsmi_dev_supported_variant_iterator_open
|
||||
_lib.amdsmi_dev_open_supported_variant_iterator.argtypes = [amdsmi_func_id_iter_handle_t,POINTER(amdsmi_func_id_iter_handle_t)]
|
||||
_lib.amdsmi_dev_open_supported_variant_iterator.restype = amdsmi_status_t
|
||||
amdsmi_dev_open_supported_variant_iterator = _lib.amdsmi_dev_open_supported_variant_iterator
|
||||
|
||||
_lib.amdsmi_func_iter_next.argtypes = [amdsmi_func_id_iter_handle_t]
|
||||
_lib.amdsmi_func_iter_next.restype = amdsmi_status_t
|
||||
amdsmi_func_iter_next = _lib.amdsmi_func_iter_next
|
||||
_lib.amdsmi_next_func_iter.argtypes = [amdsmi_func_id_iter_handle_t]
|
||||
_lib.amdsmi_next_func_iter.restype = amdsmi_status_t
|
||||
amdsmi_next_func_iter = _lib.amdsmi_next_func_iter
|
||||
|
||||
_lib.amdsmi_dev_supported_func_iterator_close.argtypes = [POINTER(amdsmi_func_id_iter_handle_t)]
|
||||
_lib.amdsmi_dev_supported_func_iterator_close.restype = amdsmi_status_t
|
||||
amdsmi_dev_supported_func_iterator_close = _lib.amdsmi_dev_supported_func_iterator_close
|
||||
_lib.amdsmi_dev_close_supported_func_iterator.argtypes = [POINTER(amdsmi_func_id_iter_handle_t)]
|
||||
_lib.amdsmi_dev_close_supported_func_iterator.restype = amdsmi_status_t
|
||||
amdsmi_dev_close_supported_func_iterator = _lib.amdsmi_dev_close_supported_func_iterator
|
||||
|
||||
_lib.amdsmi_func_iter_value_get.argtypes = [amdsmi_func_id_iter_handle_t,POINTER(amdsmi_func_id_value_t)]
|
||||
_lib.amdsmi_func_iter_value_get.restype = amdsmi_status_t
|
||||
amdsmi_func_iter_value_get = _lib.amdsmi_func_iter_value_get
|
||||
_lib.amdsmi_get_func_iter_value.argtypes = [amdsmi_func_id_iter_handle_t,POINTER(amdsmi_func_id_value_t)]
|
||||
_lib.amdsmi_get_func_iter_value.restype = amdsmi_status_t
|
||||
amdsmi_get_func_iter_value = _lib.amdsmi_get_func_iter_value
|
||||
|
||||
_lib.amdsmi_event_notification_init.argtypes = [amdsmi_device_handle]
|
||||
_lib.amdsmi_event_notification_init.restype = amdsmi_status_t
|
||||
amdsmi_event_notification_init = _lib.amdsmi_event_notification_init
|
||||
_lib.amdsmi_init_event_notification.argtypes = [amdsmi_device_handle]
|
||||
_lib.amdsmi_init_event_notification.restype = amdsmi_status_t
|
||||
amdsmi_init_event_notification = _lib.amdsmi_init_event_notification
|
||||
|
||||
_lib.amdsmi_event_notification_mask_set.argtypes = [amdsmi_device_handle,c_uint64]
|
||||
_lib.amdsmi_event_notification_mask_set.restype = amdsmi_status_t
|
||||
amdsmi_event_notification_mask_set = _lib.amdsmi_event_notification_mask_set
|
||||
_lib.amdsmi_set_event_notification_mask.argtypes = [amdsmi_device_handle,c_uint64]
|
||||
_lib.amdsmi_set_event_notification_mask.restype = amdsmi_status_t
|
||||
amdsmi_set_event_notification_mask = _lib.amdsmi_set_event_notification_mask
|
||||
|
||||
_lib.amdsmi_event_notification_get.argtypes = [c_int,POINTER(c_uint32),POINTER(amdsmi_evt_notification_data_t)]
|
||||
_lib.amdsmi_event_notification_get.restype = amdsmi_status_t
|
||||
amdsmi_event_notification_get = _lib.amdsmi_event_notification_get
|
||||
_lib.amdsmi_get_event_notification.argtypes = [c_int,POINTER(c_uint32),POINTER(amdsmi_evt_notification_data_t)]
|
||||
_lib.amdsmi_get_event_notification.restype = amdsmi_status_t
|
||||
amdsmi_get_event_notification = _lib.amdsmi_get_event_notification
|
||||
|
||||
_lib.amdsmi_event_notification_stop.argtypes = [amdsmi_device_handle]
|
||||
_lib.amdsmi_event_notification_stop.restype = amdsmi_status_t
|
||||
amdsmi_event_notification_stop = _lib.amdsmi_event_notification_stop
|
||||
_lib.amdsmi_stop_event_notification.argtypes = [amdsmi_device_handle]
|
||||
_lib.amdsmi_stop_event_notification.restype = amdsmi_status_t
|
||||
amdsmi_stop_event_notification = _lib.amdsmi_stop_event_notification
|
||||
|
||||
_lib.amdsmi_get_device_bdf.argtypes = [amdsmi_device_handle,POINTER(amdsmi_bdf_t)]
|
||||
_lib.amdsmi_get_device_bdf.restype = amdsmi_status_t
|
||||
|
||||
@@ -287,85 +287,85 @@ class Formatter:
|
||||
| |
|
||||
| """ + self.style.header("COMMANDS:") + """ |
|
||||
| |
|
||||
| """ + self.style.text(" 1 Get device vendor name. Api: amdsmi_dev_vendor_name_get <bdf>") + """ |
|
||||
| """ + self.style.text(" 2 Get device id. Api: amdsmi_dev_id_get <bdf>") + """ |
|
||||
| """ + self.style.text(" 3 Get device vram vendor. Api: amdsmi_dev_vram_vendor_get <bdf>") + """ |
|
||||
| """ + self.style.text(" 4 Get device drm render minor. Api: amdsmi_dev_drm_render_minor_get <bdf>") + """ |
|
||||
| """ + self.style.text(" 5 Get device subsystem id. Api: amdsmi_dev_subsystem_id_get <bdf>") + """ |
|
||||
| """ + self.style.text(" 6 Get device subsystem name. Api: amdsmi_dev_subsystem_name_get <bdf>") + """ |
|
||||
| """ + self.style.text(" 7 Get device pci id. Api: amdsmi_dev_pci_id_get <bdf>") + """ |
|
||||
| """ + self.style.text(" 8 Get device pci bandwidth. Api: amdsmi_dev_pci_bandwidth_get <bdf>") + """ |
|
||||
| """ + self.style.text(" 9 Get device pci throughput. Api: amdsmi_dev_pci_throughput_get <bdf>") + """ |
|
||||
| """ + self.style.text("10 Get device pci replay counter. Api: amdsmi_dev_pci_replay_counter_get <bdf>") + """ |
|
||||
| """ + self.style.text("11 Get topo numa affinity. Api: amdsmi_topo_numa_affinity_get <bdf>") + """ |
|
||||
| """ + self.style.text("12 Get device power ave. Api: amdsmi_dev_power_ave_get <bdf><sensor_id>") + """ |
|
||||
| """ + self.style.text("13 Get device energy count. Api: amdsmi_dev_energy_count_get <bdf>") + """ |
|
||||
| """ + self.style.text("14 Get device memory total. Api: amdsmi_dev_memory_total_get <bdf>") + """ |
|
||||
| """ + self.style.text("15 Get device memory usage. Api: amdsmi_dev_memory_usage_get <bdf>") + """ |
|
||||
| """ + self.style.text("16 Get device memory busy percent. Api: amdsmi_dev_memory_busy_percent_get <bdf>") + """ |
|
||||
| """ + self.style.text("17 Get device memory reserved pages. Api: amdsmi_dev_memory_reserved_pages_get <bdf>") + """ |
|
||||
| """ + self.style.text("18 Get device fan rpms. Api: amdsmi_dev_fan_rpms_get <bdf><sensor_idx>") + """ |
|
||||
| """ + self.style.text("19 Get device fan speed. Api: amdsmi_dev_fan_speed_get <bdf><sensor_idx>") + """ |
|
||||
| """ + self.style.text("20 Get device fan speed max. Api: amdsmi_dev_fan_speed_max_get <bdf><sensor_idx>") + """ |
|
||||
| """ + self.style.text("21 Get device temp metric. Api: amdsmi_dev_temp_metric_get <bdf>") + """ |
|
||||
| """ + self.style.text("22 Get device volt metric. Api: amdsmi_dev_volt_metric_get <bdf>") + """ |
|
||||
| """ + self.style.text("23 Get device busy percent. Api: amdsmi_dev_busy_percent_get <bdf>") + """ |
|
||||
| """ + self.style.text("24 Get utilization count. Api: amdsmi_utilization_count_get <bdf>") + """ |
|
||||
| """ + self.style.text("25 Get device perf level. Api: amdsmi_dev_perf_level_get <bdf>") + """ |
|
||||
| """ + self.style.text("26 Set perf determinism mode. Api: amdsmi_perf_determinism_mode_set <bdf><clock_value>") + """ |
|
||||
| """ + self.style.text("27 Get device overdrive level. Api: amdsmi_dev_overdrive_level_get <bdf>") + """ |
|
||||
| """ + self.style.text("28 Get device gpu clk freq. Api: amdsmi_dev_gpu_clk_freq_get <bdf>") + """ |
|
||||
| """ + self.style.text("29 Get device od volt. Api: amdsmi_dev_od_volt_info_get <bdf>") + """ |
|
||||
| """ + self.style.text("30 Get device gpu metrics. Api: amdsmi_dev_gpu_metrics_info_get <bdf>") + """ |
|
||||
| """ + self.style.text("31 Get device od volt curve regions. Api: amdsmi_dev_od_volt_curve_regions_get <bdf><num_regions>") + """ |
|
||||
| """ + self.style.text("32 Get device power profile presets. Api: amdsmi_dev_power_profile_presets_get <bdf><sensor_idx>") + """ |
|
||||
| """ + self.style.text("33 Get the build version. Api: amdsmi_version_get <None>") + """ |
|
||||
| """ + self.style.text("34 Get version string. Api: amdsmi_version_str_get <None>") + """ |
|
||||
| """ + self.style.text("35 Get device ecc counter. Api: amdsmi_dev_ecc_count_get <bdf>") + """ |
|
||||
| """ + self.style.text("36 Get device ecc enable. Api: amdsmi_dev_ecc_enabled_get <bdf>") + """ |
|
||||
| """ + self.style.text("37 Get device ecc status. Api: amdsmi_dev_ecc_status_get <bdf>") + """ |
|
||||
| """ + self.style.text(" 1 Get device vendor name. Api: amdsmi_dev_get_vendor_name <bdf>") + """ |
|
||||
| """ + self.style.text(" 2 Get device id. Api: amdsmi_dev_get_id <bdf>") + """ |
|
||||
| """ + self.style.text(" 3 Get device vram vendor. Api: amdsmi_dev_get_vram_vendor <bdf>") + """ |
|
||||
| """ + self.style.text(" 4 Get device drm render minor. Api: amdsmi_dev_get_drm_render_minor <bdf>") + """ |
|
||||
| """ + self.style.text(" 5 Get device subsystem id. Api: amdsmi_dev_get_subsystem_id <bdf>") + """ |
|
||||
| """ + self.style.text(" 6 Get device subsystem name. Api: amdsmi_dev_get_subsystem_name <bdf>") + """ |
|
||||
| """ + self.style.text(" 7 Get device pci id. Api: amdsmi_dev_get_pci_id <bdf>") + """ |
|
||||
| """ + self.style.text(" 8 Get device pci bandwidth. Api: amdsmi_dev_get_pci_bandwidth <bdf>") + """ |
|
||||
| """ + self.style.text(" 9 Get device pci throughput. Api: amdsmi_dev_get_pci_throughput <bdf>") + """ |
|
||||
| """ + self.style.text("10 Get device pci replay counter. Api: amdsmi_dev_get_pci_replay_counter <bdf>") + """ |
|
||||
| """ + self.style.text("11 Get topo numa affinity. Api: amdsmi_topo_get_numa_affinity <bdf>") + """ |
|
||||
| """ + self.style.text("12 Get device power ave. Api: amdsmi_dev_get_power_ave <bdf><sensor_id>") + """ |
|
||||
| """ + self.style.text("13 Get device energy count. Api: amdsmi_dev_get_energy_count <bdf>") + """ |
|
||||
| """ + self.style.text("14 Get device memory total. Api: amdsmi_dev_get_memory_total <bdf>") + """ |
|
||||
| """ + self.style.text("15 Get device memory usage. Api: amdsmi_dev_get_memory_usage <bdf>") + """ |
|
||||
| """ + self.style.text("16 Get device memory busy percent. Api: amdsmi_dev_get_memory_busy_percent <bdf>") + """ |
|
||||
| """ + self.style.text("17 Get device memory reserved pages. Api: amdsmi_dev_get_memory_reserved_pages <bdf>") + """ |
|
||||
| """ + self.style.text("18 Get device fan rpms. Api: amdsmi_dev_get_fan_rpms <bdf><sensor_idx>") + """ |
|
||||
| """ + self.style.text("19 Get device fan speed. Api: amdsmi_dev_get_fan_speed <bdf><sensor_idx>") + """ |
|
||||
| """ + self.style.text("20 Get device fan speed max. Api: amdsmi_dev_get_fan_speed_max <bdf><sensor_idx>") + """ |
|
||||
| """ + self.style.text("21 Get device temp metric. Api: amdsmi_dev_get_temp_metric <bdf>") + """ |
|
||||
| """ + self.style.text("22 Get device volt metric. Api: amdsmi_dev_get_volt_metric <bdf>") + """ |
|
||||
| """ + self.style.text("23 Get device busy percent. Api: amdsmi_dev_get_busy_percent <bdf>") + """ |
|
||||
| """ + self.style.text("24 Get utilization count. Api: amdsmi_get_utilization_count <bdf>") + """ |
|
||||
| """ + self.style.text("25 Get device perf level. Api: amdsmi_dev_get_perf_level <bdf>") + """ |
|
||||
| """ + self.style.text("26 Set perf determinism mode. Api: amdsmi_set_perf_determinism_mode <bdf><clock_value>") + """ |
|
||||
| """ + self.style.text("27 Get device overdrive level. Api: amdsmi_dev_get_overdrive_level <bdf>") + """ |
|
||||
| """ + self.style.text("28 Get device gpu clk freq. Api: amdsmi_dev_get_gpu_clk_freq <bdf>") + """ |
|
||||
| """ + self.style.text("29 Get device od volt. Api: amdsmi_dev_get_od_volt_info <bdf>") + """ |
|
||||
| """ + self.style.text("30 Get device gpu metrics. Api: amdsmi_dev_get_gpu_metrics_info <bdf>") + """ |
|
||||
| """ + self.style.text("31 Get device od volt curve regions. Api: amdsmi_dev_get_od_volt_curve_regions <bdf><num_regions>") + """ |
|
||||
| """ + self.style.text("32 Get device power profile presets. Api: amdsmi_dev_get_power_profile_presets <bdf><sensor_idx>") + """ |
|
||||
| """ + self.style.text("33 Get the build version. Api: amdsmi_get_version <None>") + """ |
|
||||
| """ + self.style.text("34 Get version string. Api: amdsmi_get_version_str <None>") + """ |
|
||||
| """ + self.style.text("35 Get device ecc counter. Api: amdsmi_dev_get_ecc_count <bdf>") + """ |
|
||||
| """ + self.style.text("36 Get device ecc enable. Api: amdsmi_dev_get_ecc_enabled <bdf>") + """ |
|
||||
| """ + self.style.text("37 Get device ecc status. Api: amdsmi_dev_get_ecc_status <bdf>") + """ |
|
||||
| """ + self.style.text("38 Get status string. Api: amdsmi_status_string <status>") + """ |
|
||||
| """ + self.style.text("39 Get compute process info. Api: amdsmi_compute_process_info_get <None>") + """ |
|
||||
| """ + self.style.text("40 Get compute process info by pid. Api: amdsmi_compute_process_info_by_pid_get <pid>") + """ |
|
||||
| """ + self.style.text("41 Get compute process gpus. Api: amdsmi_compute_process_gpus_get <pid>") + """ |
|
||||
| """ + self.style.text("39 Get compute process info. Api: amdsmi_get_compute_process_info <None>") + """ |
|
||||
| """ + self.style.text("40 Get compute process info by pid. Api: amdsmi_get_compute_process_info_by_pid <pid>") + """ |
|
||||
| """ + self.style.text("41 Get compute process gpus. Api: amdsmi_get_compute_process_gpus <pid>") + """ |
|
||||
| """ + self.style.text("42 Get device xgmi_error_status. Api: amdsmi_dev_xgmi_error_status <bdf>") + """ |
|
||||
| """ + self.style.text("43 Get device xgmi error reset. Api: amdsmi_dev_xgmi_error_reset <bdf>") + """ |
|
||||
| """ + self.style.text("43 Get device xgmi error reset. Api: amdsmi_dev_reset_xgmi_error <bdf>") + """ |
|
||||
| """ + self.style.text("44 Get topo get numa node number. Api: amdsmi_topo_get_numa_node_number <bdf>") + """ |
|
||||
| """ + self.style.text("45 Get topo get link weight. Api: amdsmi_topo_get_link_weight <bdf><bdf>") + """ |
|
||||
| """ + self.style.text("46 Get minmax_bandwidth_get. Api: amdsmi_minmax_bandwidth_get <bdf><bdf>") + """ |
|
||||
| """ + self.style.text("46 Get minmax_bandwidth_get. Api: amdsmi_get_minmax_bandwidth <bdf><bdf>") + """ |
|
||||
| """ + self.style.text("47 Get topo get link type. Api: amdsmi_topo_get_link_type <bdf><bdf>") + """ |
|
||||
| """ + self.style.text("48 Get is P2P accessible. Api: amdsmi_is_P2P_accessible <bdf><bdf>") + """ |
|
||||
| """ + self.style.text("49 Get asic info. Api: amdsmi_get_asic_info <bdf>") + """ |
|
||||
| """ + self.style.text("50 Get device_handles. Api: amdsmi_get_device_handles <None>") + """ |
|
||||
| """ + self.style.text("51 Get event notification. Api: amdsmi_event_notification_get <bdf>") + """ |
|
||||
| """ + self.style.text("52 Init event notification. Api: amdsmi_event_notification_init <bdf>") + """ |
|
||||
| """ + self.style.text("53 Set event notification mask. Api: amdsmi_event_notification_mask_set <bdf><mask>") + """ |
|
||||
| """ + self.style.text("54 Get event notification. Api: amdsmi_event_notification_stop <bdf>") + """ |
|
||||
| """ + self.style.text("51 Get event notification. Api: amdsmi_get_event_notification <bdf>") + """ |
|
||||
| """ + self.style.text("52 Init event notification. Api: amdsmi_init_event_notification <bdf>") + """ |
|
||||
| """ + self.style.text("53 Set event notification mask. Api: amdsmi_set_event_notification_mask <bdf><mask>") + """ |
|
||||
| """ + self.style.text("54 Get event notification. Api: amdsmi_stop_event_notification <bdf>") + """ |
|
||||
| """ + self.style.text("55 Init. Api: amdsmi_init <None>") + """ |
|
||||
| """ + self.style.text("56 Shut down. Api: amdsmi_shut_down <None>") + """ |
|
||||
| """ + self.style.text("57 Get fw info. Api: amdsmi_get_fw_info <bdf>") + """ |
|
||||
| """ + self.style.text("58 Get vbios info. Api: amdsmi_get_vbios_info <bdf>") + """ |
|
||||
| """ + self.style.text("59 Get counter available counters. Api: amdsmi_counter_available_counters_get <bdf>") + """ |
|
||||
| """ + self.style.text("60 Get counter control. Api: amdsmi_counter_control <bdf>") + """ |
|
||||
| """ + self.style.text("61 Get counter read. Api: amdsmi_counter_read <bdf>") + """ |
|
||||
| """ + self.style.text("62 Set dev clk range. Api: amdsmi_dev_clk_range_set <bdf><min_clk><max_clk>") + """ |
|
||||
| """ + self.style.text("59 Get counter available counters. Api: amdsmi_counter_get_available_counters <bdf>") + """ |
|
||||
| """ + self.style.text("60 Get counter control. Api: amdsmi_control_counter <bdf>") + """ |
|
||||
| """ + self.style.text("61 Get counter read. Api: amdsmi_read_counter <bdf>") + """ |
|
||||
| """ + self.style.text("62 Set dev clk range. Api: amdsmi_dev_set_clk_range <bdf><min_clk><max_clk>") + """ |
|
||||
| """ + self.style.text("63 Get dev counter group supported. Api: amdsmi_dev_counter_group_supported <bdf>") + """ |
|
||||
| """ + self.style.text("64 Reset dev fan. Api: amdsmi_dev_fan_reset <bdf><sensor_idx>") + """ |
|
||||
| """ + self.style.text("65 Set dev fan speed. Api: amdsmi_dev_fan_speed_set <bdf><sensor_idx><fan_speed>") + """ |
|
||||
| """ + self.style.text("66 Set dev gpu clk freq. Api: amdsmi_dev_gpu_clk_freq_set <bdf><freq_bitmask>") + """ |
|
||||
| """ + self.style.text("67 Reset dev gpu. Api: amdsmi_dev_gpu_reset <bdf>") + """ |
|
||||
| """ + self.style.text("68 Set dev od clk info. Api: amdsmi_dev_od_clk_info_set <bdf><value>") + """ |
|
||||
| """ + self.style.text("69 Set dev od volt info. Api: amdsmi_dev_od_volt_info_set <bdf><vpoint><clk_value><volt_value>") + """|
|
||||
| """ + self.style.text("70 Set dev overdrive level. Api: amdsmi_dev_overdrive_level_set <bdf><overdrive_value>") + """ |
|
||||
| """ + self.style.text("71 Set v1 dev overdrive level. Api: amdsmi_dev_overdrive_level_set_v1 <bdf><overdrive_value>") + """ |
|
||||
| """ + self.style.text("72 Set dev pci bandwidth. Api: amdsmi_dev_pci_bandwidth_set <bdf><bitmask>") + """ |
|
||||
| """ + self.style.text("73 Set dev perf level. Api: amdsmi_dev_perf_level_set <bdf>") + """ |
|
||||
| """ + self.style.text("74 Set dev perf level v1. Api: amdsmi_dev_perf_level_set_v1 <bdf>") + """ |
|
||||
| """ + self.style.text("75 Set dev power cap. Api: amdsmi_dev_power_cap_set <bdf><sensor_ind><cap>") + """ |
|
||||
| """ + self.style.text("76 Set dev power profile. Api: amdsmi_dev_power_profile_set <bdf><reserved>") + """ |
|
||||
| """ + self.style.text("77 Close dev supported func iterator. Api: amdsmi_dev_supported_func_iterator_close <bdf>") + """ |
|
||||
| """ + self.style.text("78 Pen dev supported func iterator. Api: amdsmi_dev_supported_func_iterator_open <bdf>") + """ |
|
||||
| """ + self.style.text("79 Get func iter next. Api: amdsmi_func_iter_next <bdf>") + """ |
|
||||
| """ + self.style.text("64 Reset dev fan. Api: amdsmi_dev_reset_fan <bdf><sensor_idx>") + """ |
|
||||
| """ + self.style.text("65 Set dev fan speed. Api: amdsmi_dev_set_fan_speed <bdf><sensor_idx><fan_speed>") + """ |
|
||||
| """ + self.style.text("66 Set dev gpu clk freq. Api: amdsmi_dev_set_clk_freq <bdf><freq_bitmask>") + """ |
|
||||
| """ + self.style.text("67 Reset dev gpu. Api: amdsmi_dev_reset_gpu <bdf>") + """ |
|
||||
| """ + self.style.text("68 Set dev od clk info. Api: amdsmi_dev_set_od_clk_info <bdf><value>") + """ |
|
||||
| """ + self.style.text("69 Set dev od volt info. Api: amdsmi_dev_set_od_volt_info <bdf><vpoint><clk_value><volt_value>") + """|
|
||||
| """ + self.style.text("70 Set dev overdrive level. Api: amdsmi_dev_set_overdrive_level <bdf><overdrive_value>") + """ |
|
||||
| """ + self.style.text("71 Set v1 dev overdrive level. Api: amdsmi_dev_set_overdrive_level_v1 <bdf><overdrive_value>") + """ |
|
||||
| """ + self.style.text("72 Set dev pci bandwidth. Api: amdsmi_dev_set_pci_bandwidth <bdf><bitmask>") + """ |
|
||||
| """ + self.style.text("73 Set dev perf level. Api: amdsmi_dev_set_perf_level <bdf>") + """ |
|
||||
| """ + self.style.text("74 Set dev perf level v1. Api: amdsmi_dev_set_perf_level_v1 <bdf>") + """ |
|
||||
| """ + self.style.text("75 Set dev power cap. Api: amdsmi_dev_set_power_cap <bdf><sensor_ind><cap>") + """ |
|
||||
| """ + self.style.text("76 Set dev power profile. Api: amdsmi_dev_set_power_profile <bdf><reserved>") + """ |
|
||||
| """ + self.style.text("77 Close dev supported func iterator. Api: amdsmi_dev_close_supported_func_iterator <bdf>") + """ |
|
||||
| """ + self.style.text("78 Pen dev supported func iterator. Api: amdsmi_dev_open_supported_func_iterator <bdf>") + """ |
|
||||
| """ + self.style.text("79 Get func iter next. Api: amdsmi_next_func_iter <bdf>") + """ |
|
||||
| """ + self.style.text("80 Get power cap info. Api: amdsmi_get_power_cap_info <bdf>") + """ |
|
||||
| """ + self.style.text("81 Get xgmi info. Api: amdsmi_get_xgmi_info <bdf>") + """ |
|
||||
+=========================================================================================================================+"""
|
||||
@@ -377,13 +377,13 @@ class Formatter:
|
||||
##############################################
|
||||
def amdsmi_tool_dev_power_ave_get(dev, dic):
|
||||
sensor_id = dic["sensor_id"]
|
||||
return smi_api.amdsmi_dev_power_ave_get(dev, ctypes.c_uint32(sensor_id))
|
||||
return smi_api.amdsmi_dev_get_power_ave(dev, ctypes.c_uint32(sensor_id))
|
||||
|
||||
def amdsmi_tool_dev_memory_total_get(dev):
|
||||
result = {}
|
||||
for memory_type in smi_api.AmdSmiMemoryType:
|
||||
try:
|
||||
value = smi_api.amdsmi_dev_memory_total_get(dev, memory_type)
|
||||
value = smi_api.amdsmi_dev_get_memory_total(dev, memory_type)
|
||||
result.update({memory_type.name: value})
|
||||
except smi_api.AmdSmiException as e:
|
||||
print("{}:\t{}".format(memory_type.name, e))
|
||||
@@ -394,7 +394,7 @@ def amdsmi_tool_dev_memory_usage_get(dev):
|
||||
result = {}
|
||||
for memory_type in smi_api.AmdSmiMemoryType:
|
||||
try:
|
||||
value = smi_api.amdsmi_dev_memory_usage_get(dev, memory_type)
|
||||
value = smi_api.amdsmi_dev_get_memory_usage(dev, memory_type)
|
||||
result.update({memory_type.name: value})
|
||||
except smi_api.AmdSmiException as e:
|
||||
print("{}:\t{}".format(memory_type.name, e))
|
||||
@@ -403,22 +403,22 @@ def amdsmi_tool_dev_memory_usage_get(dev):
|
||||
|
||||
def amdsmi_tool_dev_fan_rpms_get(dev, dic):
|
||||
sensor_idx = dic["sensor_idx"]
|
||||
return smi_api.amdsmi_dev_fan_rpms_get(dev, sensor_idx)
|
||||
return smi_api.amdsmi_dev_get_fan_rpms(dev, sensor_idx)
|
||||
|
||||
def amdsmi_tool_dev_fan_speed_get(dev, dic):
|
||||
sensor_idx = dic["sensor_idx"]
|
||||
return smi_api.amdsmi_dev_fan_speed_get(dev, sensor_idx)
|
||||
return smi_api.amdsmi_dev_get_fan_speed(dev, sensor_idx)
|
||||
|
||||
def amdsmi_tool_dev_fan_speed_max_get(dev, dic):
|
||||
sensor_idx = dic["sensor_idx"]
|
||||
return smi_api.amdsmi_dev_fan_speed_max_get(dev, sensor_idx)
|
||||
return smi_api.amdsmi_dev_get_fan_speed_max(dev, sensor_idx)
|
||||
|
||||
def amdsmi_tool_dev_temp_metric_get(dev):
|
||||
result = {}
|
||||
for temperature_type in smi_api.AmdSmiTemperatureType:
|
||||
for temperature_metric in smi_api.AmdSmiTemperatureMetric:
|
||||
try:
|
||||
value = smi_api.amdsmi_dev_temp_metric_get(dev, temperature_type, temperature_metric)
|
||||
value = smi_api. amdsmi_dev_get_temp_metric(dev, temperature_type, temperature_metric)
|
||||
result.update({"AmdSmiTemperatureType: " + temperature_type.name + ", AmdSmiTemperatureMetric: " + temperature_metric.name: value})
|
||||
except smi_api.AmdSmiException as e:
|
||||
print("{},{}:\t{}".format(temperature_type.name, temperature_metric.name, e))
|
||||
@@ -430,7 +430,7 @@ def amdsmi_tool_dev_volt_metric_get(dev):
|
||||
for voltage_type in smi_api.AmdSmiVoltageType:
|
||||
for voltage_metric in smi_api.AmdSmiVoltageMetric:
|
||||
try:
|
||||
value = smi_api.amdsmi_dev_volt_metric_get(dev, voltage_type, voltage_metric)
|
||||
value = smi_api. amdsmi_dev_get_volt_metric(dev, voltage_type, voltage_metric)
|
||||
result.update({"AmdSmiVoltageType: " + voltage_type.name + ", AmdSmiVoltageMetric: " + voltage_metric.name: value})
|
||||
except smi_api.AmdSmiException as e:
|
||||
print("{},{}:\t{}".format(voltage_type.name, voltage_metric.name, e))
|
||||
@@ -441,7 +441,7 @@ def amdsmi_tool_utilization_count_get(dev):
|
||||
result = {}
|
||||
for counter_type in smi_api.AmdSmiUtilizationCounterType:
|
||||
try:
|
||||
value = smi_api.amdsmi_utilization_count_get(dev, counter_type)
|
||||
value = smi_api.amdsmi_get_utilization_count(dev, counter_type)
|
||||
result.update({counter_type.name: value})
|
||||
except smi_api.AmdSmiException as e:
|
||||
print("{}:\t{}".format(counter_type.name, e))
|
||||
@@ -450,17 +450,17 @@ def amdsmi_tool_utilization_count_get(dev):
|
||||
|
||||
def amdsmi_tool_perf_determinism_mode_set(dev, dic):
|
||||
clock_value = dic["clock_value"]
|
||||
return smi_api.amdsmi_perf_determinism_mode_set(dev, clock_value)
|
||||
return smi_api.amdsmi_set_perf_determinism_mode(dev, clock_value)
|
||||
|
||||
def amdsmi_tool_dev_power_profile_presets_get(dev, dic):
|
||||
sensor_idx = dic["sensor_idx"]
|
||||
return smi_api.amdsmi_dev_power_profile_presets_get(dev, sensor_idx)
|
||||
return smi_api. amdsmi_dev_get_power_profile_presets(dev, sensor_idx)
|
||||
|
||||
def amdsmi_tool_version_str_get():
|
||||
result = {}
|
||||
for sw_component in smi_api.AmdSmiSwComponent:
|
||||
try:
|
||||
value = smi_api.amdsmi_version_str_get(sw_component)
|
||||
value = smi_api.amdsmi_get_version_str(sw_component)
|
||||
result.update({sw_component.name: value})
|
||||
except smi_api.AmdSmiException as e:
|
||||
print("{}:\t{}".format(sw_component.name, e))
|
||||
@@ -469,31 +469,31 @@ def amdsmi_tool_version_str_get():
|
||||
|
||||
def amdsmi_tool_dev_fan_reset(dev, dic):
|
||||
sensor_idx = dic["sensor_idx"]
|
||||
return smi_api.amdsmi_dev_fan_reset(dev, sensor_idx)
|
||||
return smi_api.amdsmi_dev_reset_fan(dev, sensor_idx)
|
||||
|
||||
def amdsmi_tool_dev_fan_speed_set(dev, dic):
|
||||
sensor_idx = dic["sensor_idx"]
|
||||
fan_speed = dic["fan_speed"]
|
||||
return smi_api.amdsmi_dev_fan_speed_set(dev, sensor_idx, fan_speed)
|
||||
return smi_api.amdsmi_dev_set_fan_speed(dev, sensor_idx, fan_speed)
|
||||
|
||||
def amdsmi_tool_dev_overdrive_level_set(dev, dic):
|
||||
overdrive_value = dic["overdrive_value"]
|
||||
return smi_api.amdsmi_dev_overdrive_level_set(dev, overdrive_value)
|
||||
return smi_api. amdsmi_dev_set_overdrive_level(dev, overdrive_value)
|
||||
|
||||
def amdsmi_tool_dev_overdrive_level_set_v1(dev, dic):
|
||||
overdrive_value = dic["overdrive_value"]
|
||||
return smi_api.amdsmi_dev_overdrive_level_set(dev, overdrive_value)
|
||||
return smi_api. amdsmi_dev_set_overdrive_level(dev, overdrive_value)
|
||||
|
||||
def amdsmi_tool_dev_pci_bandwidth_set(dev, dic):
|
||||
bitmask = dic["bitmask"]
|
||||
return smi_api.amdsmi_dev_pci_bandwidth_set(dev, bitmask)
|
||||
return smi_api. amdsmi_dev_set_pci_bandwidth(dev, bitmask)
|
||||
|
||||
|
||||
def amdsmi_tool_dev_gpu_clk_freq_get(dev):
|
||||
result = {}
|
||||
for clock_type in smi_api.AmdSmiClockType:
|
||||
try:
|
||||
value = smi_api.amdsmi_dev_gpu_clk_freq_get(dev, clock_type)
|
||||
value = smi_api. amdsmi_dev_get_gpu_clk_freq(dev, clock_type)
|
||||
result.update({clock_type.name: value})
|
||||
except smi_api.AmdSmiException as e:
|
||||
print("{}:\t{}".format(clock_type.name, e))
|
||||
@@ -502,14 +502,14 @@ def amdsmi_tool_dev_gpu_clk_freq_get(dev):
|
||||
|
||||
def amdsmi_tool_dev_od_volt_curve_regions_get(dev, dic):
|
||||
num_regions = dic["num_regions"]
|
||||
return smi_api.amdsmi_dev_od_volt_curve_regions_get(dev, num_regions)
|
||||
return smi_api. amdsmi_dev_get_od_volt_curve_regions(dev, num_regions)
|
||||
|
||||
|
||||
def amdsmi_tool_dev_ecc_count_get(dev):
|
||||
result = {}
|
||||
for gpu_block in smi_api.AmdSmiGpuBlock:
|
||||
try:
|
||||
value = smi_api.amdsmi_dev_ecc_count_get(dev, gpu_block)
|
||||
value = smi_api. amdsmi_dev_get_ecc_count(dev, gpu_block)
|
||||
result.update({gpu_block.name: value})
|
||||
except smi_api.AmdSmiException as e:
|
||||
print("{}:\t{}".format(gpu_block.name, e))
|
||||
@@ -520,7 +520,7 @@ def amdsmi_tool_dev_ecc_status_get(dev):
|
||||
result = {}
|
||||
for gpu_block in smi_api.AmdSmiGpuBlock:
|
||||
try:
|
||||
value = smi_api.amdsmi_dev_ecc_status_get(dev, gpu_block)
|
||||
value = smi_api. amdsmi_dev_get_ecc_status(dev, gpu_block)
|
||||
result.update({gpu_block.name: value})
|
||||
except smi_api.AmdSmiException as e:
|
||||
print("{}:\t{}".format(gpu_block.name, e))
|
||||
@@ -533,17 +533,17 @@ def amdsmi_tool_status_string(dic):
|
||||
|
||||
def amdsmi_tool_compute_process_gpus_get(dic):
|
||||
pid = dic["pid"]
|
||||
return smi_api.amdsmi_compute_process_gpus_get(pid)
|
||||
return smi_api.amdsmi_get_compute_process_gpus(pid)
|
||||
|
||||
def amdsmi_tool_compute_process_info_by_pid_get(dic):
|
||||
pid = dic["pid"]
|
||||
return smi_api.amdsmi_compute_process_info_by_pid_get(pid)
|
||||
return smi_api.amdsmi_get_compute_process_info_by_pid(pid)
|
||||
|
||||
def amdsmi_tool_topo_get_link_weight(dev):
|
||||
return smi_api.amdsmi_topo_get_link_weight(dev[0], dev[1])
|
||||
|
||||
def amdsmi_tool_minmax_bandwidth_get(dev):
|
||||
return smi_api.amdsmi_minmax_bandwidth_get(dev[0], dev[1])
|
||||
return smi_api. amdsmi_get_minmax_bandwidth(dev[0], dev[1])
|
||||
|
||||
def amdsmi_tool_topo_get_link_type(dev):
|
||||
return smi_api.amdsmi_topo_get_link_type(dev[0], dev[1])
|
||||
@@ -564,14 +564,14 @@ def amdsmi_tool_event_notification_get(dev):
|
||||
return result
|
||||
|
||||
def amdsmi_tool_event_notification_init(dev):
|
||||
return smi_api.amdsmi_wrapper.amdsmi_event_notification_init(dev)
|
||||
return smi_api.amdsmi_wrapper.amdsmi_init_event_notification(dev)
|
||||
|
||||
def amdsmi_tool_event_notification_mask_set(dev, dic):
|
||||
mask = dic["mask"]
|
||||
return smi_api.amdsmi_wrapper.amdsmi_event_notification_mask_set(dev, ctypes.c_uint64(mask))
|
||||
return smi_api.amdsmi_wrapper. amdsmi_set_event_notification_mask(dev, ctypes.c_uint64(mask))
|
||||
|
||||
def amdsmi_tool_event_notification_stop(dev):
|
||||
return smi_api.amdsmi_wrapper.amdsmi_event_notification_stop(dev)
|
||||
return smi_api.amdsmi_wrapper.amdsmi_stop_event_notification(dev)
|
||||
|
||||
def amdsmi_tool_shut_down():
|
||||
smi_api.amdsmi_init()
|
||||
@@ -582,7 +582,7 @@ def amdsmi_tool_counter_available_counters_get(dev):
|
||||
result = {}
|
||||
for event_group in smi_api.AmdSmiEventGroup:
|
||||
try:
|
||||
value = smi_api.amdsmi_counter_available_counters_get(dev, event_group)
|
||||
value = smi_api. amdsmi_counter_get_available_counters(dev, event_group)
|
||||
result.update({event_group.name: value})
|
||||
except smi_api.AmdSmiException as e:
|
||||
print("{}:\t{}".format(event_group.name, e))
|
||||
@@ -594,8 +594,8 @@ def amdsmi_tool_counter_control(dev):
|
||||
for event_type in smi_api.AmdSmiEventType:
|
||||
for counter_command in smi_api.AmdSmiCounterCommand:
|
||||
try:
|
||||
event_handle = smi_api.amdsmi_dev_counter_create(dev, event_type)
|
||||
value = smi_api.amdsmi_counter_control(event_handle, counter_command)
|
||||
event_handle = smi_api.amdsmi_dev_create_counter(dev, event_type)
|
||||
value = smi_api.amdsmi_control_counter(event_handle, counter_command)
|
||||
result.update({event_type.name: value})
|
||||
except smi_api.AmdSmiException as e:
|
||||
print("{}:\t{}".format(event_type.name, e))
|
||||
@@ -606,8 +606,8 @@ def amdsmi_tool_counter_read(dev):
|
||||
result = {}
|
||||
for event_type in smi_api.AmdSmiEventType:
|
||||
try:
|
||||
event_handle = smi_api.amdsmi_dev_counter_create(dev, event_type)
|
||||
value = smi_api.amdsmi_counter_read(event_handle)
|
||||
event_handle = smi_api.amdsmi_dev_create_counter(dev, event_type)
|
||||
value = smi_api.amdsmi_read_counter(event_handle)
|
||||
result.update({event_type.name: value})
|
||||
except smi_api.AmdSmiException as e:
|
||||
print("{}:\t{}".format(event_type.name, e))
|
||||
@@ -620,7 +620,7 @@ def amdsmi_tool_dev_clk_range_set(dev, dic):
|
||||
max_clk = dic["max_clk"]
|
||||
for clock_type in smi_api.AmdSmiClockType:
|
||||
try:
|
||||
value = smi_api.amdsmi_dev_clk_range_set(dev, min_clk, max_clk, clock_type)
|
||||
value = smi_api.amdsmi_dev_set_clk_range(dev, min_clk, max_clk, clock_type)
|
||||
result.update({clock_type.name: value})
|
||||
except smi_api.AmdSmiException as e:
|
||||
print("{}:\t{}".format(clock_type.name, e))
|
||||
@@ -643,7 +643,7 @@ def amdsmi_tool_dev_gpu_clk_freq_set(dev, dic):
|
||||
freq_bitmask = dic["freq_bitmask"]
|
||||
for clock_type in smi_api.AmdSmiClockType:
|
||||
try:
|
||||
value = smi_api.amdsmi_dev_gpu_clk_freq_set(dev, clock_type, freq_bitmask)
|
||||
value = smi_api. amdsmi_dev_set_clk_freq(dev, clock_type, freq_bitmask)
|
||||
result.update({clock_type.name: value})
|
||||
except smi_api.AmdSmiException as e:
|
||||
print("{}:\t{}".format(clock_type.name, e))
|
||||
@@ -656,7 +656,7 @@ def amdsmi_tool_dev_od_clk_info_set(dev, dic):
|
||||
for freq_ind in smi_api.AmdSmiFreqInd:
|
||||
for clock_type in smi_api.AmdSmiClockType:
|
||||
try:
|
||||
value = smi_api.amdsmi_dev_od_clk_info_set(dev, freq_ind, value, clock_type)
|
||||
value = smi_api. amdsmi_dev_set_od_clk_info(dev, freq_ind, value, clock_type)
|
||||
result.update({"AmdSmiFreqInd: " + freq_ind.name + ", AmdSmiClockType: " + clock_type.name: value})
|
||||
except smi_api.AmdSmiException as e:
|
||||
print("{},{}:\t{}".format(freq_ind.name, clock_type.name, e))
|
||||
@@ -667,13 +667,13 @@ def amdsmi_tool_dev_od_volt_info_set(dev, dic):
|
||||
vpoint = dic["vpoint"]
|
||||
clk_value = dic["clk_value"]
|
||||
volt_value = dic["volt_value"]
|
||||
return smi_api.amdsmi_dev_od_volt_info_set(dev, vpoint, clk_value, volt_value)
|
||||
return smi_api. amdsmi_dev_set_od_volt_info(dev, vpoint, clk_value, volt_value)
|
||||
|
||||
def amdsmi_tool_dev_perf_level_set(dev):
|
||||
result = {}
|
||||
for dev_perf_level in smi_api.AmdSmiDevPerfLevel:
|
||||
try:
|
||||
value = smi_api.amdsmi_dev_perf_level_set(dev, dev_perf_level)
|
||||
value = smi_api. amdsmi_dev_set_perf_level(dev, dev_perf_level)
|
||||
result.update({dev_perf_level.name: value})
|
||||
except smi_api.AmdSmiException as e:
|
||||
print("{}:\t{}".format(dev_perf_level.name, e))
|
||||
@@ -684,7 +684,7 @@ def amdsmi_tool_dev_perf_level_set_v1(dev):
|
||||
result = {}
|
||||
for dev_perf_level in smi_api.AmdSmiDevPerfLevel:
|
||||
try:
|
||||
value = smi_api.amdsmi_dev_perf_level_set_v1(dev, dev_perf_level)
|
||||
value = smi_api. amdsmi_dev_set_perf_level_v1(dev, dev_perf_level)
|
||||
result.update({dev_perf_level.name: value})
|
||||
except smi_api.AmdSmiException as e:
|
||||
print("{}:\t{}".format(dev_perf_level.name, e))
|
||||
@@ -694,14 +694,14 @@ def amdsmi_tool_dev_perf_level_set_v1(dev):
|
||||
def amdsmi_tool_dev_power_cap_set(dev, dic):
|
||||
sensor_ind = dic["sensor_ind"]
|
||||
cap = dic["cap"]
|
||||
return smi_api.amdsmi_dev_power_cap_set(dev, sensor_ind, cap)
|
||||
return smi_api. amdsmi_dev_set_power_cap(dev, sensor_ind, cap)
|
||||
|
||||
def amdsmi_tool_dev_power_profile_set(dev, dic):
|
||||
result = {}
|
||||
reserved = dic["reserved"]
|
||||
for power_profile_preset_maks in smi_api.AmdSmiPowerProfilePresetMasks:
|
||||
try:
|
||||
value = smi_api.amdsmi_dev_power_profile_set(dev, reserved, power_profile_preset_maks)
|
||||
value = smi_api. amdsmi_dev_set_power_profile(dev, reserved, power_profile_preset_maks)
|
||||
result.update({power_profile_preset_maks.name: value})
|
||||
except smi_api.AmdSmiException as e:
|
||||
print("{}:\t{}".format(power_profile_preset_maks.name, e))
|
||||
@@ -709,12 +709,12 @@ def amdsmi_tool_dev_power_profile_set(dev, dic):
|
||||
return result
|
||||
|
||||
def amdsmi_tool_dev_supported_func_iterator_close(dev):
|
||||
obj_handle = smi_api.amdsmi_dev_supported_func_iterator_open(dev)
|
||||
return smi_api.amdsmi_dev_supported_func_iterator_close(obj_handle)
|
||||
obj_handle = smi_api.amdsmi_dev_open_supported_func_iterator(dev)
|
||||
return smi_api.amdsmi_dev_close_supported_func_iterator(obj_handle)
|
||||
|
||||
def amdsmi_tool_func_iter_next(dev):
|
||||
obj_handle = smi_api.amdsmi_dev_supported_func_iterator_open(dev)
|
||||
return smi_api.amdsmi_func_iter_next(obj_handle)
|
||||
obj_handle = smi_api.amdsmi_dev_open_supported_func_iterator(dev)
|
||||
return smi_api.amdsmi_next_func_iter(obj_handle)
|
||||
|
||||
##############################################
|
||||
# command table
|
||||
@@ -722,44 +722,44 @@ def amdsmi_tool_func_iter_next(dev):
|
||||
|
||||
commands = {
|
||||
# idx: [func, {arg_name : [arg_type, is_arg_obligatory]}]
|
||||
1: [smi_api.amdsmi_dev_vendor_name_get, {
|
||||
1: [smi_api.amdsmi_dev_get_vendor_name, {
|
||||
"device_identifier1": [None, True]
|
||||
}],
|
||||
2: [smi_api.amdsmi_dev_id_get, {
|
||||
2: [smi_api.amdsmi_dev_get_id, {
|
||||
"device_identifier1": [None, True]
|
||||
}],
|
||||
3: [smi_api.amdsmi_dev_vram_vendor_get, {
|
||||
3: [smi_api.amdsmi_dev_get_vram_vendor, {
|
||||
"device_identifier1": [None, True]
|
||||
}],
|
||||
4: [smi_api.amdsmi_dev_drm_render_minor_get, {
|
||||
4: [smi_api.amdsmi_dev_get_drm_render_minor, {
|
||||
"device_identifier1": [None, True]
|
||||
}],
|
||||
5: [smi_api.amdsmi_dev_subsystem_id_get, {
|
||||
5: [smi_api.amdsmi_dev_get_subsystem_id, {
|
||||
"device_identifier1": [None, True]
|
||||
}],
|
||||
6: [smi_api.amdsmi_dev_subsystem_name_get, {
|
||||
6: [smi_api.amdsmi_dev_get_subsystem_name, {
|
||||
"device_identifier1": [None, True]
|
||||
}],
|
||||
7: [smi_api.amdsmi_dev_pci_id_get, {
|
||||
7: [smi_api.amdsmi_dev_get_pci_id, {
|
||||
"device_identifier1": [None, True]
|
||||
}],
|
||||
8: [smi_api.amdsmi_dev_pci_bandwidth_get, {
|
||||
8: [smi_api.amdsmi_dev_get_pci_bandwidth, {
|
||||
"device_identifier1": [None, True]
|
||||
}],
|
||||
9: [smi_api.amdsmi_dev_pci_throughput_get, {
|
||||
9: [smi_api.amdsmi_dev_get_pci_throughput, {
|
||||
"device_identifier1": [None, True]
|
||||
}],
|
||||
10: [smi_api.amdsmi_dev_pci_replay_counter_get, {
|
||||
10: [smi_api. amdsmi_dev_get_pci_replay_counter, {
|
||||
"device_identifier1": [None, True]
|
||||
}],
|
||||
11: [smi_api.amdsmi_topo_numa_affinity_get, {
|
||||
11: [smi_api.amdsmi_topo_get_numa_affinity, {
|
||||
"device_identifier1": [None, True]
|
||||
}],
|
||||
12: [amdsmi_tool_dev_power_ave_get, {
|
||||
"device_identifier1": [None, True],
|
||||
"sensor_id": [int, True]
|
||||
}],
|
||||
13: [smi_api.amdsmi_dev_energy_count_get, {
|
||||
13: [smi_api.amdsmi_dev_get_energy_count, {
|
||||
"device_identifier1": [None, True]
|
||||
}],
|
||||
14: [amdsmi_tool_dev_memory_total_get, {
|
||||
@@ -768,10 +768,10 @@ commands = {
|
||||
15: [amdsmi_tool_dev_memory_usage_get, {
|
||||
"device_identifier1": [None, True]
|
||||
}],
|
||||
16: [smi_api.amdsmi_dev_memory_busy_percent_get, {
|
||||
16: [smi_api.amdsmi_dev_get_memory_busy_percent, {
|
||||
"device_identifier1": [None, True]
|
||||
}],
|
||||
17: [smi_api.amdsmi_dev_memory_reserved_pages_get, {
|
||||
17: [smi_api.amdsmi_dev_get_memory_reserved_pages, {
|
||||
"device_identifier1": [None, True]
|
||||
}],
|
||||
18: [amdsmi_tool_dev_fan_rpms_get, {
|
||||
@@ -792,29 +792,29 @@ commands = {
|
||||
22: [amdsmi_tool_dev_volt_metric_get, {
|
||||
"device_identifier1": [None, True],
|
||||
}],
|
||||
23: [smi_api.amdsmi_dev_busy_percent_get, {
|
||||
23: [smi_api.amdsmi_dev_get_busy_percent, {
|
||||
"device_identifier1": [None, True]
|
||||
}],
|
||||
24: [amdsmi_tool_utilization_count_get, {
|
||||
"device_identifier1": [None, True],
|
||||
}],
|
||||
25: [smi_api.amdsmi_dev_perf_level_get, {
|
||||
25: [smi_api.amdsmi_dev_get_perf_level, {
|
||||
"device_identifier1": [None, True]
|
||||
}],
|
||||
26: [amdsmi_tool_perf_determinism_mode_set, {
|
||||
"device_identifier1": [None, True],
|
||||
"clock_value": [int, True]
|
||||
}],
|
||||
27: [smi_api.amdsmi_dev_overdrive_level_get, {
|
||||
27: [smi_api.amdsmi_dev_get_overdrive_level, {
|
||||
"device_identifier1": [None, True]
|
||||
}],
|
||||
28: [amdsmi_tool_dev_gpu_clk_freq_get, {
|
||||
"device_identifier1": [None, True]
|
||||
}],
|
||||
29: [smi_api.amdsmi_dev_od_volt_info_get, {
|
||||
29: [smi_api. amdsmi_dev_get_od_volt_info, {
|
||||
"device_identifier1": [None, True]
|
||||
}],
|
||||
30: [smi_api.amdsmi_dev_gpu_metrics_info_get, {
|
||||
30: [smi_api. amdsmi_dev_get_gpu_metrics_info, {
|
||||
"device_identifier1": [None, True]
|
||||
}],
|
||||
31: [amdsmi_tool_dev_od_volt_curve_regions_get, {
|
||||
@@ -825,12 +825,12 @@ commands = {
|
||||
"device_identifier1": [None, True],
|
||||
"sensor_idx": [int, True]
|
||||
}],
|
||||
33: [smi_api.amdsmi_version_get, {}],
|
||||
33: [smi_api.amdsmi_get_version, {}],
|
||||
34: [amdsmi_tool_version_str_get, {}],
|
||||
35: [amdsmi_tool_dev_ecc_count_get, {
|
||||
"device_identifier1": [None, True]
|
||||
}],
|
||||
36: [smi_api.amdsmi_dev_ecc_enabled_get, {
|
||||
36: [smi_api. amdsmi_dev_get_ecc_enabled, {
|
||||
"device_identifier1": [None, True]
|
||||
}],
|
||||
37: [amdsmi_tool_dev_ecc_status_get, {
|
||||
@@ -839,7 +839,7 @@ commands = {
|
||||
38: [amdsmi_tool_status_string, {
|
||||
"status": [int, True]
|
||||
}],
|
||||
39: [smi_api.amdsmi_compute_process_info_get, {}],
|
||||
39: [smi_api.amdsmi_get_compute_process_info, {}],
|
||||
40: [amdsmi_tool_compute_process_info_by_pid_get, {
|
||||
"pid": [int, True]
|
||||
}],
|
||||
@@ -849,7 +849,7 @@ commands = {
|
||||
42: [smi_api.amdsmi_dev_xgmi_error_status, {
|
||||
"device_identifier1": [None, True]
|
||||
}],
|
||||
43: [smi_api.amdsmi_dev_xgmi_error_reset, {
|
||||
43: [smi_api.amdsmi_dev_reset_xgmi_error, {
|
||||
"device_identifier1": [None, True]
|
||||
}],
|
||||
44: [smi_api.amdsmi_topo_get_numa_node_number, {
|
||||
@@ -926,7 +926,7 @@ commands = {
|
||||
"device_identifier1": [None, True],
|
||||
"freq_bitmask": [int, True]
|
||||
}],
|
||||
67: [smi_api.amdsmi_dev_gpu_reset, {
|
||||
67: [smi_api.amdsmi_dev_reset_gpu, {
|
||||
"device_identifier1": [None, True]
|
||||
}],
|
||||
68: [amdsmi_tool_dev_od_clk_info_set, {
|
||||
@@ -969,7 +969,7 @@ commands = {
|
||||
77: [amdsmi_tool_dev_supported_func_iterator_close, {
|
||||
"device_identifier1": [None, True]
|
||||
}],
|
||||
78: [smi_api.amdsmi_dev_supported_func_iterator_open, {
|
||||
78: [smi_api.amdsmi_dev_open_supported_func_iterator, {
|
||||
"device_identifier1": [None, True]
|
||||
}],
|
||||
79: [amdsmi_tool_func_iter_next, {
|
||||
|
||||
+408
-238
Tá difríocht comhad cosc orthu toisc go bhfuil sé ró-mhór
Difríocht Luchtaigh
@@ -42,11 +42,26 @@
|
||||
*/
|
||||
|
||||
#include <functional>
|
||||
#include "amd_smi/amdsmi.h"
|
||||
#include "amd_smi/impl/amd_smi_common.h"
|
||||
|
||||
|
||||
namespace amd {
|
||||
namespace smi {
|
||||
|
||||
amdsmi_status_t rsmi_to_amdsmi_status(rsmi_status_t status) {
|
||||
amdsmi_status_t amdsmi_status = AMDSMI_STATUS_MAP_ERROR;
|
||||
|
||||
// Look for it in the map
|
||||
// If found: use the mapped value
|
||||
// If not found: return the map error established above
|
||||
auto search = amd::smi::rsmi_status_map.find(status);
|
||||
if (search != amd::smi::rsmi_status_map.end()) {
|
||||
amdsmi_status = search->second;
|
||||
}
|
||||
|
||||
return amdsmi_status;
|
||||
}
|
||||
|
||||
} // namespace smi
|
||||
} // namespace amd
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
#include <iomanip>
|
||||
#include "amd_smi/impl/amd_smi_system.h"
|
||||
#include "amd_smi/impl/amd_smi_gpu_device.h"
|
||||
#include "amd_smi/impl/amd_smi_common.h"
|
||||
#include "rocm_smi/rocm_smi.h"
|
||||
#include "rocm_smi/rocm_smi_main.h"
|
||||
|
||||
@@ -73,13 +74,13 @@ amdsmi_status_t AMDSmiSystem::populate_amd_gpu_devices() {
|
||||
// init rsmi
|
||||
rsmi_status_t ret = rsmi_init(0);
|
||||
if (ret != RSMI_STATUS_SUCCESS) {
|
||||
return static_cast<amdsmi_status_t>(ret);
|
||||
return amd::smi::rsmi_to_amdsmi_status(ret);
|
||||
}
|
||||
|
||||
uint32_t device_count = 0;
|
||||
ret = rsmi_num_monitor_devices(&device_count);
|
||||
if (ret != RSMI_STATUS_SUCCESS) {
|
||||
return static_cast<amdsmi_status_t>(ret);
|
||||
return amd::smi::rsmi_to_amdsmi_status(ret);
|
||||
}
|
||||
|
||||
for (uint32_t i=0; i < device_count; i++) {
|
||||
@@ -115,7 +116,7 @@ amdsmi_status_t AMDSmiSystem::get_gpu_bdf_by_index(uint32_t index,
|
||||
uint64_t bdfid = 0;
|
||||
rsmi_status_t ret = rsmi_dev_pci_id_get(index, &bdfid);
|
||||
if (ret != RSMI_STATUS_SUCCESS) {
|
||||
return static_cast<amdsmi_status_t>(ret);
|
||||
return amd::smi::rsmi_to_amdsmi_status(ret);
|
||||
}
|
||||
|
||||
uint64_t domain = (bdfid >> 32) & 0xffffffff;
|
||||
@@ -140,7 +141,7 @@ amdsmi_status_t AMDSmiSystem::cleanup() {
|
||||
init_flag_ = AMDSMI_INIT_ALL_DEVICES;
|
||||
rsmi_status_t ret = rsmi_shut_down();
|
||||
if (ret != RSMI_STATUS_SUCCESS) {
|
||||
return static_cast<amdsmi_status_t>(ret);
|
||||
return amd::smi::rsmi_to_amdsmi_status(ret);
|
||||
}
|
||||
|
||||
drm_.cleanup();
|
||||
@@ -176,7 +177,7 @@ amdsmi_status_t AMDSmiSystem::handle_to_device(
|
||||
!= devices_.end()) {
|
||||
return AMDSMI_STATUS_SUCCESS;
|
||||
}
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
return AMDSMI_STATUS_NOT_FOUND;
|
||||
}
|
||||
|
||||
amdsmi_status_t AMDSmiSystem::gpu_index_to_handle(uint32_t gpu_index,
|
||||
|
||||
@@ -106,23 +106,23 @@ void TestAPISupportRead::Run(void) {
|
||||
std::cout << "Supported AMDSMI Functions:" << std::endl;
|
||||
std::cout << "\tVariants (Monitors)" << std::endl;
|
||||
}
|
||||
err = amdsmi_dev_supported_func_iterator_open(device_handles_[i], &iter_handle);
|
||||
err = amdsmi_dev_open_supported_func_iterator(device_handles_[i], &iter_handle);
|
||||
CHK_ERR_ASRT(err)
|
||||
|
||||
while (1) {
|
||||
err = amdsmi_func_iter_value_get(iter_handle, &value);
|
||||
err = amdsmi_get_func_iter_value(iter_handle, &value);
|
||||
CHK_ERR_ASRT(err)
|
||||
IF_VERB(STANDARD) {
|
||||
std::cout << "Function Name: " << value.name << std::endl;
|
||||
}
|
||||
err = amdsmi_dev_supported_variant_iterator_open(iter_handle, &var_iter);
|
||||
err = amdsmi_dev_open_supported_variant_iterator(iter_handle, &var_iter);
|
||||
if (err != AMDSMI_STATUS_NO_DATA) {
|
||||
CHK_ERR_ASRT(err)
|
||||
IF_VERB(STANDARD) {
|
||||
std::cout << "\tVariants/Monitors: ";
|
||||
}
|
||||
while (1) {
|
||||
err = amdsmi_func_iter_value_get(var_iter, &value);
|
||||
err = amdsmi_get_func_iter_value(var_iter, &value);
|
||||
CHK_ERR_ASRT(err)
|
||||
IF_VERB(STANDARD) {
|
||||
if (value.id == AMDSMI_DEFAULT_VARIANT) {
|
||||
@@ -133,31 +133,31 @@ void TestAPISupportRead::Run(void) {
|
||||
std::cout << " (";
|
||||
}
|
||||
err =
|
||||
amdsmi_dev_supported_variant_iterator_open(var_iter, &sub_var_iter);
|
||||
amdsmi_dev_open_supported_variant_iterator(var_iter, &sub_var_iter);
|
||||
if (err != AMDSMI_STATUS_NO_DATA) {
|
||||
CHK_ERR_ASRT(err)
|
||||
|
||||
while (1) {
|
||||
err = amdsmi_func_iter_value_get(sub_var_iter, &value);
|
||||
err = amdsmi_get_func_iter_value(sub_var_iter, &value);
|
||||
CHK_ERR_ASRT(err)
|
||||
IF_VERB(STANDARD) {
|
||||
std::cout << value.id << ", ";
|
||||
}
|
||||
err = amdsmi_func_iter_next(sub_var_iter);
|
||||
err = amdsmi_next_func_iter(sub_var_iter);
|
||||
|
||||
if (err == AMDSMI_STATUS_NO_DATA) {
|
||||
break;
|
||||
}
|
||||
CHK_ERR_ASRT(err)
|
||||
}
|
||||
err = amdsmi_dev_supported_func_iterator_close(&sub_var_iter);
|
||||
err = amdsmi_dev_close_supported_func_iterator(&sub_var_iter);
|
||||
CHK_ERR_ASRT(err)
|
||||
}
|
||||
|
||||
IF_VERB(STANDARD) {
|
||||
std::cout << "), ";
|
||||
}
|
||||
err = amdsmi_func_iter_next(var_iter);
|
||||
err = amdsmi_next_func_iter(var_iter);
|
||||
|
||||
if (err == AMDSMI_STATUS_NO_DATA) {
|
||||
break;
|
||||
@@ -167,21 +167,21 @@ void TestAPISupportRead::Run(void) {
|
||||
IF_VERB(STANDARD) {
|
||||
std::cout << std::endl;
|
||||
}
|
||||
err = amdsmi_dev_supported_func_iterator_close(&var_iter);
|
||||
err = amdsmi_dev_close_supported_func_iterator(&var_iter);
|
||||
CHK_ERR_ASRT(err)
|
||||
}
|
||||
|
||||
err = amdsmi_func_iter_next(iter_handle);
|
||||
err = amdsmi_next_func_iter(iter_handle);
|
||||
|
||||
if (err == AMDSMI_STATUS_NO_DATA) {
|
||||
break;
|
||||
}
|
||||
CHK_ERR_ASRT(err)
|
||||
|
||||
// err = amdsmi_dev_supported_variant_iterator_open(iter_handle, &var_iter);
|
||||
// err = amdsmi_dev_open_supported_variant_iterator(iter_handle, &var_iter);
|
||||
//
|
||||
}
|
||||
err = amdsmi_dev_supported_func_iterator_close(&iter_handle);
|
||||
err = amdsmi_dev_close_supported_func_iterator(&iter_handle);
|
||||
CHK_ERR_ASRT(err)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ void TestErrCntRead::Run(void) {
|
||||
for (uint32_t i = 0; i < num_monitor_devs(); ++i) {
|
||||
PrintDeviceHeader(device_handles_[i]);
|
||||
|
||||
err = amdsmi_dev_ecc_enabled_get(device_handles_[i], &enabled_mask);
|
||||
err = amdsmi_dev_get_ecc_enabled(device_handles_[i], &enabled_mask);
|
||||
if (err == AMDSMI_STATUS_NOT_SUPPORTED) {
|
||||
IF_VERB(STANDARD) {
|
||||
std::cout <<
|
||||
@@ -108,7 +108,7 @@ void TestErrCntRead::Run(void) {
|
||||
<< std::endl;
|
||||
}
|
||||
// Verify api support checking functionality is working
|
||||
err = amdsmi_dev_ecc_enabled_get(device_handles_[i], nullptr);
|
||||
err = amdsmi_dev_get_ecc_enabled(device_handles_[i], nullptr);
|
||||
ASSERT_EQ(err, AMDSMI_STATUS_INVAL);
|
||||
|
||||
continue;
|
||||
@@ -116,7 +116,7 @@ void TestErrCntRead::Run(void) {
|
||||
CHK_ERR_ASRT(err)
|
||||
|
||||
// Verify api support checking functionality is working
|
||||
err = amdsmi_dev_ecc_enabled_get(device_handles_[i], nullptr);
|
||||
err = amdsmi_dev_get_ecc_enabled(device_handles_[i], nullptr);
|
||||
ASSERT_EQ(err, AMDSMI_STATUS_INVAL);
|
||||
|
||||
IF_VERB(STANDARD) {
|
||||
@@ -126,7 +126,7 @@ void TestErrCntRead::Run(void) {
|
||||
}
|
||||
for (uint32_t b = AMDSMI_GPU_BLOCK_FIRST;
|
||||
b <= AMDSMI_GPU_BLOCK_LAST; b = b*2) {
|
||||
err = amdsmi_dev_ecc_status_get(device_handles_[i], static_cast<amdsmi_gpu_block_t>(b),
|
||||
err = amdsmi_dev_get_ecc_status(device_handles_[i], static_cast<amdsmi_gpu_block_t>(b),
|
||||
&err_state);
|
||||
CHK_ERR_ASRT(err)
|
||||
IF_VERB(STANDARD) {
|
||||
@@ -135,11 +135,11 @@ void TestErrCntRead::Run(void) {
|
||||
" block: " << GetErrStateNameStr(err_state) << std::endl;
|
||||
}
|
||||
// Verify api support checking functionality is working
|
||||
err = amdsmi_dev_ecc_status_get(device_handles_[i], static_cast<amdsmi_gpu_block_t>(b),
|
||||
err = amdsmi_dev_get_ecc_status(device_handles_[i], static_cast<amdsmi_gpu_block_t>(b),
|
||||
nullptr);
|
||||
ASSERT_EQ(err, AMDSMI_STATUS_INVAL);
|
||||
|
||||
err = amdsmi_dev_ecc_count_get(device_handles_[i], static_cast<amdsmi_gpu_block_t>(b), &ec);
|
||||
err = amdsmi_dev_get_ecc_count(device_handles_[i], static_cast<amdsmi_gpu_block_t>(b), &ec);
|
||||
|
||||
if (err == AMDSMI_STATUS_NOT_SUPPORTED) {
|
||||
IF_VERB(STANDARD) {
|
||||
@@ -148,7 +148,7 @@ void TestErrCntRead::Run(void) {
|
||||
": Not supported for this device" << std::endl;
|
||||
}
|
||||
// Verify api support checking functionality is working
|
||||
err = amdsmi_dev_ecc_count_get(device_handles_[i], static_cast<amdsmi_gpu_block_t>(b),
|
||||
err = amdsmi_dev_get_ecc_count(device_handles_[i], static_cast<amdsmi_gpu_block_t>(b),
|
||||
nullptr);
|
||||
ASSERT_EQ(err, AMDSMI_STATUS_INVAL);
|
||||
|
||||
@@ -164,7 +164,7 @@ void TestErrCntRead::Run(void) {
|
||||
<< std::endl;
|
||||
}
|
||||
// Verify api support checking functionality is working
|
||||
err = amdsmi_dev_ecc_count_get(device_handles_[i], static_cast<amdsmi_gpu_block_t>(b),
|
||||
err = amdsmi_dev_get_ecc_count(device_handles_[i], static_cast<amdsmi_gpu_block_t>(b),
|
||||
nullptr);
|
||||
ASSERT_EQ(err, AMDSMI_STATUS_INVAL);
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ void TestEvtNotifReadWrite::Run(void) {
|
||||
}
|
||||
|
||||
for (dv_ind = 0; dv_ind < num_monitor_devs(); ++dv_ind) {
|
||||
ret = amdsmi_event_notification_init(device_handles_[dv_ind]);
|
||||
ret = amdsmi_init_event_notification(device_handles_[dv_ind]);
|
||||
if (ret == AMDSMI_STATUS_NOT_SUPPORTED) {
|
||||
IF_VERB(STANDARD) {
|
||||
std::cout <<
|
||||
@@ -119,7 +119,7 @@ void TestEvtNotifReadWrite::Run(void) {
|
||||
return;
|
||||
}
|
||||
ASSERT_EQ(ret, AMDSMI_STATUS_SUCCESS);
|
||||
ret = amdsmi_event_notification_mask_set(device_handles_[dv_ind], mask);
|
||||
ret = amdsmi_set_event_notification_mask(device_handles_[dv_ind], mask);
|
||||
ASSERT_EQ(ret, AMDSMI_STATUS_SUCCESS);
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ void TestEvtNotifReadWrite::Run(void) {
|
||||
uint32_t num_elem = 10;
|
||||
bool read_again = false;
|
||||
|
||||
ret = amdsmi_event_notification_get(10000, &num_elem, data);
|
||||
ret = amdsmi_get_event_notification(10000, &num_elem, data);
|
||||
if (ret == AMDSMI_STATUS_SUCCESS || ret == AMDSMI_STATUS_INSUFFICIENT_SIZE) {
|
||||
EXPECT_LE(num_elem, 10) <<
|
||||
"Expected the number of elements found to be <= buffer size (10)";
|
||||
@@ -155,13 +155,13 @@ void TestEvtNotifReadWrite::Run(void) {
|
||||
} else {
|
||||
// This should always fail. We want to print out the return code.
|
||||
EXPECT_EQ(ret, AMDSMI_STATUS_SUCCESS) <<
|
||||
"Unexpected return code for amdsmi_event_notification_get()";
|
||||
"Unexpected return code for amdsmi_get_event_notification()";
|
||||
}
|
||||
|
||||
// In case GPU Pre reset event was collected in the previous read,
|
||||
// read again to get the GPU Post reset event.
|
||||
if (read_again) {
|
||||
ret = amdsmi_event_notification_get(10000, &num_elem, data);
|
||||
ret = amdsmi_get_event_notification(10000, &num_elem, data);
|
||||
if (ret == AMDSMI_STATUS_SUCCESS || ret == AMDSMI_STATUS_INSUFFICIENT_SIZE) {
|
||||
EXPECT_LE(num_elem, 10) <<
|
||||
"Expected the number of elements found to be <= buffer size (10)";
|
||||
@@ -186,12 +186,12 @@ void TestEvtNotifReadWrite::Run(void) {
|
||||
} else {
|
||||
// This should always fail. We want to print out the return code.
|
||||
EXPECT_EQ(ret, AMDSMI_STATUS_SUCCESS) <<
|
||||
"Unexpected return code for amdsmi_event_notification_get()";
|
||||
"Unexpected return code for amdsmi_get_event_notification()";
|
||||
}
|
||||
}
|
||||
|
||||
for (uint32_t dv_ind = 0; dv_ind < num_monitor_devs(); ++dv_ind) {
|
||||
ret = amdsmi_event_notification_stop(device_handles_[dv_ind]);
|
||||
ret = amdsmi_stop_event_notification(device_handles_[dv_ind]);
|
||||
ASSERT_EQ(ret, AMDSMI_STATUS_SUCCESS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ void TestFanRead::Run(void) {
|
||||
IF_VERB(STANDARD) {
|
||||
std::cout << "\t**Current Fan Speed: ";
|
||||
}
|
||||
err = amdsmi_dev_fan_speed_get(device_handles_[i], 0, &val_i64);
|
||||
err = amdsmi_dev_get_fan_speed(device_handles_[i], 0, &val_i64);
|
||||
if (err == AMDSMI_STATUS_NOT_SUPPORTED) {
|
||||
IF_VERB(STANDARD) {
|
||||
std::cout << "\t**" << ": " <<
|
||||
@@ -114,30 +114,30 @@ void TestFanRead::Run(void) {
|
||||
|
||||
|
||||
// Verify api support checking functionality is working
|
||||
err = amdsmi_dev_fan_speed_get(device_handles_[i], 0, nullptr);
|
||||
err = amdsmi_dev_get_fan_speed(device_handles_[i], 0, nullptr);
|
||||
ASSERT_EQ(err, AMDSMI_STATUS_INVAL);
|
||||
|
||||
err = amdsmi_dev_fan_speed_max_get(device_handles_[i], 0, &val_ui64);
|
||||
err = amdsmi_dev_get_fan_speed_max(device_handles_[i], 0, &val_ui64);
|
||||
CHK_ERR_ASRT(err)
|
||||
IF_VERB(STANDARD) {
|
||||
std::cout << val_i64/static_cast<float>(val_ui64)*100;
|
||||
std::cout << "% ("<< val_i64 << "/" << val_ui64 << ")" << std::endl;
|
||||
}
|
||||
// Verify api support checking functionality is working
|
||||
err = amdsmi_dev_fan_speed_max_get(device_handles_[i], 0, nullptr);
|
||||
err = amdsmi_dev_get_fan_speed_max(device_handles_[i], 0, nullptr);
|
||||
ASSERT_EQ(err, AMDSMI_STATUS_INVAL);
|
||||
|
||||
IF_VERB(STANDARD) {
|
||||
std::cout << "\t**Current fan RPMs: ";
|
||||
}
|
||||
err = amdsmi_dev_fan_rpms_get(device_handles_[i], 0, &val_i64);
|
||||
err = amdsmi_dev_get_fan_rpms(device_handles_[i], 0, &val_i64);
|
||||
CHK_ERR_ASRT(err)
|
||||
IF_VERB(STANDARD) {
|
||||
std::cout << val_i64 << std::endl;
|
||||
}
|
||||
|
||||
// Verify api support checking functionality is working
|
||||
err = amdsmi_dev_fan_rpms_get(device_handles_[i], 0, nullptr);
|
||||
err = amdsmi_dev_get_fan_rpms(device_handles_[i], 0, nullptr);
|
||||
ASSERT_EQ(err, AMDSMI_STATUS_INVAL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ void TestFanReadWrite::Run(void) {
|
||||
for (uint32_t dv_ind = 0; dv_ind < num_monitor_devs(); ++dv_ind) {
|
||||
PrintDeviceHeader(device_handles_[dv_ind]);
|
||||
|
||||
ret = amdsmi_dev_fan_speed_get(device_handles_[dv_ind], 0, &orig_speed);
|
||||
ret = amdsmi_dev_get_fan_speed(device_handles_[dv_ind], 0, &orig_speed);
|
||||
if (ret == AMDSMI_STATUS_NOT_SUPPORTED) {
|
||||
IF_VERB(STANDARD) {
|
||||
std::cout << "\t**" << ": " <<
|
||||
@@ -120,7 +120,7 @@ void TestFanReadWrite::Run(void) {
|
||||
return;
|
||||
}
|
||||
|
||||
ret = amdsmi_dev_fan_speed_max_get(device_handles_[dv_ind], 0, &max_speed);
|
||||
ret = amdsmi_dev_get_fan_speed_max(device_handles_[dv_ind], 0, &max_speed);
|
||||
CHK_ERR_ASRT(ret)
|
||||
|
||||
new_speed = 1.1 * orig_speed;
|
||||
@@ -136,12 +136,12 @@ void TestFanReadWrite::Run(void) {
|
||||
std::cout << "Setting fan speed to " << new_speed << std::endl;
|
||||
}
|
||||
|
||||
ret = amdsmi_dev_fan_speed_set(device_handles_[dv_ind], 0, new_speed);
|
||||
ret = amdsmi_dev_set_fan_speed(device_handles_[dv_ind], 0, new_speed);
|
||||
CHK_ERR_ASRT(ret)
|
||||
|
||||
sleep(4);
|
||||
|
||||
ret = amdsmi_dev_fan_speed_get(device_handles_[dv_ind], 0, &cur_speed);
|
||||
ret = amdsmi_dev_get_fan_speed(device_handles_[dv_ind], 0, &cur_speed);
|
||||
CHK_ERR_ASRT(ret)
|
||||
|
||||
IF_VERB(STANDARD) {
|
||||
@@ -163,12 +163,12 @@ void TestFanReadWrite::Run(void) {
|
||||
std::cout << "Resetting fan control to auto..." << std::endl;
|
||||
}
|
||||
|
||||
ret = amdsmi_dev_fan_reset(device_handles_[dv_ind], 0);
|
||||
ret = amdsmi_dev_reset_fan(device_handles_[dv_ind], 0);
|
||||
CHK_ERR_ASRT(ret)
|
||||
|
||||
sleep(3);
|
||||
|
||||
ret = amdsmi_dev_fan_speed_get(device_handles_[dv_ind], 0, &cur_speed);
|
||||
ret = amdsmi_dev_get_fan_speed(device_handles_[dv_ind], 0, &cur_speed);
|
||||
CHK_ERR_ASRT(ret)
|
||||
|
||||
IF_VERB(STANDARD) {
|
||||
|
||||
@@ -116,12 +116,12 @@ void TestFrequenciesRead::Run(void) {
|
||||
for (uint32_t x = 0; x < num_iterations(); ++x) {
|
||||
for (uint32_t i = 0; i < num_monitor_devs(); ++i) {
|
||||
auto freq_output = [&](amdsmi_clk_type_t t, const char *name) {
|
||||
err = amdsmi_dev_gpu_clk_freq_get(device_handles_[i], t, &f);
|
||||
err = amdsmi_dev_get_gpu_clk_freq(device_handles_[i], t, &f);
|
||||
if (err == AMDSMI_STATUS_NOT_SUPPORTED) {
|
||||
std::cout << "\t**Get " << name <<
|
||||
": Not supported on this machine" << std::endl;
|
||||
// Verify api support checking functionality is working
|
||||
err = amdsmi_dev_gpu_clk_freq_get(device_handles_[i], t, nullptr);
|
||||
err = amdsmi_dev_get_gpu_clk_freq(device_handles_[i], t, nullptr);
|
||||
ASSERT_EQ(err, AMDSMI_STATUS_INVAL);
|
||||
} else if (err == AMDSMI_STATUS_NOT_YET_IMPLEMENTED) {
|
||||
std::cout << "\t**Get " << name <<
|
||||
@@ -133,7 +133,7 @@ void TestFrequenciesRead::Run(void) {
|
||||
std::cout << f.num_supported << std::endl;
|
||||
print_frequencies(&f);
|
||||
// Verify api support checking functionality is working
|
||||
err = amdsmi_dev_gpu_clk_freq_get(device_handles_[i], t, nullptr);
|
||||
err = amdsmi_dev_get_gpu_clk_freq(device_handles_[i], t, nullptr);
|
||||
ASSERT_EQ(err, AMDSMI_STATUS_INVAL);
|
||||
}
|
||||
}
|
||||
@@ -147,12 +147,12 @@ void TestFrequenciesRead::Run(void) {
|
||||
freq_output(CLK_TYPE_DCEF, "Display Controller Engine Clock");
|
||||
freq_output(CLK_TYPE_SOC, "SOC Clock");
|
||||
|
||||
err = amdsmi_dev_pci_bandwidth_get(device_handles_[i], &b);
|
||||
err = amdsmi_dev_get_pci_bandwidth(device_handles_[i], &b);
|
||||
if (err == AMDSMI_STATUS_NOT_SUPPORTED) {
|
||||
std::cout << "\t**Get PCIE Bandwidth: Not supported on this machine"
|
||||
<< std::endl;
|
||||
// Verify api support checking functionality is working
|
||||
err = amdsmi_dev_pci_bandwidth_get(device_handles_[i], nullptr);
|
||||
err = amdsmi_dev_get_pci_bandwidth(device_handles_[i], nullptr);
|
||||
ASSERT_EQ(err, AMDSMI_STATUS_NOT_SUPPORTED);
|
||||
} else if (err == AMDSMI_STATUS_NOT_YET_IMPLEMENTED) {
|
||||
std::cout << "\t**Get PCIE Bandwidth "
|
||||
@@ -164,7 +164,7 @@ void TestFrequenciesRead::Run(void) {
|
||||
std::cout << b.transfer_rate.num_supported << std::endl;
|
||||
print_frequencies(&b.transfer_rate, b.lanes);
|
||||
// Verify api support checking functionality is working
|
||||
err = amdsmi_dev_pci_bandwidth_get(device_handles_[i], nullptr);
|
||||
err = amdsmi_dev_get_pci_bandwidth(device_handles_[i], nullptr);
|
||||
ASSERT_EQ(err, AMDSMI_STATUS_INVAL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ void TestFrequenciesReadWrite::Run(void) {
|
||||
std::cout << amdsmi_clk << std::endl;
|
||||
if (amdsmi_clk == CLK_TYPE_PCIE)
|
||||
return false;
|
||||
ret = amdsmi_dev_gpu_clk_freq_get(device_handles_[dv_ind], amdsmi_clk, &f);
|
||||
ret = amdsmi_dev_get_gpu_clk_freq(device_handles_[dv_ind], amdsmi_clk, &f);
|
||||
std::cout << ret << std::endl;
|
||||
|
||||
if (ret == AMDSMI_STATUS_NOT_SUPPORTED ||
|
||||
@@ -151,7 +151,7 @@ void TestFrequenciesReadWrite::Run(void) {
|
||||
FreqEnumToStr(amdsmi_clk) << " to 0b" << freq_bm_str << " ..." <<
|
||||
std::endl;
|
||||
}
|
||||
ret = amdsmi_dev_gpu_clk_freq_set(device_handles_[dv_ind], amdsmi_clk, freq_bitmask);
|
||||
ret = amdsmi_dev_set_clk_freq(device_handles_[dv_ind], amdsmi_clk, freq_bitmask);
|
||||
//Certain ASICs does not allow to set particular clocks. If set function for a clock returns
|
||||
//permission error despite root access, manually set ret value to success and return
|
||||
if (ret == AMDSMI_STATUS_NO_PERM && geteuid() == 0) {
|
||||
@@ -166,7 +166,7 @@ void TestFrequenciesReadWrite::Run(void) {
|
||||
return;
|
||||
}
|
||||
CHK_ERR_ASRT(ret)
|
||||
ret = amdsmi_dev_gpu_clk_freq_get(device_handles_[dv_ind], amdsmi_clk, &f);
|
||||
ret = amdsmi_dev_get_gpu_clk_freq(device_handles_[dv_ind], amdsmi_clk, &f);
|
||||
if (ret != AMDSMI_STATUS_SUCCESS) {
|
||||
return;
|
||||
}
|
||||
@@ -175,12 +175,12 @@ void TestFrequenciesReadWrite::Run(void) {
|
||||
std::cout << "Frequency is now index " << f.current << std::endl;
|
||||
std::cout << "Resetting mask to all frequencies." << std::endl;
|
||||
}
|
||||
ret = amdsmi_dev_gpu_clk_freq_set(device_handles_[dv_ind], amdsmi_clk, 0xFFFFFFFF);
|
||||
ret = amdsmi_dev_set_clk_freq(device_handles_[dv_ind], amdsmi_clk, 0xFFFFFFFF);
|
||||
if (ret != AMDSMI_STATUS_SUCCESS) {
|
||||
return;
|
||||
}
|
||||
|
||||
ret = amdsmi_dev_perf_level_set(device_handles_[dv_ind], AMDSMI_DEV_PERF_LEVEL_AUTO);
|
||||
ret = amdsmi_dev_set_perf_level(device_handles_[dv_ind], AMDSMI_DEV_PERF_LEVEL_AUTO);
|
||||
if (ret != AMDSMI_STATUS_SUCCESS) {
|
||||
return;
|
||||
}
|
||||
@@ -194,7 +194,7 @@ void TestFrequenciesReadWrite::Run(void) {
|
||||
freq_write();
|
||||
CHK_ERR_ASRT(ret)
|
||||
#if 0
|
||||
ret = amdsmi_dev_gpu_clk_freq_get(dv_ind, amdsmi_clk, &f);
|
||||
ret = amdsmi_dev_get_gpu_clk_freq(dv_ind, amdsmi_clk, &f);
|
||||
CHK_ERR_ASRT(ret)
|
||||
|
||||
IF_VERB(STANDARD) {
|
||||
@@ -215,20 +215,20 @@ void TestFrequenciesReadWrite::Run(void) {
|
||||
std::cout << "Setting frequency mask for clock " << amdsmi_clk <<
|
||||
" to 0b" << freq_bm_str << " ..." << std::endl;
|
||||
}
|
||||
ret = amdsmi_dev_gpu_clk_freq_set(dv_ind, amdsmi_clk, freq_bitmask);
|
||||
ret = amdsmi_dev_set_clk_freq(dv_ind, amdsmi_clk, freq_bitmask);
|
||||
CHK_ERR_ASRT(ret)
|
||||
|
||||
ret = amdsmi_dev_gpu_clk_freq_get(dv_ind, amdsmi_clk, &f);
|
||||
ret = amdsmi_dev_get_gpu_clk_freq(dv_ind, amdsmi_clk, &f);
|
||||
CHK_ERR_ASRT(ret)
|
||||
|
||||
IF_VERB(STANDARD) {
|
||||
std::cout << "Frequency is now index " << f.current << std::endl;
|
||||
std::cout << "Resetting mask to all frequencies." << std::endl;
|
||||
}
|
||||
ret = amdsmi_dev_gpu_clk_freq_set(dv_ind, amdsmi_clk, 0xFFFFFFFF);
|
||||
ret = amdsmi_dev_set_clk_freq(dv_ind, amdsmi_clk, 0xFFFFFFFF);
|
||||
CHK_ERR_ASRT(ret)
|
||||
|
||||
ret = amdsmi_dev_perf_level_set(dv_ind, AMDSMI_DEV_PERF_LEVEL_AUTO);
|
||||
ret = amdsmi_dev_set_perf_level(dv_ind, AMDSMI_DEV_PERF_LEVEL_AUTO);
|
||||
CHK_ERR_ASRT(ret)
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ void TestGPUBusyRead::Run(void) {
|
||||
for (uint32_t i = 0; i < num_monitor_devs(); ++i) {
|
||||
PrintDeviceHeader(device_handles_[i]);
|
||||
|
||||
err = amdsmi_dev_busy_percent_get(device_handles_[i], &val_ui32);
|
||||
err = amdsmi_dev_get_busy_percent(device_handles_[i], &val_ui32);
|
||||
if (err != AMDSMI_STATUS_SUCCESS) {
|
||||
if (err == AMDSMI_STATUS_FILE_ERROR) {
|
||||
IF_VERB(STANDARD) {
|
||||
|
||||
@@ -103,7 +103,7 @@ void TestGpuMetricsRead::Run(void) {
|
||||
std::cout << "\t**GPU METRICS:\n";
|
||||
}
|
||||
amdsmi_gpu_metrics_t smu;
|
||||
err = amdsmi_dev_gpu_metrics_info_get(device_handles_[i], &smu);
|
||||
err = amdsmi_dev_get_gpu_metrics_info(device_handles_[i], &smu);
|
||||
if (err != AMDSMI_STATUS_SUCCESS) {
|
||||
if (err == AMDSMI_STATUS_NOT_SUPPORTED) {
|
||||
IF_VERB(STANDARD) {
|
||||
@@ -188,7 +188,7 @@ void TestGpuMetricsRead::Run(void) {
|
||||
}
|
||||
|
||||
// Verify api support checking functionality is working
|
||||
err = amdsmi_dev_gpu_metrics_info_get(device_handles_[i], nullptr);
|
||||
err = amdsmi_dev_get_gpu_metrics_info(device_handles_[i], nullptr);
|
||||
ASSERT_EQ(err, AMDSMI_STATUS_INVAL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,11 +105,11 @@ void TestIdInfoRead::Run(void) {
|
||||
}
|
||||
|
||||
// Get the device ID, name, vendor ID and vendor name for the device
|
||||
err = amdsmi_dev_id_get(device_handles_[i], &id);
|
||||
err = amdsmi_dev_get_id(device_handles_[i], &id);
|
||||
if (err == AMDSMI_STATUS_NOT_SUPPORTED) {
|
||||
amdsmi_status_t ret;
|
||||
// Verify api support checking functionality is working
|
||||
ret = amdsmi_dev_id_get(device_handles_[i], nullptr);
|
||||
ret = amdsmi_dev_get_id(device_handles_[i], nullptr);
|
||||
ASSERT_EQ(ret, AMDSMI_STATUS_NOT_SUPPORTED);
|
||||
} else {
|
||||
CHK_ERR_ASRT(err)
|
||||
@@ -118,7 +118,7 @@ void TestIdInfoRead::Run(void) {
|
||||
std::cout << "\t**Device ID: 0x" << std::hex << id << std::endl;
|
||||
}
|
||||
// Verify api support checking functionality is working
|
||||
err = amdsmi_dev_id_get(device_handles_[i], nullptr);
|
||||
err = amdsmi_dev_get_id(device_handles_[i], nullptr);
|
||||
ASSERT_EQ(err, AMDSMI_STATUS_INVAL);
|
||||
}
|
||||
|
||||
@@ -132,11 +132,11 @@ void TestIdInfoRead::Run(void) {
|
||||
err = amdsmi_get_board_info(device_handles_[0], &board_info);
|
||||
CHK_ERR_ASRT(err)
|
||||
|
||||
err = amdsmi_dev_vram_vendor_get(device_handles_[i], buffer, kBufferLen);
|
||||
err = amdsmi_dev_get_vram_vendor(device_handles_[i], buffer, kBufferLen);
|
||||
if (err == AMDSMI_STATUS_NOT_SUPPORTED) {
|
||||
std::cout <<
|
||||
"\t**Vram Vendor string not supported on this system." << std::endl;
|
||||
err = amdsmi_dev_vram_vendor_get(device_handles_[i], nullptr, kBufferLen);
|
||||
err = amdsmi_dev_get_vram_vendor(device_handles_[i], nullptr, kBufferLen);
|
||||
ASSERT_EQ(err, AMDSMI_STATUS_NOT_SUPPORTED);
|
||||
} else {
|
||||
CHK_ERR_ASRT(err)
|
||||
@@ -145,10 +145,10 @@ void TestIdInfoRead::Run(void) {
|
||||
}
|
||||
}
|
||||
|
||||
err = amdsmi_dev_drm_render_minor_get(device_handles_[i], &drm_render_minor);
|
||||
err = amdsmi_dev_get_drm_render_minor(device_handles_[i], &drm_render_minor);
|
||||
if (err == AMDSMI_STATUS_NOT_SUPPORTED) {
|
||||
// Verify api support checking functionality is working
|
||||
err = amdsmi_dev_drm_render_minor_get(device_handles_[i], nullptr);
|
||||
err = amdsmi_dev_get_drm_render_minor(device_handles_[i], nullptr);
|
||||
ASSERT_EQ(err, AMDSMI_STATUS_NOT_SUPPORTED);
|
||||
} else {
|
||||
CHK_ERR_ASRT(err)
|
||||
@@ -156,15 +156,15 @@ void TestIdInfoRead::Run(void) {
|
||||
std::cout << "\t**DRM Render Minor: " << drm_render_minor << std::endl;
|
||||
}
|
||||
// Verify api support checking functionality is working
|
||||
err = amdsmi_dev_drm_render_minor_get(device_handles_[i], nullptr);
|
||||
err = amdsmi_dev_get_drm_render_minor(device_handles_[i], nullptr);
|
||||
ASSERT_EQ(err, AMDSMI_STATUS_INVAL);
|
||||
}
|
||||
err = amdsmi_dev_vendor_name_get(device_handles_[i], buffer, kBufferLen);
|
||||
err = amdsmi_dev_get_vendor_name(device_handles_[i], buffer, kBufferLen);
|
||||
if (err == AMDSMI_STATUS_NOT_SUPPORTED) {
|
||||
std::cout << "\t**Device Vendor name string not found on this system." <<
|
||||
std::endl;
|
||||
// Verify api support checking functionality is working
|
||||
err = amdsmi_dev_vendor_name_get(device_handles_[i], nullptr, kBufferLen);
|
||||
err = amdsmi_dev_get_vendor_name(device_handles_[i], nullptr, kBufferLen);
|
||||
ASSERT_EQ(err, AMDSMI_STATUS_NOT_SUPPORTED);
|
||||
} else {
|
||||
CHK_ERR_ASRT(err)
|
||||
@@ -172,15 +172,15 @@ void TestIdInfoRead::Run(void) {
|
||||
std::cout << "\t**Device Vendor name: " << buffer << std::endl;
|
||||
}
|
||||
// Verify api support checking functionality is working
|
||||
err = amdsmi_dev_vendor_name_get(device_handles_[i], nullptr, kBufferLen);
|
||||
err = amdsmi_dev_get_vendor_name(device_handles_[i], nullptr, kBufferLen);
|
||||
ASSERT_EQ(err, AMDSMI_STATUS_INVAL);
|
||||
}
|
||||
|
||||
// Get the device ID, name, vendor ID and vendor name for the sub-device
|
||||
err = amdsmi_dev_subsystem_id_get(device_handles_[i], &id);
|
||||
err = amdsmi_dev_get_subsystem_id(device_handles_[i], &id);
|
||||
if (err == AMDSMI_STATUS_NOT_SUPPORTED) {
|
||||
// Verify api support checking functionality is working
|
||||
err = amdsmi_dev_subsystem_id_get(device_handles_[i], nullptr);
|
||||
err = amdsmi_dev_get_subsystem_id(device_handles_[i], nullptr);
|
||||
ASSERT_EQ(err, AMDSMI_STATUS_NOT_SUPPORTED);
|
||||
} else {
|
||||
CHK_ERR_ASRT(err)
|
||||
@@ -188,15 +188,15 @@ void TestIdInfoRead::Run(void) {
|
||||
std::cout << "\t**Subsystem ID: 0x" << std::hex << id << std::endl;
|
||||
}
|
||||
// Verify api support checking functionality is working
|
||||
err = amdsmi_dev_subsystem_id_get(device_handles_[i], nullptr);
|
||||
err = amdsmi_dev_get_subsystem_id(device_handles_[i], nullptr);
|
||||
ASSERT_EQ(err, AMDSMI_STATUS_INVAL);
|
||||
}
|
||||
err = amdsmi_dev_subsystem_name_get(device_handles_[i], buffer, kBufferLen);
|
||||
err = amdsmi_dev_get_subsystem_name(device_handles_[i], buffer, kBufferLen);
|
||||
if (err == AMDSMI_STATUS_NOT_SUPPORTED) {
|
||||
std::cout << "\t**Subsystem name string not found on this system." <<
|
||||
std::endl;
|
||||
// Verify api support checking functionality is working
|
||||
err = amdsmi_dev_subsystem_name_get(device_handles_[i], nullptr, kBufferLen);
|
||||
err = amdsmi_dev_get_subsystem_name(device_handles_[i], nullptr, kBufferLen);
|
||||
ASSERT_EQ(err, AMDSMI_STATUS_NOT_SUPPORTED);
|
||||
} else {
|
||||
CHK_ERR_ASRT(err)
|
||||
@@ -204,7 +204,7 @@ void TestIdInfoRead::Run(void) {
|
||||
std::cout << "\t**Subsystem name: " << buffer << std::endl;
|
||||
}
|
||||
// Verify api support checking functionality is working
|
||||
err = amdsmi_dev_subsystem_name_get(device_handles_[i], nullptr, kBufferLen);
|
||||
err = amdsmi_dev_get_subsystem_name(device_handles_[i], nullptr, kBufferLen);
|
||||
ASSERT_EQ(err, AMDSMI_STATUS_INVAL);
|
||||
}
|
||||
|
||||
@@ -213,13 +213,13 @@ void TestIdInfoRead::Run(void) {
|
||||
asci_info.subvendor_id << std::endl;
|
||||
}
|
||||
|
||||
err = amdsmi_dev_vendor_name_get(device_handles_[i], buffer, kBufferLen);
|
||||
err = amdsmi_dev_get_vendor_name(device_handles_[i], buffer, kBufferLen);
|
||||
if (err == AMDSMI_STATUS_NOT_SUPPORTED) {
|
||||
std::cout <<
|
||||
"\t**Subsystem Vendor name string not found on this system." <<
|
||||
std::endl;
|
||||
// Verify api support checking functionality is working
|
||||
err = amdsmi_dev_vendor_name_get(device_handles_[i], nullptr, kBufferLen);
|
||||
err = amdsmi_dev_get_vendor_name(device_handles_[i], nullptr, kBufferLen);
|
||||
ASSERT_EQ(err, AMDSMI_STATUS_NOT_SUPPORTED);
|
||||
} else {
|
||||
CHK_ERR_ASRT(err)
|
||||
@@ -227,11 +227,11 @@ void TestIdInfoRead::Run(void) {
|
||||
std::cout << "\t**Subsystem Vendor name: " << buffer << std::endl;
|
||||
}
|
||||
// Verify api support checking functionality is working
|
||||
err = amdsmi_dev_vendor_name_get(device_handles_[i], nullptr, kBufferLen);
|
||||
err = amdsmi_dev_get_vendor_name(device_handles_[i], nullptr, kBufferLen);
|
||||
ASSERT_EQ(err, AMDSMI_STATUS_INVAL);
|
||||
}
|
||||
|
||||
err = amdsmi_dev_pci_id_get(device_handles_[i], &val_ui64);
|
||||
err = amdsmi_dev_get_pci_id(device_handles_[i], &val_ui64);
|
||||
// Don't check for AMDSMI_STATUS_NOT_SUPPORTED since this should always be
|
||||
// supported. It is not based on a sysfs file.
|
||||
CHK_ERR_ASRT(err)
|
||||
@@ -240,7 +240,7 @@ void TestIdInfoRead::Run(void) {
|
||||
std::cout << " (" << std::dec << val_ui64 << ")" << std::endl;
|
||||
}
|
||||
// Verify api support checking functionality is working
|
||||
err = amdsmi_dev_pci_id_get(device_handles_[i], nullptr);
|
||||
err = amdsmi_dev_get_pci_id(device_handles_[i], nullptr);
|
||||
ASSERT_EQ(err, AMDSMI_STATUS_INVAL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ void TestMemPageInfoRead::Run(void) {
|
||||
for (uint32_t i = 0; i < num_monitor_devs(); ++i) {
|
||||
PrintDeviceHeader(device_handles_[i]);
|
||||
|
||||
err = amdsmi_dev_memory_reserved_pages_get(device_handles_[i], &num_pages, nullptr);
|
||||
err = amdsmi_dev_get_memory_reserved_pages(device_handles_[i], &num_pages, nullptr);
|
||||
|
||||
if (err == AMDSMI_STATUS_NOT_SUPPORTED) {
|
||||
std::cout <<
|
||||
@@ -104,7 +104,7 @@ void TestMemPageInfoRead::Run(void) {
|
||||
<< std::endl;
|
||||
|
||||
// Verify api support checking functionality is working
|
||||
err = amdsmi_dev_memory_reserved_pages_get(device_handles_[i], nullptr, nullptr);
|
||||
err = amdsmi_dev_get_memory_reserved_pages(device_handles_[i], nullptr, nullptr);
|
||||
ASSERT_EQ(err, AMDSMI_STATUS_NOT_SUPPORTED);
|
||||
|
||||
continue;
|
||||
@@ -115,7 +115,7 @@ void TestMemPageInfoRead::Run(void) {
|
||||
std::endl;
|
||||
}
|
||||
// Verify api support checking functionality is working
|
||||
err = amdsmi_dev_memory_reserved_pages_get(device_handles_[i], nullptr, nullptr);
|
||||
err = amdsmi_dev_get_memory_reserved_pages(device_handles_[i], nullptr, nullptr);
|
||||
ASSERT_EQ(err, AMDSMI_STATUS_INVAL);
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ void TestMemPageInfoRead::Run(void) {
|
||||
|
||||
assert(records != nullptr);
|
||||
|
||||
err = amdsmi_dev_memory_reserved_pages_get(device_handles_[i], &num_pages, records);
|
||||
err = amdsmi_dev_get_memory_reserved_pages(device_handles_[i], &num_pages, records);
|
||||
if (err == AMDSMI_STATUS_NOT_SUPPORTED) {
|
||||
std::cout << "\t**Getting Memory Page Retirement Status not "
|
||||
"supported for this device" << std::endl;
|
||||
|
||||
@@ -119,8 +119,8 @@ void TestMemUtilRead::Run(void) {
|
||||
PrintDeviceHeader(device_handles_[i]);
|
||||
|
||||
#if 0
|
||||
err = amdsmi_dev_memory_busy_percent_get(i, &mem_busy_percent);
|
||||
err_chk("amdsmi_dev_memory_busy_percent_get()");
|
||||
err = amdsmi_dev_get_memory_busy_percent(i, &mem_busy_percent);
|
||||
err_chk("amdsmi_dev_get_memory_busy_percent()");
|
||||
if (err != AMDSMI_STATUS_SUCCESS) {
|
||||
return;
|
||||
}
|
||||
@@ -131,16 +131,16 @@ void TestMemUtilRead::Run(void) {
|
||||
#endif
|
||||
for (uint32_t mem_type = AMDSMI_MEM_TYPE_FIRST;
|
||||
mem_type <= AMDSMI_MEM_TYPE_LAST; ++mem_type) {
|
||||
err = amdsmi_dev_memory_total_get(device_handles_[i],
|
||||
err = amdsmi_dev_get_memory_total(device_handles_[i],
|
||||
static_cast<amdsmi_memory_type_t>(mem_type), &total);
|
||||
err_chk("amdsmi_dev_memory_total_get()");
|
||||
err_chk("amdsmi_dev_get_memory_total()");
|
||||
if (err != AMDSMI_STATUS_SUCCESS) {
|
||||
return;
|
||||
}
|
||||
|
||||
err = amdsmi_dev_memory_usage_get(device_handles_[i],
|
||||
err = amdsmi_dev_get_memory_usage(device_handles_[i],
|
||||
static_cast<amdsmi_memory_type_t>(mem_type), &usage);
|
||||
err_chk("amdsmi_dev_memory_usage_get()");
|
||||
err_chk("amdsmi_dev_get_memory_usage()");
|
||||
if (err != AMDSMI_STATUS_SUCCESS) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ void TestMetricsCounterRead::Run(void) {
|
||||
uint64_t power;
|
||||
uint64_t timestamp;
|
||||
float counter_resolution;
|
||||
err = amdsmi_dev_energy_count_get(device_handles_[i], &power, &counter_resolution, ×tamp);
|
||||
err = amdsmi_dev_get_energy_count(device_handles_[i], &power, &counter_resolution, ×tamp);
|
||||
if (err != AMDSMI_STATUS_SUCCESS) {
|
||||
if (err == AMDSMI_STATUS_NOT_SUPPORTED) {
|
||||
IF_VERB(STANDARD) {
|
||||
@@ -128,14 +128,14 @@ void TestMetricsCounterRead::Run(void) {
|
||||
}
|
||||
|
||||
// Verify api support checking functionality is working
|
||||
err = amdsmi_dev_energy_count_get(device_handles_[i], nullptr, nullptr, nullptr);
|
||||
err = amdsmi_dev_get_energy_count(device_handles_[i], nullptr, nullptr, nullptr);
|
||||
ASSERT_EQ(err, AMDSMI_STATUS_INVAL);
|
||||
|
||||
// Coarse Grain counters
|
||||
amdsmi_utilization_counter_t utilization_counters[2];
|
||||
utilization_counters[0].type = AMDSMI_COARSE_GRAIN_GFX_ACTIVITY;
|
||||
utilization_counters[1].type = AMDSMI_COARSE_GRAIN_MEM_ACTIVITY;
|
||||
err = amdsmi_utilization_count_get(device_handles_[i], utilization_counters,
|
||||
err = amdsmi_get_utilization_count(device_handles_[i], utilization_counters,
|
||||
2, ×tamp);
|
||||
if (err != AMDSMI_STATUS_SUCCESS) {
|
||||
if (err == AMDSMI_STATUS_NOT_SUPPORTED) {
|
||||
@@ -158,7 +158,7 @@ void TestMetricsCounterRead::Run(void) {
|
||||
}
|
||||
|
||||
// Verify api support checking functionality is working
|
||||
err = amdsmi_utilization_count_get(device_handles_[i], nullptr,
|
||||
err = amdsmi_get_utilization_count(device_handles_[i], nullptr,
|
||||
1 , nullptr);
|
||||
ASSERT_EQ(err, AMDSMI_STATUS_INVAL);
|
||||
} // end for
|
||||
|
||||
@@ -197,7 +197,7 @@ void TestMutualExclusion::Run(void) {
|
||||
std::cout << "at " << __FILE__ << ":" << __LINE__ << std::endl; \
|
||||
} \
|
||||
}
|
||||
ret = amdsmi_dev_id_get(device_handles_[0], &dmy_ui16);
|
||||
ret = amdsmi_dev_get_id(device_handles_[0], &dmy_ui16);
|
||||
|
||||
// vendor_id, unique_id
|
||||
amdsmi_asic_info_t asci_info;
|
||||
@@ -209,105 +209,105 @@ void TestMutualExclusion::Run(void) {
|
||||
ret = amdsmi_get_board_info(device_handles_[0], &board_info);
|
||||
CHECK_RET(ret, AMDSMI_STATUS_BUSY);
|
||||
|
||||
ret = amdsmi_dev_vendor_name_get(device_handles_[0], dmy_str, 10);
|
||||
ret = amdsmi_dev_get_vendor_name(device_handles_[0], dmy_str, 10);
|
||||
CHECK_RET(ret, AMDSMI_STATUS_BUSY);
|
||||
ret = amdsmi_dev_vram_vendor_get(device_handles_[0], dmy_str, 10);
|
||||
ret = amdsmi_dev_get_vram_vendor(device_handles_[0], dmy_str, 10);
|
||||
CHECK_RET(ret, AMDSMI_STATUS_BUSY);
|
||||
ret = amdsmi_dev_subsystem_id_get(device_handles_[0], &dmy_ui16);
|
||||
ret = amdsmi_dev_get_subsystem_id(device_handles_[0], &dmy_ui16);
|
||||
CHECK_RET(ret, AMDSMI_STATUS_BUSY);
|
||||
ret = amdsmi_dev_pci_id_get(device_handles_[0], &dmy_ui64);
|
||||
ret = amdsmi_dev_get_pci_id(device_handles_[0], &dmy_ui64);
|
||||
CHECK_RET(ret, AMDSMI_STATUS_BUSY);
|
||||
ret = amdsmi_dev_pci_throughput_get(device_handles_[0], &dmy_ui64, &dmy_ui64, &dmy_ui64);
|
||||
ret = amdsmi_dev_get_pci_throughput(device_handles_[0], &dmy_ui64, &dmy_ui64, &dmy_ui64);
|
||||
CHECK_RET(ret, AMDSMI_STATUS_BUSY);
|
||||
ret = amdsmi_dev_pci_replay_counter_get(device_handles_[0], &dmy_ui64);
|
||||
ret = amdsmi_dev_get_pci_replay_counter(device_handles_[0], &dmy_ui64);
|
||||
CHECK_RET(ret, AMDSMI_STATUS_BUSY);
|
||||
ret = amdsmi_dev_pci_bandwidth_set(device_handles_[0], 0);
|
||||
ret = amdsmi_dev_set_pci_bandwidth(device_handles_[0], 0);
|
||||
CHECK_RET(ret, AMDSMI_STATUS_BUSY);
|
||||
ret = amdsmi_dev_fan_rpms_get(device_handles_[0], dmy_ui32, &dmy_i64);
|
||||
ret = amdsmi_dev_get_fan_rpms(device_handles_[0], dmy_ui32, &dmy_i64);
|
||||
CHECK_RET(ret, AMDSMI_STATUS_BUSY);
|
||||
ret = amdsmi_dev_fan_speed_get(device_handles_[0], 0, &dmy_i64);
|
||||
ret = amdsmi_dev_get_fan_speed(device_handles_[0], 0, &dmy_i64);
|
||||
CHECK_RET(ret, AMDSMI_STATUS_BUSY);
|
||||
ret = amdsmi_dev_fan_speed_max_get(device_handles_[0], 0, &dmy_ui64);
|
||||
ret = amdsmi_dev_get_fan_speed_max(device_handles_[0], 0, &dmy_ui64);
|
||||
CHECK_RET(ret, AMDSMI_STATUS_BUSY);
|
||||
ret = amdsmi_dev_temp_metric_get(device_handles_[0], dmy_ui32, AMDSMI_TEMP_CURRENT, &dmy_i64);
|
||||
ret = amdsmi_dev_get_temp_metric(device_handles_[0], dmy_ui32, AMDSMI_TEMP_CURRENT, &dmy_i64);
|
||||
CHECK_RET(ret, AMDSMI_STATUS_BUSY);
|
||||
ret = amdsmi_dev_fan_reset(device_handles_[0], 0);
|
||||
ret = amdsmi_dev_reset_fan(device_handles_[0], 0);
|
||||
CHECK_RET(ret, AMDSMI_STATUS_BUSY);
|
||||
ret = amdsmi_dev_fan_speed_set(device_handles_[0], dmy_ui32, 0);
|
||||
ret = amdsmi_dev_set_fan_speed(device_handles_[0], dmy_ui32, 0);
|
||||
CHECK_RET(ret, AMDSMI_STATUS_BUSY);
|
||||
ret = amdsmi_dev_perf_level_get(device_handles_[0], &dmy_perf_lvl);
|
||||
ret = amdsmi_dev_get_perf_level(device_handles_[0], &dmy_perf_lvl);
|
||||
CHECK_RET(ret, AMDSMI_STATUS_BUSY);
|
||||
ret = amdsmi_dev_overdrive_level_get(device_handles_[0], &dmy_ui32);
|
||||
ret = amdsmi_dev_get_overdrive_level(device_handles_[0], &dmy_ui32);
|
||||
CHECK_RET(ret, AMDSMI_STATUS_BUSY);
|
||||
ret = amdsmi_dev_gpu_clk_freq_get(device_handles_[0], CLK_TYPE_SYS, &dmy_freqs);
|
||||
ret = amdsmi_dev_get_gpu_clk_freq(device_handles_[0], CLK_TYPE_SYS, &dmy_freqs);
|
||||
CHECK_RET(ret, AMDSMI_STATUS_BUSY);
|
||||
ret = amdsmi_dev_od_volt_info_get(device_handles_[0], &dmy_od_volt);
|
||||
ret = amdsmi_dev_get_od_volt_info(device_handles_[0], &dmy_od_volt);
|
||||
CHECK_RET(ret, AMDSMI_STATUS_BUSY);
|
||||
ret = amdsmi_dev_od_volt_curve_regions_get(device_handles_[0], &dmy_ui32, &dmy_vlt_reg);
|
||||
ret = amdsmi_dev_get_od_volt_curve_regions(device_handles_[0], &dmy_ui32, &dmy_vlt_reg);
|
||||
CHECK_RET(ret, AMDSMI_STATUS_BUSY);
|
||||
ret = amdsmi_dev_overdrive_level_set_v1(device_handles_[0], dmy_i32);
|
||||
ret = amdsmi_dev_set_overdrive_level_v1(device_handles_[0], dmy_i32);
|
||||
CHECK_RET(ret, AMDSMI_STATUS_BUSY);
|
||||
ret = amdsmi_dev_gpu_clk_freq_set(device_handles_[0], CLK_TYPE_SYS, 0);
|
||||
ret = amdsmi_dev_set_clk_freq(device_handles_[0], CLK_TYPE_SYS, 0);
|
||||
CHECK_RET(ret, AMDSMI_STATUS_BUSY);
|
||||
ret = amdsmi_dev_ecc_count_get(device_handles_[0], AMDSMI_GPU_BLOCK_UMC, &dmy_err_cnt);
|
||||
ret = amdsmi_dev_get_ecc_count(device_handles_[0], AMDSMI_GPU_BLOCK_UMC, &dmy_err_cnt);
|
||||
CHECK_RET(ret, AMDSMI_STATUS_BUSY);
|
||||
ret = amdsmi_dev_ecc_enabled_get(device_handles_[0], &dmy_ui64);
|
||||
ret = amdsmi_dev_get_ecc_enabled(device_handles_[0], &dmy_ui64);
|
||||
CHECK_RET(ret, AMDSMI_STATUS_BUSY);
|
||||
ret = amdsmi_dev_ecc_status_get(device_handles_[0], AMDSMI_GPU_BLOCK_UMC, &dmy_ras_err_st);
|
||||
ret = amdsmi_dev_get_ecc_status(device_handles_[0], AMDSMI_GPU_BLOCK_UMC, &dmy_ras_err_st);
|
||||
CHECK_RET(ret, AMDSMI_STATUS_BUSY);
|
||||
|
||||
/* Other functions holding device mutexes. Listed for reference.
|
||||
amdsmi_dev_sku_get
|
||||
amdsmi_dev_perf_level_set_v1
|
||||
amdsmi_dev_od_clk_info_set
|
||||
amdsmi_dev_od_volt_info_set
|
||||
amdsmi_dev_set_perf_level_v1
|
||||
amdsmi_dev_set_od_clk_info
|
||||
amdsmi_dev_set_od_volt_info
|
||||
amdsmi_dev_firmware_version_get
|
||||
amdsmi_dev_firmware_version_get
|
||||
amdsmi_dev_name_get
|
||||
amdsmi_dev_brand_get
|
||||
amdsmi_dev_vram_vendor_get
|
||||
amdsmi_dev_subsystem_name_get
|
||||
amdsmi_dev_drm_render_minor_get
|
||||
amdsmi_dev_vendor_name_get
|
||||
amdsmi_dev_pci_bandwidth_get
|
||||
amdsmi_dev_pci_bandwidth_set
|
||||
amdsmi_dev_pci_throughput_get
|
||||
amdsmi_dev_temp_metric_get
|
||||
amdsmi_dev_volt_metric_get
|
||||
amdsmi_dev_fan_speed_get
|
||||
amdsmi_dev_fan_rpms_get
|
||||
amdsmi_dev_fan_reset
|
||||
amdsmi_dev_fan_speed_set
|
||||
amdsmi_dev_fan_speed_max_get
|
||||
amdsmi_dev_od_volt_info_get
|
||||
amdsmi_dev_gpu_metrics_info_get
|
||||
amdsmi_dev_od_volt_curve_regions_get
|
||||
amdsmi_dev_get_vram_vendor
|
||||
amdsmi_dev_get_subsystem_name
|
||||
amdsmi_dev_get_drm_render_minor
|
||||
amdsmi_dev_get_vendor_name
|
||||
amdsmi_dev_get_pci_bandwidth
|
||||
amdsmi_dev_set_pci_bandwidth
|
||||
amdsmi_dev_get_pci_throughput
|
||||
amdsmi_dev_get_temp_metric
|
||||
amdsmi_dev_get_volt_metric
|
||||
amdsmi_dev_get_fan_speed
|
||||
amdsmi_dev_get_fan_rpms
|
||||
amdsmi_dev_reset_fan
|
||||
amdsmi_dev_set_fan_speed
|
||||
amdsmi_dev_get_fan_speed_max
|
||||
amdsmi_dev_get_od_volt_info
|
||||
amdsmi_dev_get_gpu_metrics_info
|
||||
amdsmi_dev_get_od_volt_curve_regions
|
||||
amdsmi_dev_power_max_get
|
||||
amdsmi_dev_power_ave_get
|
||||
amdsmi_dev_get_power_ave
|
||||
amdsmi_dev_power_cap_get
|
||||
amdsmi_dev_power_cap_range_get
|
||||
amdsmi_dev_power_cap_set
|
||||
amdsmi_dev_power_profile_presets_get
|
||||
amdsmi_dev_power_profile_set
|
||||
amdsmi_dev_memory_total_get
|
||||
amdsmi_dev_memory_usage_get
|
||||
amdsmi_dev_memory_busy_percent_get
|
||||
amdsmi_dev_busy_percent_get
|
||||
amdsmi_dev_set_power_cap
|
||||
amdsmi_dev_get_power_profile_presets
|
||||
amdsmi_dev_set_power_profile
|
||||
amdsmi_dev_get_memory_total
|
||||
amdsmi_dev_get_memory_usage
|
||||
amdsmi_dev_get_memory_busy_percent
|
||||
amdsmi_dev_get_busy_percent
|
||||
amdsmi_dev_vbios_version_get
|
||||
amdsmi_dev_serial_number_get
|
||||
amdsmi_dev_pci_replay_counter_get
|
||||
amdsmi_dev_get_pci_replay_counter
|
||||
amdsmi_dev_unique_id_get
|
||||
amdsmi_dev_counter_create
|
||||
amdsmi_counter_available_counters_get
|
||||
amdsmi_dev_create_counter
|
||||
amdsmi_counter_get_available_counters
|
||||
amdsmi_dev_counter_group_supported
|
||||
amdsmi_dev_memory_reserved_pages_get
|
||||
amdsmi_dev_get_memory_reserved_pages
|
||||
amdsmi_dev_xgmi_error_status
|
||||
amdsmi_dev_xgmi_error_reset
|
||||
amdsmi_dev_reset_xgmi_error
|
||||
amdsmi_dev_xgmi_hive_id_get
|
||||
amdsmi_topo_get_link_weight
|
||||
amdsmi_event_notification_mask_set
|
||||
amdsmi_event_notification_init
|
||||
amdsmi_event_notification_stop
|
||||
amdsmi_set_event_notification_mask
|
||||
amdsmi_init_event_notification
|
||||
amdsmi_stop_event_notification
|
||||
*/
|
||||
|
||||
IF_VERB(STANDARD) {
|
||||
|
||||
@@ -98,12 +98,12 @@ void TestOverdriveRead::Run(void) {
|
||||
for (uint32_t i = 0; i < num_monitor_devs(); ++i) {
|
||||
PrintDeviceHeader(device_handles_[i]);
|
||||
|
||||
err = amdsmi_dev_overdrive_level_get(device_handles_[i], &val_ui32);
|
||||
err = amdsmi_dev_get_overdrive_level(device_handles_[i], &val_ui32);
|
||||
CHK_ERR_ASRT(err)
|
||||
IF_VERB(STANDARD) {
|
||||
std::cout << "\t**OverDrive Level:" << val_ui32 << std::endl;
|
||||
// Verify api support checking functionality is working
|
||||
err = amdsmi_dev_overdrive_level_get(device_handles_[i], nullptr);
|
||||
err = amdsmi_dev_get_overdrive_level(device_handles_[i], nullptr);
|
||||
ASSERT_EQ(err, AMDSMI_STATUS_INVAL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,22 +100,22 @@ void TestOverdriveReadWrite::Run(void) {
|
||||
IF_VERB(STANDARD) {
|
||||
std::cout << "Set Overdrive level to 0%..." << std::endl;
|
||||
}
|
||||
ret = amdsmi_dev_overdrive_level_set(device_handles_[dv_ind], 0);
|
||||
ret = amdsmi_dev_set_overdrive_level(device_handles_[dv_ind], 0);
|
||||
CHK_ERR_ASRT(ret)
|
||||
IF_VERB(STANDARD) {
|
||||
std::cout << "Set Overdrive level to 10%..." << std::endl;
|
||||
}
|
||||
ret = amdsmi_dev_overdrive_level_set(device_handles_[dv_ind], 10);
|
||||
ret = amdsmi_dev_set_overdrive_level(device_handles_[dv_ind], 10);
|
||||
CHK_ERR_ASRT(ret)
|
||||
ret = amdsmi_dev_overdrive_level_get(device_handles_[dv_ind], &val);
|
||||
ret = amdsmi_dev_get_overdrive_level(device_handles_[dv_ind], &val);
|
||||
CHK_ERR_ASRT(ret)
|
||||
IF_VERB(STANDARD) {
|
||||
std::cout << "\t**New OverDrive Level:" << val << std::endl;
|
||||
std::cout << "Reset Overdrive level to 0%..." << std::endl;
|
||||
}
|
||||
ret = amdsmi_dev_overdrive_level_set(device_handles_[dv_ind], 0);
|
||||
ret = amdsmi_dev_set_overdrive_level(device_handles_[dv_ind], 0);
|
||||
CHK_ERR_ASRT(ret)
|
||||
ret = amdsmi_dev_overdrive_level_get(device_handles_[dv_ind], &val);
|
||||
ret = amdsmi_dev_get_overdrive_level(device_handles_[dv_ind], &val);
|
||||
CHK_ERR_ASRT(ret)
|
||||
IF_VERB(STANDARD) {
|
||||
std::cout << "\t**New OverDrive Level:" << val << std::endl;
|
||||
|
||||
@@ -100,15 +100,15 @@ void TestPciReadWrite::Run(void) {
|
||||
for (uint32_t dv_ind = 0; dv_ind < num_monitor_devs(); ++dv_ind) {
|
||||
PrintDeviceHeader(device_handles_[dv_ind]);
|
||||
|
||||
ret = amdsmi_dev_pci_replay_counter_get(device_handles_[dv_ind], &u64int);
|
||||
ret = amdsmi_dev_get_pci_replay_counter(device_handles_[dv_ind], &u64int);
|
||||
|
||||
if (ret == AMDSMI_STATUS_NOT_SUPPORTED) {
|
||||
std::cout <<
|
||||
"\t**amdsmi_dev_pci_replay_counter_get() is not supported"
|
||||
"\t** amdsmi_dev_get_pci_replay_counter() is not supported"
|
||||
" on this machine" << std::endl;
|
||||
|
||||
// Verify api support checking functionality is working
|
||||
ret = amdsmi_dev_pci_replay_counter_get(device_handles_[dv_ind], nullptr);
|
||||
ret = amdsmi_dev_get_pci_replay_counter(device_handles_[dv_ind], nullptr);
|
||||
ASSERT_EQ(ret, AMDSMI_STATUS_NOT_SUPPORTED);
|
||||
} else {
|
||||
CHK_ERR_ASRT(ret)
|
||||
@@ -116,11 +116,11 @@ void TestPciReadWrite::Run(void) {
|
||||
std::cout << "\tPCIe Replay Counter: " << u64int << std::endl;
|
||||
}
|
||||
// Verify api support checking functionality is working
|
||||
ret = amdsmi_dev_pci_replay_counter_get(device_handles_[dv_ind], nullptr);
|
||||
ret = amdsmi_dev_get_pci_replay_counter(device_handles_[dv_ind], nullptr);
|
||||
ASSERT_EQ(ret, AMDSMI_STATUS_INVAL);
|
||||
}
|
||||
|
||||
ret = amdsmi_dev_pci_throughput_get(device_handles_[dv_ind], &sent, &received, &max_pkt_sz);
|
||||
ret = amdsmi_dev_get_pci_throughput(device_handles_[dv_ind], &sent, &received, &max_pkt_sz);
|
||||
if (ret == AMDSMI_STATUS_NOT_SUPPORTED) {
|
||||
std::cout << "TEST FAILURE: Current PCIe throughput is not detected. "
|
||||
"This is likely because it is not indicated in the pcie_bw sysfs "
|
||||
@@ -141,14 +141,14 @@ void TestPciReadWrite::Run(void) {
|
||||
std::cout << std::endl;
|
||||
}
|
||||
|
||||
ret = amdsmi_dev_pci_bandwidth_get(device_handles_[dv_ind], &bw);
|
||||
ret = amdsmi_dev_get_pci_bandwidth(device_handles_[dv_ind], &bw);
|
||||
|
||||
if (ret == AMDSMI_STATUS_NOT_SUPPORTED) {
|
||||
std::cout << "TEST FAILURE: Current PCIe bandwidth is not detected. "
|
||||
"This is likely because it is not indicated in the pp_dpm_pcie sysfs "
|
||||
"file. Aborting test." << std::endl;
|
||||
// Verify api support checking functionality is working
|
||||
ret = amdsmi_dev_pci_bandwidth_get(device_handles_[dv_ind], nullptr);
|
||||
ret = amdsmi_dev_get_pci_bandwidth(device_handles_[dv_ind], nullptr);
|
||||
ASSERT_EQ(ret, AMDSMI_STATUS_NOT_SUPPORTED);
|
||||
|
||||
return;
|
||||
@@ -163,7 +163,7 @@ void TestPciReadWrite::Run(void) {
|
||||
std::endl;
|
||||
}
|
||||
// Verify api support checking functionality is working
|
||||
ret = amdsmi_dev_pci_bandwidth_get(device_handles_[dv_ind], nullptr);
|
||||
ret = amdsmi_dev_get_pci_bandwidth(device_handles_[dv_ind], nullptr);
|
||||
ASSERT_EQ(ret, AMDSMI_STATUS_INVAL);
|
||||
|
||||
// First set the bitmask to all supported bandwidths
|
||||
@@ -182,10 +182,10 @@ void TestPciReadWrite::Run(void) {
|
||||
std::cout << "\tSetting bandwidth mask to " << "0b" << freq_bm_str <<
|
||||
" ..." << std::endl;
|
||||
}
|
||||
ret = amdsmi_dev_pci_bandwidth_set(device_handles_[dv_ind], freq_bitmask);
|
||||
ret = amdsmi_dev_set_pci_bandwidth(device_handles_[dv_ind], freq_bitmask);
|
||||
CHK_ERR_ASRT(ret)
|
||||
|
||||
ret = amdsmi_dev_pci_bandwidth_get(device_handles_[dv_ind], &bw);
|
||||
ret = amdsmi_dev_get_pci_bandwidth(device_handles_[dv_ind], &bw);
|
||||
CHK_ERR_ASRT(ret)
|
||||
|
||||
IF_VERB(STANDARD) {
|
||||
@@ -193,10 +193,10 @@ void TestPciReadWrite::Run(void) {
|
||||
std::endl;
|
||||
std::cout << "\tResetting mask to all bandwidths." << std::endl;
|
||||
}
|
||||
ret = amdsmi_dev_pci_bandwidth_set(device_handles_[dv_ind], 0xFFFFFFFF);
|
||||
ret = amdsmi_dev_set_pci_bandwidth(device_handles_[dv_ind], 0xFFFFFFFF);
|
||||
CHK_ERR_ASRT(ret)
|
||||
|
||||
ret = amdsmi_dev_perf_level_set(device_handles_[dv_ind], AMDSMI_DEV_PERF_LEVEL_AUTO);
|
||||
ret = amdsmi_dev_set_perf_level(device_handles_[dv_ind], AMDSMI_DEV_PERF_LEVEL_AUTO);
|
||||
CHK_ERR_ASRT(ret)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,20 +115,20 @@ void TestPerfCntrReadWrite::CountEvents(amdsmi_device_handle dv_ind,
|
||||
amdsmi_event_handle_t evt_handle;
|
||||
amdsmi_status_t ret;
|
||||
|
||||
ret = amdsmi_dev_counter_create(dv_ind,
|
||||
ret = amdsmi_dev_create_counter(dv_ind,
|
||||
static_cast<amdsmi_event_type_t>(evnt), &evt_handle);
|
||||
CHK_ERR_ASRT(ret)
|
||||
|
||||
// Note that amdsmi_dev_counter_create() should never return
|
||||
// Note that amdsmi_dev_create_counter() should never return
|
||||
// AMDSMI_STATUS_NOT_SUPPORTED. It will return AMDSMI_STATUS_OUT_OF_RESOURCES
|
||||
// if it is unable to create a counter.
|
||||
ret = amdsmi_dev_counter_create(dv_ind,
|
||||
ret = amdsmi_dev_create_counter(dv_ind,
|
||||
static_cast<amdsmi_event_type_t>(evnt), nullptr);
|
||||
ASSERT_EQ(ret, AMDSMI_STATUS_INVAL);
|
||||
|
||||
ret = amdsmi_counter_control(evt_handle, AMDSMI_CNTR_CMD_START, nullptr);
|
||||
ret = amdsmi_control_counter(evt_handle, AMDSMI_CNTR_CMD_START, nullptr);
|
||||
if (ret == AMDSMI_STATUS_NOT_SUPPORTED) {
|
||||
std::cout << "amdsmi_counter_control() returned "
|
||||
std::cout << "amdsmi_control_counter() returned "
|
||||
"AMDSMI_STATUS_NOT_SUPPORTED" << std::endl;
|
||||
throw AMDSMI_STATUS_NOT_SUPPORTED;
|
||||
} else {
|
||||
@@ -136,7 +136,7 @@ void TestPerfCntrReadWrite::CountEvents(amdsmi_device_handle dv_ind,
|
||||
}
|
||||
sleep(sleep_sec);
|
||||
|
||||
ret = amdsmi_counter_read(evt_handle, val);
|
||||
ret = amdsmi_read_counter(evt_handle, val);
|
||||
CHK_ERR_ASRT(ret)
|
||||
|
||||
IF_VERB(STANDARD) {
|
||||
@@ -146,7 +146,7 @@ void TestPerfCntrReadWrite::CountEvents(amdsmi_device_handle dv_ind,
|
||||
std::cout << "\t\t\tEvents/Second Running: " <<
|
||||
val->value/static_cast<float>(val->time_running) << std::endl;
|
||||
}
|
||||
ret = amdsmi_dev_counter_destroy(evt_handle);
|
||||
ret = amdsmi_dev_destroy_counter(evt_handle);
|
||||
CHK_ERR_ASRT(ret)
|
||||
}
|
||||
|
||||
@@ -261,7 +261,7 @@ TestPerfCntrReadWrite::testEventsSimultaneously(amdsmi_device_handle dv_ind) {
|
||||
std::cout << "Testing Event Group " << grp.name() << std::endl;
|
||||
}
|
||||
|
||||
ret = amdsmi_counter_available_counters_get(dv_ind, grp.group(),
|
||||
ret = amdsmi_counter_get_available_counters(dv_ind, grp.group(),
|
||||
&avail_counters);
|
||||
IF_VERB(STANDARD) {
|
||||
std::cout << "Available Counters: " << avail_counters << std::endl;
|
||||
@@ -294,7 +294,7 @@ TestPerfCntrReadWrite::testEventsSimultaneously(amdsmi_device_handle dv_ind) {
|
||||
std::cout << "\tEvent Type " << tmp << std::endl;
|
||||
}
|
||||
|
||||
ret = amdsmi_dev_counter_create(dv_ind,
|
||||
ret = amdsmi_dev_create_counter(dv_ind,
|
||||
static_cast<amdsmi_event_type_t>(tmp), &evt_handle.get()[j]);
|
||||
CHK_ERR_ASRT(ret)
|
||||
}
|
||||
@@ -307,11 +307,11 @@ TestPerfCntrReadWrite::testEventsSimultaneously(amdsmi_device_handle dv_ind) {
|
||||
for (j = 0; j < num_created; ++j) {
|
||||
tmp = static_cast<amdsmi_event_type_t>(evnt + j);
|
||||
|
||||
ret = amdsmi_counter_control(evt_handle.get()[j], AMDSMI_CNTR_CMD_START,
|
||||
ret = amdsmi_control_counter(evt_handle.get()[j], AMDSMI_CNTR_CMD_START,
|
||||
nullptr);
|
||||
CHK_ERR_ASRT(ret)
|
||||
|
||||
ret = amdsmi_counter_available_counters_get(dv_ind, grp.group(),
|
||||
ret = amdsmi_counter_get_available_counters(dv_ind, grp.group(),
|
||||
&tmp_cntrs);
|
||||
CHK_ERR_ASRT(ret)
|
||||
ASSERT_EQ(tmp_cntrs, (avail_counters - j - 1));
|
||||
@@ -325,7 +325,7 @@ TestPerfCntrReadWrite::testEventsSimultaneously(amdsmi_device_handle dv_ind) {
|
||||
for (j = 0; j < num_created; ++j) {
|
||||
tmp = static_cast<amdsmi_event_type_t>(evnt + j);
|
||||
|
||||
ret = amdsmi_counter_read(evt_handle.get()[j], &val);
|
||||
ret = amdsmi_read_counter(evt_handle.get()[j], &val);
|
||||
CHK_ERR_ASRT(ret)
|
||||
|
||||
IF_VERB(STANDARD) {
|
||||
@@ -337,7 +337,7 @@ TestPerfCntrReadWrite::testEventsSimultaneously(amdsmi_device_handle dv_ind) {
|
||||
}
|
||||
}
|
||||
for (j = 0; j < num_created; ++j) {
|
||||
ret = amdsmi_dev_counter_destroy(evt_handle.get()[j]);
|
||||
ret = amdsmi_dev_destroy_counter(evt_handle.get()[j]);
|
||||
CHK_ERR_ASRT(ret)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ void TestPerfDeterminism::Run(void) {
|
||||
|
||||
for (uint32_t i = 0; i < num_monitor_devs(); ++i) {
|
||||
PrintDeviceHeader(device_handles_[i]);
|
||||
err = amdsmi_dev_od_volt_info_get(device_handles_[i], &odv);
|
||||
err = amdsmi_dev_get_od_volt_info(device_handles_[i], &odv);
|
||||
if (err == AMDSMI_STATUS_NOT_SUPPORTED) {
|
||||
IF_VERB(STANDARD) {
|
||||
std::cout << "\t** Not supported on this machine" << std::endl;
|
||||
@@ -114,14 +114,14 @@ void TestPerfDeterminism::Run(void) {
|
||||
clkvalue = (odv.curr_sclk_range.lower_bound/1000000) + 50;
|
||||
}
|
||||
|
||||
err = amdsmi_perf_determinism_mode_set(device_handles_[i], clkvalue);
|
||||
err = amdsmi_set_perf_determinism_mode(device_handles_[i], clkvalue);
|
||||
if (err == AMDSMI_STATUS_NOT_SUPPORTED) {
|
||||
IF_VERB(STANDARD) {
|
||||
std::cout << "\t**Not supported on this machine" << std::endl;
|
||||
}
|
||||
return;
|
||||
} else {
|
||||
ret = amdsmi_dev_perf_level_get(device_handles_[i], &pfl);
|
||||
ret = amdsmi_dev_get_perf_level(device_handles_[i], &pfl);
|
||||
CHK_ERR_ASRT(ret)
|
||||
IF_VERB(STANDARD) {
|
||||
std::cout << "\t**New Perf Level:" << GetPerfLevelStr(pfl) <<
|
||||
@@ -130,9 +130,9 @@ void TestPerfDeterminism::Run(void) {
|
||||
}
|
||||
|
||||
std::cout << "\t**Resetting performance determinism" << std::endl;
|
||||
err = amdsmi_dev_perf_level_set(device_handles_[i], AMDSMI_DEV_PERF_LEVEL_AUTO);;
|
||||
err = amdsmi_dev_set_perf_level(device_handles_[i], AMDSMI_DEV_PERF_LEVEL_AUTO);;
|
||||
CHK_ERR_ASRT(err)
|
||||
ret = amdsmi_dev_perf_level_get(device_handles_[i], &pfl);
|
||||
ret = amdsmi_dev_get_perf_level(device_handles_[i], &pfl);
|
||||
CHK_ERR_ASRT(ret)
|
||||
IF_VERB(STANDARD) {
|
||||
std::cout << "\t**New Perf Level:" << GetPerfLevelStr(pfl) <<
|
||||
|
||||
@@ -98,14 +98,14 @@ void TestPerfLevelRead::Run(void) {
|
||||
for (uint32_t i = 0; i < num_monitor_devs(); ++i) {
|
||||
PrintDeviceHeader(device_handles_[i]);
|
||||
|
||||
err = amdsmi_dev_perf_level_get(device_handles_[i], &pfl);
|
||||
err = amdsmi_dev_get_perf_level(device_handles_[i], &pfl);
|
||||
CHK_ERR_ASRT(err)
|
||||
IF_VERB(STANDARD) {
|
||||
std::cout << "\t**Performance Level:" << std::dec << (uint32_t)pfl <<
|
||||
std::endl;
|
||||
}
|
||||
// Verify api support checking functionality is working
|
||||
err = amdsmi_dev_perf_level_get(device_handles_[i], nullptr);
|
||||
err = amdsmi_dev_get_perf_level(device_handles_[i], nullptr);
|
||||
ASSERT_EQ(err, AMDSMI_STATUS_INVAL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ void TestPerfLevelReadWrite::Run(void) {
|
||||
for (uint32_t dv_ind = 0; dv_ind < num_monitor_devs(); ++dv_ind) {
|
||||
PrintDeviceHeader(device_handles_[dv_ind]);
|
||||
|
||||
ret = amdsmi_dev_perf_level_get(device_handles_[dv_ind], &orig_pfl);
|
||||
ret = amdsmi_dev_get_perf_level(device_handles_[dv_ind], &orig_pfl);
|
||||
CHK_ERR_ASRT(ret)
|
||||
|
||||
IF_VERB(STANDARD) {
|
||||
@@ -120,14 +120,14 @@ void TestPerfLevelReadWrite::Run(void) {
|
||||
GetPerfLevelStr(static_cast<amdsmi_dev_perf_level_t>(pfl_i)) <<
|
||||
" ..." << std::endl;
|
||||
}
|
||||
ret = amdsmi_dev_perf_level_set(device_handles_[dv_ind],
|
||||
ret = amdsmi_dev_set_perf_level(device_handles_[dv_ind],
|
||||
static_cast<amdsmi_dev_perf_level_t>(pfl_i));
|
||||
if (ret == AMDSMI_STATUS_NOT_SUPPORTED) {
|
||||
std::cout << "\t**" << GetPerfLevelStr(static_cast<amdsmi_dev_perf_level_t>(pfl_i))
|
||||
<< " returned AMDSMI_STATUS_NOT_SUPPORTED" << std::endl;
|
||||
} else {
|
||||
CHK_ERR_ASRT(ret)
|
||||
ret = amdsmi_dev_perf_level_get(device_handles_[dv_ind], &pfl);
|
||||
ret = amdsmi_dev_get_perf_level(device_handles_[dv_ind], &pfl);
|
||||
CHK_ERR_ASRT(ret)
|
||||
IF_VERB(STANDARD) {
|
||||
std::cout << "\t**New Perf Level:" << GetPerfLevelStr(pfl) <<
|
||||
@@ -139,9 +139,9 @@ void TestPerfLevelReadWrite::Run(void) {
|
||||
std::cout << "Reset Perf level to " << GetPerfLevelStr(orig_pfl) <<
|
||||
" ..." << std::endl;
|
||||
}
|
||||
ret = amdsmi_dev_perf_level_set(device_handles_[dv_ind], orig_pfl);
|
||||
ret = amdsmi_dev_set_perf_level(device_handles_[dv_ind], orig_pfl);
|
||||
CHK_ERR_ASRT(ret)
|
||||
ret = amdsmi_dev_perf_level_get(device_handles_[dv_ind], &pfl);
|
||||
ret = amdsmi_dev_get_perf_level(device_handles_[dv_ind], &pfl);
|
||||
CHK_ERR_ASRT(ret)
|
||||
|
||||
IF_VERB(STANDARD) {
|
||||
|
||||
@@ -121,7 +121,7 @@ void TestPowerCapReadWrite::Run(void) {
|
||||
std::cout << "Setting new cap to " << new_cap << "..." << std::endl;
|
||||
}
|
||||
start = clock();
|
||||
ret = amdsmi_dev_power_cap_set(device_handles_[dv_ind], 0, new_cap);
|
||||
ret = amdsmi_dev_set_power_cap(device_handles_[dv_ind], 0, new_cap);
|
||||
end = clock();
|
||||
cpu_time_used = ((double) (end - start)) * 1000000UL / CLOCKS_PER_SEC;
|
||||
|
||||
@@ -139,7 +139,7 @@ void TestPowerCapReadWrite::Run(void) {
|
||||
std::cout << "Resetting cap to " << orig << "..." << std::endl;
|
||||
}
|
||||
|
||||
ret = amdsmi_dev_power_cap_set(device_handles_[dv_ind], 0, orig);
|
||||
ret = amdsmi_dev_set_power_cap(device_handles_[dv_ind], 0, orig);
|
||||
CHK_ERR_ASRT(ret)
|
||||
|
||||
ret = amdsmi_get_power_cap_info(device_handles_[dv_ind], 0, &info);
|
||||
|
||||
@@ -112,7 +112,7 @@ void TestPowerRead::Run(void) {
|
||||
info.max_power_cap << " uW" << std::endl;
|
||||
}
|
||||
|
||||
err = amdsmi_dev_power_ave_get(device_handles_[i], 0, &val_ui64);
|
||||
err = amdsmi_dev_get_power_ave(device_handles_[i], 0, &val_ui64);
|
||||
IF_VERB(STANDARD) {
|
||||
std::cout << "\t**Averge Power Usage: ";
|
||||
CHK_AMDSMI_PERM_ERR(err)
|
||||
@@ -120,7 +120,7 @@ void TestPowerRead::Run(void) {
|
||||
std::cout << static_cast<float>(val_ui64)/1000 << " mW" << std::endl;
|
||||
}
|
||||
// Verify api support checking functionality is working
|
||||
err = amdsmi_dev_power_ave_get(device_handles_[i], 0, nullptr);
|
||||
err = amdsmi_dev_get_power_ave(device_handles_[i], 0, nullptr);
|
||||
ASSERT_EQ(err, AMDSMI_STATUS_INVAL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ void TestPowerReadWrite::Run(void) {
|
||||
for (uint32_t dv_ind = 0; dv_ind < num_monitor_devs(); ++dv_ind) {
|
||||
PrintDeviceHeader(device_handles_[dv_ind]);
|
||||
|
||||
ret = amdsmi_dev_power_profile_presets_get(device_handles_[dv_ind], 0, &status);
|
||||
ret = amdsmi_dev_get_power_profile_presets(device_handles_[dv_ind], 0, &status);
|
||||
if (ret == AMDSMI_STATUS_NOT_SUPPORTED) {
|
||||
std::cout << "The power profile presets settings is not supported. "
|
||||
<< std::endl;
|
||||
@@ -131,7 +131,7 @@ void TestPowerReadWrite::Run(void) {
|
||||
CHK_ERR_ASRT(ret)
|
||||
|
||||
// Verify api support checking functionality is working
|
||||
ret = amdsmi_dev_power_profile_presets_get(device_handles_[dv_ind], 0, nullptr);
|
||||
ret = amdsmi_dev_get_power_profile_presets(device_handles_[dv_ind], 0, nullptr);
|
||||
ASSERT_EQ(ret, AMDSMI_STATUS_INVAL);
|
||||
|
||||
IF_VERB(STANDARD) {
|
||||
@@ -172,27 +172,27 @@ void TestPowerReadWrite::Run(void) {
|
||||
return;
|
||||
}
|
||||
|
||||
ret = amdsmi_dev_power_profile_set(device_handles_[dv_ind], 0, new_prof);
|
||||
ret = amdsmi_dev_set_power_profile(device_handles_[dv_ind], 0, new_prof);
|
||||
CHK_ERR_ASRT(ret)
|
||||
|
||||
amdsmi_dev_perf_level_t pfl;
|
||||
ret = amdsmi_dev_perf_level_get(device_handles_[dv_ind], &pfl);
|
||||
ret = amdsmi_dev_get_perf_level(device_handles_[dv_ind], &pfl);
|
||||
CHK_ERR_ASRT(ret)
|
||||
ASSERT_EQ(pfl, AMDSMI_DEV_PERF_LEVEL_MANUAL);
|
||||
|
||||
ret = amdsmi_dev_power_profile_presets_get(device_handles_[dv_ind], 0, &status);
|
||||
ret = amdsmi_dev_get_power_profile_presets(device_handles_[dv_ind], 0, &status);
|
||||
CHK_ERR_ASRT(ret)
|
||||
|
||||
ASSERT_EQ(status.current, new_prof);
|
||||
|
||||
ret = amdsmi_dev_perf_level_set(device_handles_[dv_ind], AMDSMI_DEV_PERF_LEVEL_AUTO);
|
||||
ret = amdsmi_dev_set_perf_level(device_handles_[dv_ind], AMDSMI_DEV_PERF_LEVEL_AUTO);
|
||||
CHK_ERR_ASRT(ret)
|
||||
|
||||
ret = amdsmi_dev_perf_level_get(device_handles_[dv_ind], &pfl);
|
||||
ret = amdsmi_dev_get_perf_level(device_handles_[dv_ind], &pfl);
|
||||
CHK_ERR_ASRT(ret)
|
||||
ASSERT_EQ(pfl, AMDSMI_DEV_PERF_LEVEL_AUTO);
|
||||
|
||||
ret = amdsmi_dev_power_profile_presets_get(device_handles_[dv_ind], 0, &status);
|
||||
ret = amdsmi_dev_get_power_profile_presets(device_handles_[dv_ind], 0, &status);
|
||||
CHK_ERR_ASRT(ret)
|
||||
|
||||
ASSERT_EQ(status.current, orig_profile);
|
||||
|
||||
@@ -104,7 +104,7 @@ void TestProcInfoRead::Run(void) {
|
||||
|
||||
uint32_t num_devices = num_monitor_devs();
|
||||
|
||||
err = amdsmi_compute_process_info_get(nullptr, &num_proc_found);
|
||||
err = amdsmi_get_compute_process_info(nullptr, &num_proc_found);
|
||||
if (err != AMDSMI_STATUS_SUCCESS) {
|
||||
if (err == AMDSMI_STATUS_NOT_SUPPORTED) {
|
||||
IF_VERB(STANDARD) {
|
||||
@@ -129,7 +129,7 @@ void TestProcInfoRead::Run(void) {
|
||||
procs = new amdsmi_process_info_t[num_proc_found];
|
||||
|
||||
val_ui32 = num_proc_found;
|
||||
err = amdsmi_compute_process_info_get(procs, &val_ui32);
|
||||
err = amdsmi_get_compute_process_info(procs, &val_ui32);
|
||||
if (err != AMDSMI_STATUS_SUCCESS) {
|
||||
if (err == AMDSMI_STATUS_INSUFFICIENT_SIZE) {
|
||||
IF_VERB(STANDARD) {
|
||||
@@ -162,7 +162,7 @@ void TestProcInfoRead::Run(void) {
|
||||
uint32_t amt_allocd = num_devices;
|
||||
|
||||
for (uint32_t j = 0; j < num_proc_found; j++) {
|
||||
err = amdsmi_compute_process_gpus_get(procs[j].process_id, dev_inds,
|
||||
err = amdsmi_get_compute_process_gpus(procs[j].process_id, dev_inds,
|
||||
&amt_allocd);
|
||||
if (err == AMDSMI_STATUS_NOT_FOUND) {
|
||||
std::cout << "\t** Process " << procs[j].process_id <<
|
||||
@@ -191,13 +191,13 @@ void TestProcInfoRead::Run(void) {
|
||||
amdsmi_process_info_t proc_info;
|
||||
for (uint32_t j = 0; j < num_proc_found; j++) {
|
||||
memset(&proc_info, 0x0, sizeof(amdsmi_process_info_t));
|
||||
err = amdsmi_compute_process_info_by_pid_get(procs[j].process_id,
|
||||
err = amdsmi_get_compute_process_info_by_pid(procs[j].process_id,
|
||||
&proc_info);
|
||||
if (err == AMDSMI_STATUS_NOT_FOUND) {
|
||||
std::cout <<
|
||||
"\t** WARNING: amdsmi_compute_process_info_get() found process " <<
|
||||
"\t** WARNING: amdsmi_get_compute_process_info() found process " <<
|
||||
procs[j].process_id << ", but subsequently, "
|
||||
"amdsmi_compute_process_info_by_pid_get() did not"
|
||||
"amdsmi_get_compute_process_info_by_pid() did not"
|
||||
" find this same process." << std::endl;
|
||||
} else {
|
||||
CHK_ERR_ASRT(err)
|
||||
@@ -217,10 +217,10 @@ void TestProcInfoRead::Run(void) {
|
||||
if (num_proc_found > 1) {
|
||||
amdsmi_process_info_t tmp_proc;
|
||||
val_ui32 = 1;
|
||||
err = amdsmi_compute_process_info_get(&tmp_proc, &val_ui32);
|
||||
err = amdsmi_get_compute_process_info(&tmp_proc, &val_ui32);
|
||||
|
||||
if (err != AMDSMI_STATUS_INSUFFICIENT_SIZE) {
|
||||
std::cout << "Expected amdsmi_compute_process_info_get() to tell us"
|
||||
std::cout << "Expected amdsmi_get_compute_process_info() to tell us"
|
||||
" there are more processes available, but instead go return code " <<
|
||||
err << std::endl;
|
||||
}
|
||||
|
||||
@@ -128,24 +128,24 @@ void TestSysInfoRead::Run(void) {
|
||||
}
|
||||
}
|
||||
|
||||
err = amdsmi_dev_pci_id_get(device_handles_[i], &val_ui64);
|
||||
err = amdsmi_dev_get_pci_id(device_handles_[i], &val_ui64);
|
||||
CHK_ERR_ASRT(err)
|
||||
IF_VERB(STANDARD) {
|
||||
std::cout << "\t**PCI ID (BDFID): 0x" << std::hex << val_ui64;
|
||||
std::cout << " (" << std::dec << val_ui64 << ")" << std::endl;
|
||||
}
|
||||
// Verify api support checking functionality is working
|
||||
err = amdsmi_dev_pci_id_get(device_handles_[i], nullptr);
|
||||
err = amdsmi_dev_get_pci_id(device_handles_[i], nullptr);
|
||||
ASSERT_EQ(err, AMDSMI_STATUS_INVAL);
|
||||
|
||||
err = amdsmi_topo_numa_affinity_get(device_handles_[i], &val_ui32);
|
||||
err = amdsmi_topo_get_numa_affinity(device_handles_[i], &val_ui32);
|
||||
CHK_ERR_ASRT(err)
|
||||
IF_VERB(STANDARD) {
|
||||
std::cout << "\t**NUMA NODE: 0x" << std::hex << val_ui32;
|
||||
std::cout << " (" << std::dec << val_ui32 << ")" << std::endl;
|
||||
}
|
||||
// Verify api support checking functionality is working
|
||||
err = amdsmi_topo_numa_affinity_get(device_handles_[i], nullptr);
|
||||
err = amdsmi_topo_get_numa_affinity(device_handles_[i], nullptr);
|
||||
ASSERT_EQ(err, AMDSMI_STATUS_INVAL);
|
||||
|
||||
|
||||
@@ -177,7 +177,7 @@ void TestSysInfoRead::Run(void) {
|
||||
}
|
||||
}
|
||||
|
||||
err = amdsmi_version_get(&ver);
|
||||
err = amdsmi_get_version(&ver);
|
||||
CHK_ERR_ASRT(err)
|
||||
|
||||
ASSERT_TRUE(ver.major != 0xFFFFFFFF && ver.minor != 0xFFFFFFFF &&
|
||||
|
||||
@@ -114,7 +114,7 @@ void TestTempRead::Run(void) {
|
||||
|
||||
auto print_temp_metric = [&](amdsmi_temperature_metric_t met,
|
||||
std::string label) {
|
||||
err = amdsmi_dev_temp_metric_get(device_handles_[i], type, met, &val_i64);
|
||||
err = amdsmi_dev_get_temp_metric(device_handles_[i], type, met, &val_i64);
|
||||
|
||||
if (err != AMDSMI_STATUS_SUCCESS) {
|
||||
if (err == AMDSMI_STATUS_NOT_SUPPORTED) {
|
||||
@@ -124,7 +124,7 @@ void TestTempRead::Run(void) {
|
||||
}
|
||||
|
||||
// Verify api support checking functionality is working
|
||||
err = amdsmi_dev_temp_metric_get(device_handles_[i], type, met, nullptr);
|
||||
err = amdsmi_dev_get_temp_metric(device_handles_[i], type, met, nullptr);
|
||||
ASSERT_EQ(err, AMDSMI_STATUS_INVAL);
|
||||
return;
|
||||
} else {
|
||||
@@ -132,7 +132,7 @@ void TestTempRead::Run(void) {
|
||||
}
|
||||
}
|
||||
// Verify api support checking functionality is working
|
||||
err = amdsmi_dev_temp_metric_get(device_handles_[i], type, met, nullptr);
|
||||
err = amdsmi_dev_get_temp_metric(device_handles_[i], type, met, nullptr);
|
||||
ASSERT_EQ(err, AMDSMI_STATUS_INVAL);
|
||||
|
||||
IF_VERB(STANDARD) {
|
||||
|
||||
@@ -101,7 +101,7 @@ void TestVersionRead::Run(void) {
|
||||
return;
|
||||
}
|
||||
|
||||
err = amdsmi_version_get(&ver);
|
||||
err = amdsmi_get_version(&ver);
|
||||
CHK_ERR_ASRT(err)
|
||||
|
||||
ASSERT_TRUE(ver.major != 0xFFFFFFFF && ver.minor != 0xFFFFFFFF &&
|
||||
@@ -114,7 +114,7 @@ void TestVersionRead::Run(void) {
|
||||
char ver_str[kVerMaxStrLen];
|
||||
|
||||
for (uint32_t cmp = AMDSMI_SW_COMP_FIRST; cmp <= AMDSMI_SW_COMP_LAST; ++cmp) {
|
||||
err = amdsmi_version_str_get(static_cast<amdsmi_sw_component_t>(cmp),
|
||||
err = amdsmi_get_version_str(static_cast<amdsmi_sw_component_t>(cmp),
|
||||
ver_str, kVerMaxStrLen);
|
||||
CHK_ERR_ASRT(err)
|
||||
|
||||
|
||||
@@ -157,20 +157,20 @@ void TestVoltCurvRead::Run(void) {
|
||||
for (uint32_t i = 0; i < num_monitor_devs(); ++i) {
|
||||
PrintDeviceHeader(device_handles_[i]);
|
||||
|
||||
err = amdsmi_dev_od_volt_info_get(device_handles_[i], &odv);
|
||||
err = amdsmi_dev_get_od_volt_info(device_handles_[i], &odv);
|
||||
if (err == AMDSMI_STATUS_NOT_SUPPORTED) {
|
||||
IF_VERB(STANDARD) {
|
||||
std::cout <<
|
||||
"\t**amdsmi_dev_od_volt_info_get: Not supported on this machine"
|
||||
"\t** amdsmi_dev_get_od_volt_info: Not supported on this machine"
|
||||
<< std::endl;
|
||||
}
|
||||
// Verify api support checking functionality is working
|
||||
err = amdsmi_dev_od_volt_info_get(device_handles_[i], nullptr);
|
||||
err = amdsmi_dev_get_od_volt_info(device_handles_[i], nullptr);
|
||||
ASSERT_EQ(err, AMDSMI_STATUS_NOT_SUPPORTED);
|
||||
} else {
|
||||
CHK_ERR_ASRT(err)
|
||||
// Verify api support checking functionality is working
|
||||
err = amdsmi_dev_od_volt_info_get(device_handles_[i], nullptr);
|
||||
err = amdsmi_dev_get_od_volt_info(device_handles_[i], nullptr);
|
||||
ASSERT_EQ(err, AMDSMI_STATUS_INVAL);
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ void TestVoltCurvRead::Run(void) {
|
||||
ASSERT_TRUE(regions != nullptr);
|
||||
|
||||
num_regions = odv.num_regions;
|
||||
err = amdsmi_dev_od_volt_curve_regions_get(device_handles_[i], &num_regions, regions);
|
||||
err = amdsmi_dev_get_od_volt_curve_regions(device_handles_[i], &num_regions, regions);
|
||||
CHK_ERR_ASRT(err)
|
||||
ASSERT_TRUE(num_regions == odv.num_regions);
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ void TestVoltRead::Run(void) {
|
||||
|
||||
auto print_volt_metric = [&](amdsmi_voltage_metric_t met,
|
||||
std::string label) {
|
||||
err = amdsmi_dev_volt_metric_get(device_handles_[i], type, met, &val_i64);
|
||||
err = amdsmi_dev_get_volt_metric(device_handles_[i], type, met, &val_i64);
|
||||
|
||||
if (err != AMDSMI_STATUS_SUCCESS) {
|
||||
if (err == AMDSMI_STATUS_NOT_SUPPORTED) {
|
||||
@@ -113,7 +113,7 @@ void TestVoltRead::Run(void) {
|
||||
"Not supported on this machine" << std::endl;
|
||||
|
||||
// Verify api support checking functionality is working
|
||||
err = amdsmi_dev_volt_metric_get(device_handles_[i], type, met, nullptr);
|
||||
err = amdsmi_dev_get_volt_metric(device_handles_[i], type, met, nullptr);
|
||||
ASSERT_EQ(err, AMDSMI_STATUS_NOT_SUPPORTED);
|
||||
return;
|
||||
}
|
||||
@@ -122,7 +122,7 @@ void TestVoltRead::Run(void) {
|
||||
}
|
||||
}
|
||||
// Verify api support checking functionality is working
|
||||
err = amdsmi_dev_volt_metric_get(device_handles_[i], type, met, nullptr);
|
||||
err = amdsmi_dev_get_volt_metric(device_handles_[i], type, met, nullptr);
|
||||
ASSERT_EQ(err, AMDSMI_STATUS_INVAL);
|
||||
|
||||
IF_VERB(STANDARD) {
|
||||
|
||||
@@ -140,7 +140,7 @@ void TestXGMIReadWrite::Run(void) {
|
||||
|
||||
// TODO(cfree) We need to find a way to generate xgmi errors so this
|
||||
// test won't be meaningless
|
||||
err = amdsmi_dev_xgmi_error_reset(device);
|
||||
err = amdsmi_dev_reset_xgmi_error(device);
|
||||
CHK_ERR_ASRT(err)
|
||||
IF_VERB(STANDARD) {
|
||||
std::cout << "\t**Successfully reset XGMI Error Status: " << std::endl;
|
||||
|
||||
@@ -167,7 +167,7 @@ void TestBase::PrintDeviceHeader(amdsmi_device_handle dv_ind) {
|
||||
IF_VERB(STANDARD) {
|
||||
std::cout << "\t**Device handle: " << dv_ind << std::endl;
|
||||
}
|
||||
err = amdsmi_dev_id_get(dv_ind, &val_ui16);
|
||||
err = amdsmi_dev_get_id(dv_ind, &val_ui16);
|
||||
CHK_ERR_ASRT(err)
|
||||
IF_VERB(STANDARD) {
|
||||
std::cout << "\t**Device ID: 0x" << std::hex << val_ui16 << std::endl;
|
||||
@@ -187,7 +187,7 @@ void TestBase::PrintDeviceHeader(amdsmi_device_handle dv_ind) {
|
||||
}
|
||||
}
|
||||
|
||||
err = amdsmi_dev_subsystem_id_get(dv_ind, &val_ui16);
|
||||
err = amdsmi_dev_get_subsystem_id(dv_ind, &val_ui16);
|
||||
CHK_ERR_ASRT(err)
|
||||
IF_VERB(STANDARD) {
|
||||
std::cout << "\t**Subsystem ID: 0x" << std::hex << val_ui16 << std::endl;
|
||||
|
||||
Tagairt in Eagrán Nua
Cuir bac ar úsáideoir