Fix GPU metric tests & cleanup test output

- CLI: Added average_power to display if current_power is empty
    - CLI: fixed PCIe current_speed not displaying GT/s
    - ROCm API: 1.3 & 1.4
                -> commented out setting avg clocks to current clock value
(leave as max uint value, not re-assign; these are not same values)
                    -> commented out setting current_socket_power = average_power
(leave as max uint value, not re-assign; these are not same values)
                    -> For all non-array clocks, placed value in first
                        array[0] to keep outputs consistent
                    (helps xcd calc)
      - ROCm API: rsmi_dev_metrics_curr_gfxclk_get fixed to count
        XCDs using backwards compatible rsmi_dev_gpu_metrics_info_get.
      - ^ Fixes XCD count overall + assigning clock[0] in 1.3 to curr
        freq
      - AMD SMI API: amdsmi_get_gpu_metrics_info() initialized all new
        1.5 metric values for all lower metric tables
      - AMD SMI API: wrapper -> fix is here + returns correct AMD SMI return
      - AMD SMI API: wrapper -> now displays amdsmi return status as
        string in logs
      - gpu_metrics_read.cc -> now has better overview of backwards
        compatible output
      - gpu_metrics_read.cc -> Cleaned up output, added units, and
        display all array output

Signed-off-by: Charis Poag <Charis.Poag@amd.com>
Change-Id: Id5b60ded5b0ed2cdf0f96ca72c79e356f0410960


[ROCm/amdsmi commit: 5ff5af0b5a]
This commit is contained in:
Charis Poag
2023-12-19 02:49:52 -06:00
parent e924266a25
commit 601a254f37
6 changed files with 600 additions and 113 deletions
+3 -3
View File
@@ -1332,6 +1332,9 @@ typedef struct {
/*
* v1.5 additions
*/
// JPEG activity % per AID
uint16_t jpeg_activity[AMDSMI_MAX_NUM_JPEG];
// Memory Bandwidth Usage Accumulated (GB/sec)
uint64_t mem_bandwidth_acc;
@@ -1343,9 +1346,6 @@ typedef struct {
// PCIE NAK received accumulated count
uint32_t pcie_nak_rcvd_count_acc;
// JPEG activity % per AID
uint16_t jpeg_activity[AMDSMI_MAX_NUM_JPEG];
/// \endcond
} amdsmi_gpu_metrics_t;