@@ -1427,31 +1427,6 @@ def bad_pages(self, args, multiple_devices=False, gpu=None, retired=None, pendin
14271427 self .logger .print_output ()
14281428
14291429
1430- def build_xcp_dict (self , key , violation_status , num_partition ):
1431- if not isinstance (violation_status [key ], list ):
1432- if "active_" in key :
1433- if violation_status [key ] != "N/A" :
1434- if violation_status [key ] is True :
1435- violation_status [key ] = "ACTIVE"
1436- elif violation_status [key ] is False :
1437- violation_status [key ] = "NOT ACTIVE"
1438- ret = violation_status [key ]
1439- elif isinstance (violation_status [key ], list ):
1440- for row in violation_status [key ]:
1441- for element in row :
1442- if element != "N/A" :
1443- if "active_" in key :
1444- if element is True :
1445- row [row .index (element )] = "ACTIVE"
1446- elif element is False :
1447- row [row .index (element )] = "NOT ACTIVE"
1448- elif ("per_" or "acc_" ) in key :
1449- row [row .index (element )] = element
1450- else :
1451- continue
1452- ret = {f"xcp_{ i } " : violation_status [key ][i ] for i in range (num_partition )}
1453- return ret
1454-
14551430 def metric_gpu (self , args , multiple_devices = False , watching_output = False , gpu = None ,
14561431 usage = None , watch = None , watch_time = None , iterations = None , power = None ,
14571432 clock = None , temperature = None , ecc = None , ecc_blocks = None , pcie = None ,
@@ -2662,30 +2637,30 @@ def metric_gpu(self, args, multiple_devices=False, watching_output=False, gpu=No
26622637 throttle_status ['vr_thermal_accumulated' ] = violation_status ['acc_vr_thrm' ]
26632638 throttle_status ['hbm_thermal_accumulated' ] = violation_status ['acc_hbm_thrm' ]
26642639 throttle_status ['gfx_clk_below_host_limit_accumulated' ] = violation_status ['acc_gfx_clk_below_host_limit' ] #deprecated
2665- throttle_status ['gfx_clk_below_host_limit_power_accumulated' ] = self .build_xcp_dict ('acc_gfx_clk_below_host_limit_pwr' , violation_status , num_partition )
2666- throttle_status ['gfx_clk_below_host_limit_thermal_accumulated' ] = self .build_xcp_dict ('acc_gfx_clk_below_host_limit_thm' , violation_status , num_partition )
2667- throttle_status ['total_gfx_clk_below_host_limit_accumulated' ] = self .build_xcp_dict ('acc_gfx_clk_below_host_limit_total' , violation_status , num_partition )
2668- throttle_status ['low_utilization_accumulated' ] = self .build_xcp_dict ('acc_low_utilization' , violation_status , num_partition )
2669- throttle_status ['prochot_violation_status' ] = self .build_xcp_dict ('active_prochot_thrm' , violation_status , num_partition )
2670- throttle_status ['ppt_violation_status' ] = self .build_xcp_dict ('active_ppt_pwr' , violation_status , num_partition )
2671- throttle_status ['socket_thermal_violation_status' ] = self .build_xcp_dict ('active_socket_thrm' , violation_status , num_partition )
2672- throttle_status ['vr_thermal_violation_status' ] = self .build_xcp_dict ('active_vr_thrm' , violation_status , num_partition )
2673- throttle_status ['hbm_thermal_violation_status' ] = self .build_xcp_dict ('active_hbm_thrm' , violation_status , num_partition )
2674- throttle_status ['gfx_clk_below_host_limit_violation_status' ] = self .build_xcp_dict ('active_gfx_clk_below_host_limit' , violation_status , num_partition ) # deprecated
2675- throttle_status ['gfx_clk_below_host_limit_power_violation_status' ] = self .build_xcp_dict ('active_gfx_clk_below_host_limit_pwr' , violation_status , num_partition )
2676- throttle_status ['gfx_clk_below_host_limit_thermal_violation_status' ] = self .build_xcp_dict ('active_gfx_clk_below_host_limit_thm' , violation_status , num_partition )
2677- throttle_status ['total_gfx_clk_below_host_limit_violation_status' ] = self .build_xcp_dict ('active_gfx_clk_below_host_limit_total' , violation_status , num_partition )
2678- throttle_status ['low_utilization_violation_status' ] = self .build_xcp_dict ('active_low_utilization' , violation_status , num_partition )
2640+ throttle_status ['gfx_clk_below_host_limit_power_accumulated' ] = self .helpers . build_xcp_dict ('acc_gfx_clk_below_host_limit_pwr' , violation_status , num_partition )
2641+ throttle_status ['gfx_clk_below_host_limit_thermal_accumulated' ] = self .helpers . build_xcp_dict ('acc_gfx_clk_below_host_limit_thm' , violation_status , num_partition )
2642+ throttle_status ['total_gfx_clk_below_host_limit_accumulated' ] = self .helpers . build_xcp_dict ('acc_gfx_clk_below_host_limit_total' , violation_status , num_partition )
2643+ throttle_status ['low_utilization_accumulated' ] = self .helpers . build_xcp_dict ('acc_low_utilization' , violation_status , num_partition )
2644+ throttle_status ['prochot_violation_status' ] = self .helpers . build_xcp_dict ('active_prochot_thrm' , violation_status , num_partition )
2645+ throttle_status ['ppt_violation_status' ] = self .helpers . build_xcp_dict ('active_ppt_pwr' , violation_status , num_partition )
2646+ throttle_status ['socket_thermal_violation_status' ] = self .helpers . build_xcp_dict ('active_socket_thrm' , violation_status , num_partition )
2647+ throttle_status ['vr_thermal_violation_status' ] = self .helpers . build_xcp_dict ('active_vr_thrm' , violation_status , num_partition )
2648+ throttle_status ['hbm_thermal_violation_status' ] = self .helpers . build_xcp_dict ('active_hbm_thrm' , violation_status , num_partition )
2649+ throttle_status ['gfx_clk_below_host_limit_violation_status' ] = self .helpers . build_xcp_dict ('active_gfx_clk_below_host_limit' , violation_status , num_partition ) # deprecated
2650+ throttle_status ['gfx_clk_below_host_limit_power_violation_status' ] = self .helpers . build_xcp_dict ('active_gfx_clk_below_host_limit_pwr' , violation_status , num_partition )
2651+ throttle_status ['gfx_clk_below_host_limit_thermal_violation_status' ] = self .helpers . build_xcp_dict ('active_gfx_clk_below_host_limit_thm' , violation_status , num_partition )
2652+ throttle_status ['total_gfx_clk_below_host_limit_violation_status' ] = self .helpers . build_xcp_dict ('active_gfx_clk_below_host_limit_total' , violation_status , num_partition )
2653+ throttle_status ['low_utilization_violation_status' ] = self .helpers . build_xcp_dict ('active_low_utilization' , violation_status , num_partition )
26792654 throttle_status ['prochot_violation_activity' ] = violation_status ['per_prochot_thrm' ]
26802655 throttle_status ['ppt_violation_activity' ] = violation_status ['per_ppt_pwr' ]
26812656 throttle_status ['socket_thermal_violation_activity' ] = violation_status ['per_socket_thrm' ]
26822657 throttle_status ['vr_thermal_violation_activity' ] = violation_status ['per_vr_thrm' ]
26832658 throttle_status ['hbm_thermal_violation_activity' ] = violation_status ['per_hbm_thrm' ]
26842659 throttle_status ['gfx_clk_below_host_limit_violation_activity' ] = violation_status ['per_gfx_clk_below_host_limit' ] # deprecated
2685- throttle_status ['gfx_clk_below_host_limit_power_violation_activity' ] = self .build_xcp_dict ('per_gfx_clk_below_host_limit_pwr' , violation_status , num_partition )
2686- throttle_status ['gfx_clk_below_host_limit_thermal_violation_activity' ] = self .build_xcp_dict ('per_gfx_clk_below_host_limit_thm' , violation_status , num_partition )
2687- throttle_status ['total_gfx_clk_below_host_limit_violation_activity' ] = self .build_xcp_dict ('per_gfx_clk_below_host_limit_total' , violation_status , num_partition )
2688- throttle_status ['low_utilization_violation_activity' ] = self .build_xcp_dict ('per_low_utilization' , violation_status , num_partition )
2660+ throttle_status ['gfx_clk_below_host_limit_power_violation_activity' ] = self .helpers . build_xcp_dict ('per_gfx_clk_below_host_limit_pwr' , violation_status , num_partition )
2661+ throttle_status ['gfx_clk_below_host_limit_thermal_violation_activity' ] = self .helpers . build_xcp_dict ('per_gfx_clk_below_host_limit_thm' , violation_status , num_partition )
2662+ throttle_status ['total_gfx_clk_below_host_limit_violation_activity' ] = self .helpers . build_xcp_dict ('per_gfx_clk_below_host_limit_total' , violation_status , num_partition )
2663+ throttle_status ['low_utilization_violation_activity' ] = self .helpers . build_xcp_dict ('per_low_utilization' , violation_status , num_partition )
26892664
26902665 except amdsmi_exception .AmdSmiLibraryException as e :
26912666 values_dict ['throttle' ] = throttle_status
0 commit comments