esmi: remove energy reporting, fix errors from clang compiler
Clang compiler reporting errors while generating python wrappers for esmi lib Change-Id: I62352aba3b87f9a6b044c97af6b9fd649612b622
Bu işleme şunda yer alıyor:
işlemeyi yapan:
Maisam Arif
ebeveyn
c7726bde3d
işleme
ee890c5060
@@ -135,24 +135,6 @@ int main(int argc, char **argv) {
|
||||
uint32_t err_bits = 0;
|
||||
|
||||
uint64_t pkg_input;
|
||||
cout<<"\n-------------------------------------------------";
|
||||
cout<<"\n| Sensor Name\t\t\t |";
|
||||
for (uint32_t i = 0; i < socket_count; i++) {
|
||||
cout<<setprecision(3)<<" Socket "<<i<<"\t|";
|
||||
}
|
||||
cout<<"\n-------------------------------------------------";
|
||||
cout<<"\n| Energy (K Joules)\t\t | ";
|
||||
|
||||
ret = amdsmi_get_cpu_socket_energy(sockets[i], i, &pkg_input);
|
||||
CHK_AMDSMI_RET(ret)
|
||||
|
||||
if (!ret) {
|
||||
cout<<setprecision(7)<<static_cast<double>(pkg_input)/1000000000<<"\t|";
|
||||
} else {
|
||||
err_bits |= 1 << ret;
|
||||
cout<<" NA (Err:" <<ret<<" |";
|
||||
}
|
||||
cout<<"\n-------------------------------------------------\n";
|
||||
|
||||
err_bits = 0;
|
||||
uint32_t prochot;
|
||||
@@ -210,31 +192,6 @@ int main(int argc, char **argv) {
|
||||
cout<<"\n| SOCKET["<<i<<"] core clock current frequency limit (MHz) : "<<cclk<<"\t|\n";
|
||||
cout<<"-----------------------------------------------------------------\n";
|
||||
|
||||
uint64_t core_input = 0;
|
||||
ret = amdsmi_get_cpu_core_energy(processor_handles[i], i, &core_input);
|
||||
CHK_AMDSMI_RET(ret)
|
||||
cout<<"\n-------------------------------------------------";
|
||||
cout<<"\n| core["<<i<<"] energy | "<<setprecision(7)
|
||||
<<static_cast<double>(core_input)/1000000<<" Joules\t\t|\n";
|
||||
cout<<"-------------------------------------------------\n";
|
||||
|
||||
core_input = 0;
|
||||
cout<<"\n| CPU energies in Joules:\t\t\t\t\t\t\t\t\t|";
|
||||
for (uint32_t j = 0; j < core_count; j++) {
|
||||
ret = amdsmi_get_cpu_core_energy(processor_handles[j], j, &core_input);
|
||||
CHK_AMDSMI_RET(ret)
|
||||
if(!(j % 8)) {
|
||||
if(j < 10)
|
||||
cout<<"\n| cpu [0"<<j<<"] :";
|
||||
else
|
||||
cout<<"\n| cpu ["<<j<<"] :";
|
||||
}
|
||||
cout<<setw(8)<<right<<fixed<<setprecision(3)<<static_cast<double>(core_input)/1000000<<" ";
|
||||
if (j % 8 == 7)
|
||||
cout<<"\t|";
|
||||
}
|
||||
cout<<"\n-------------------------------------------------\n";
|
||||
|
||||
uint32_t c_clk = 0;
|
||||
ret = amdsmi_get_cpu_core_current_freq_limit(processor_handles[i], i, &c_clk);
|
||||
CHK_AMDSMI_RET(ret)
|
||||
@@ -597,7 +554,7 @@ int main(int argc, char **argv) {
|
||||
uint32_t bw;
|
||||
char *link = "P0";
|
||||
io_link.link_name = link;
|
||||
io_link.bw_type = static_cast<io_bw_encoding>(1) ;
|
||||
io_link.bw_type = static_cast<amdsmi_io_bw_encoding_t>(1) ;
|
||||
ret = amdsmi_get_cpu_current_io_bandwidth(sockets[i], i, io_link, &bw);
|
||||
CHK_AMDSMI_RET(ret)
|
||||
|
||||
@@ -614,7 +571,7 @@ int main(int argc, char **argv) {
|
||||
char *link1 = "P0";
|
||||
int bw_ind = 1;
|
||||
xgmi_link.link_name = link1;
|
||||
xgmi_link.bw_type = static_cast<io_bw_encoding>(1<<bw_ind) ;
|
||||
xgmi_link.bw_type = static_cast<amdsmi_io_bw_encoding_t>(1<<bw_ind) ;
|
||||
ret = amdsmi_get_cpu_current_xgmi_bw(sockets[i], xgmi_link, &bw1);
|
||||
CHK_AMDSMI_RET(ret)
|
||||
|
||||
|
||||
@@ -1265,6 +1265,15 @@ typedef struct {
|
||||
float temp; //!< temperature in degree celcius
|
||||
} amdsmi_dimm_thermal_t;
|
||||
|
||||
/**
|
||||
* @brief xGMI Bandwidth Encoding types
|
||||
*/
|
||||
typedef enum {
|
||||
AGG_BW0 = 1, //!< Aggregate Bandwidth
|
||||
RD_BW0 = 2, //!< Read Bandwidth
|
||||
WR_BW0 = 4 //!< Write Bandwdith
|
||||
} amdsmi_io_bw_encoding_t;
|
||||
|
||||
/**
|
||||
* @brief LINK name and Bandwidth type Information.It contains
|
||||
* link names i.e valid link names are
|
||||
@@ -1273,7 +1282,7 @@ typedef struct {
|
||||
* Valid bandwidth types 1(Aggregate_BW), 2 (Read BW), 4 (Write BW).
|
||||
*/
|
||||
typedef struct {
|
||||
io_bw_encoding bw_type; //!< Bandwidth Type Information [1, 2, 4]
|
||||
amdsmi_io_bw_encoding_t bw_type; //!< Bandwidth Type Information [1, 2, 4]
|
||||
char *link_name; //!< Link name [P0, P1, G0, G1 etc]
|
||||
} amdsmi_link_id_bw_type_t;
|
||||
|
||||
|
||||
@@ -2826,7 +2826,7 @@ amdsmi_status_t amdsmi_get_cpu_current_io_bandwidth(amdsmi_cpusocket_handle sock
|
||||
return status;
|
||||
|
||||
link.link_name = io_link.link_name;
|
||||
link.bw_type= io_link.bw_type;
|
||||
link.bw_type = static_cast<amdsmi_io_bw_encoding_t>(io_link.bw_type);
|
||||
*io_bw = bw;
|
||||
|
||||
return AMDSMI_STATUS_SUCCESS;
|
||||
@@ -2852,7 +2852,7 @@ amdsmi_status_t amdsmi_get_cpu_current_xgmi_bw(amdsmi_cpusocket_handle socket_ha
|
||||
return status;
|
||||
|
||||
link.link_name = io_link.link_name;
|
||||
link.bw_type= io_link.bw_type;
|
||||
link.bw_type= static_cast<amdsmi_io_bw_encoding_t>(io_link.bw_type);
|
||||
*xgmi_bw = bw;
|
||||
|
||||
return AMDSMI_STATUS_SUCCESS;
|
||||
|
||||
Yeni konuda referans
Bir kullanıcı engelle