From a46885c5ec89f3f80fc2f7bee94483f1bc5a2b92 Mon Sep 17 00:00:00 2001 From: colramos-amd Date: Tue, 27 Feb 2024 16:56:25 -0600 Subject: [PATCH] Added consistent 'Channel' headers to l2_per_chan, removed hardcoded 32 channels, and removed printed Nones (#276) Signed-off-by: colramos-amd [ROCm/rocprofiler-compute commit: 09f14553087f2a6e113215e3dcf9f0998e74bb2d] --- .../gfx908/1800_L2_cache_per_channel.yaml | 50 ++++++------- .../gfx90a/1800_L2_cache_per_channel.yaml | 38 +++++----- .../gfx940/1800_L2_cache_per_channel.yaml | 75 +++++++++++++------ .../gfx941/1800_L2_cache_per_channel.yaml | 75 +++++++++++++------ .../gfx942/1800_L2_cache_per_channel.yaml | 50 ++++++------- .../rocprofiler-compute/src/utils/parser.py | 49 ++++++------ .../rocprofiler-compute/src/utils/schema.py | 26 +++---- .../rocprofiler-compute/src/utils/specs.py | 5 -- 8 files changed, 212 insertions(+), 156 deletions(-) diff --git a/projects/rocprofiler-compute/src/omniperf_soc/analysis_configs/gfx908/1800_L2_cache_per_channel.yaml b/projects/rocprofiler-compute/src/omniperf_soc/analysis_configs/gfx908/1800_L2_cache_per_channel.yaml index 72c91450c0..8b845cc33d 100644 --- a/projects/rocprofiler-compute/src/omniperf_soc/analysis_configs/gfx908/1800_L2_cache_per_channel.yaml +++ b/projects/rocprofiler-compute/src/omniperf_soc/analysis_configs/gfx908/1800_L2_cache_per_channel.yaml @@ -173,7 +173,7 @@ Panel Config: id: 1802 title: L2 Cache Hit Rate (pct) header: - metric: Metric + metric: Channel expr: Expression metric: "::_1": @@ -181,27 +181,27 @@ Panel Config: (((100 * TCC_HIT[::_1]) / (TCC_HIT[::_1] + TCC_MISS[::_1])) if ((TCC_HIT[::_1] + TCC_MISS[::_1]) != 0) else None) placeholder_range: - "::_1": 32 + "::_1": $total_l2_chan cli_style: simple_box - metric_table: id: 1803 title: L2 Requests (per normUnit) header: - metric: Metric + metric: Channel expr: Expression metric: "::_1": expr: (TO_INT(TCC_REQ[::_1]) / $denom) placeholder_range: - "::_1": 32 + "::_1": $total_l2_chan cli_style: simple_box - metric_table: id: 1804 title: L2 Requests (per normUnit) header: - metric: Metric + metric: Channel read req: L2 Read write req: L2 Write atomic req: L2 Atomic @@ -211,14 +211,14 @@ Panel Config: write req: AVG((TO_INT(TCC_WRITE[::_1]) / $denom)) atomic req: AVG((TO_INT(TCC_ATOMIC[::_1]) / $denom)) placeholder_range: - "::_1": 32 + "::_1": $total_l2_chan cli_style: simple_multiple_bar - metric_table: id: 1805 title: L2-Fabric Requests (per normUnit) header: - metric: Metric + metric: Channel read req: L2-Fabric Read write req: L2-Fabric Write and Atomic atomic req: L2-Fabric Atomic @@ -228,7 +228,7 @@ Panel Config: write req: AVG((TO_INT(TCC_EA_WRREQ[::_1]) / $denom)) atomic req: AVG((TO_INT(TCC_EA_ATOMIC[::_1]) / $denom)) placeholder_range: - "::_1": 32 + "::_1": $total_l2_chan cli_style: simple_multiple_bar # - metric_table: @@ -258,7 +258,7 @@ Panel Config: id: 1806 title: L2-Fabric Read Latency (Cycles) header: - metric: Metric + metric: Channel expr: Expression metric: "::_1": @@ -266,14 +266,14 @@ Panel Config: ((TCC_EA_RDREQ_LEVEL[::_1] / TCC_EA_RDREQ[::_1]) if (TCC_EA_RDREQ[::_1] != 0) else None) placeholder_range: - "::_1": 32 + "::_1": $total_l2_chan cli_style: simple_box - metric_table: id: 1807 title: L2-Fabric Write and Atomic Latency (Cycles) header: - metric: Metric + metric: Channel expr: Expression metric: "::_1": @@ -281,49 +281,49 @@ Panel Config: ((TCC_EA_WRREQ_LEVEL[::_1] / TCC_EA_WRREQ[::_1]) if (TCC_EA_WRREQ[::_1] != 0) else None) placeholder_range: - "::_1": 32 + "::_1": $total_l2_chan cli_style: simple_box - metric_table: id: 1808 title: L2-Fabric Atomic Latency (Cycles per normUnit) header: - metric: Metric + metric: Channel expr: Expression metric: "::_1": expr: ((TCC_EA_ATOMIC_LEVEL[::_1] / TCC_EA_ATOMIC[::_1]) if (TCC_EA_ATOMIC[::_1] != 0) else 0) placeholder_range: - "::_1": 32 + "::_1": $total_l2_chan cli_style: simple_box - metric_table: id: 1809 title: L2-Fabric Read Stall (Cycles per normUnit) header: - metric: Metric - ea read stall - pcie: L2 - Fabric Read Stall (PCIe) - ea read stall - if: L2 - Fabric Read Stall (Infinity Fabric™) - ea read stall - hbm: L2 - Fabric Read Stall (HBM) + metric: Channel + ea read stall - pcie: L2-Fabric Read Stall (PCIe) + ea read stall - if: L2-Fabric Read Stall (Infinity Fabric™) + ea read stall - hbm: L2-Fabric Read Stall (HBM) metric: "::_1": ea read stall - pcie: None # Missing perfmon ea read stall - if: None # Missing perfmon ea read stall - hbm: None # Missing perfmon placeholder_range: - "::_1": 32 + "::_1": $total_l2_chan cli_style: simple_multiple_bar - metric_table: id: 1810 title: L2-Fabric Write and Atomic Stall (Cycles per normUnit) header: - metric: Metric - ea write stall - pcie: L2 - Fabric Write Stall (PCIe) - ea write stall - if: L2 - Fabric Write Stall (Infinity Fabric™) - ea write stall - hbm: L2 - Fabric Write Stall (HBM) - ea write stall - starve: L2 - Fabric Write Starve + metric: Channel + ea write stall - pcie: L2-Fabric Write Stall (PCIe) + ea write stall - if: L2-Fabric Write Stall (Infinity Fabric™) + ea write stall - hbm: L2-Fabric Write Stall (HBM) + ea write stall - starve: L2-Fabric Write Starve metric: "::_1": ea write stall - pcie: None # Missing perfmon @@ -331,5 +331,5 @@ Panel Config: ea write stall - hbm: None # Missing perfmon ea write stall - starve: AVG((TO_INT(TCC_TOO_MANY_EA_WRREQS_STALL[::_1]) / $denom)) placeholder_range: - "::_1": 32 + "::_1": $total_l2_chan cli_style: simple_multiple_bar \ No newline at end of file diff --git a/projects/rocprofiler-compute/src/omniperf_soc/analysis_configs/gfx90a/1800_L2_cache_per_channel.yaml b/projects/rocprofiler-compute/src/omniperf_soc/analysis_configs/gfx90a/1800_L2_cache_per_channel.yaml index ea680f8e1c..e85bfccf43 100644 --- a/projects/rocprofiler-compute/src/omniperf_soc/analysis_configs/gfx90a/1800_L2_cache_per_channel.yaml +++ b/projects/rocprofiler-compute/src/omniperf_soc/analysis_configs/gfx90a/1800_L2_cache_per_channel.yaml @@ -6,7 +6,7 @@ Metric Description: # Define the panel properties and properties of each metric in the panel. Panel Config: id: 1800 - title: L2 Cache (per Metric) + title: L2 Cache (per Channel) data source: - metric_table: id: 1801 @@ -173,7 +173,7 @@ Panel Config: id: 1802 title: L2 Cache Hit Rate (pct) header: - metric: Metric + metric: Channel expr: Expression metric: "::_1": @@ -181,27 +181,27 @@ Panel Config: (((100 * TCC_HIT[::_1]) / (TCC_HIT[::_1] + TCC_MISS[::_1])) if ((TCC_HIT[::_1] + TCC_MISS[::_1]) != 0) else None) placeholder_range: - "::_1": 32 + "::_1": $total_l2_chan cli_style: simple_box - metric_table: id: 1803 title: L2 Requests (per normUnit) header: - metric: Metric + metric: Channel expr: Expression metric: "::_1": expr: (TO_INT(TCC_REQ[::_1]) / $denom) placeholder_range: - "::_1": 32 + "::_1": $total_l2_chan cli_style: simple_box - metric_table: id: 1804 title: L2 Requests (per normUnit) header: - metric: Metric + metric: Channel read req: L2 Read write req: L2 Write atomic req: L2 Atomic @@ -211,14 +211,14 @@ Panel Config: write req: AVG((TO_INT(TCC_WRITE[::_1]) / $denom)) atomic req: AVG((TO_INT(TCC_ATOMIC[::_1]) / $denom)) placeholder_range: - "::_1": 32 + "::_1": $total_l2_chan cli_style: simple_multiple_bar - metric_table: id: 1805 title: L2-Fabric Requests (per normUnit) header: - metric: Metric + metric: Channel read req: L2-Fabric Read write req: L2-Fabric Write and Atomic atomic req: L2-Fabric Atomic @@ -228,7 +228,7 @@ Panel Config: write req: AVG((TO_INT(TCC_EA_WRREQ[::_1]) / $denom)) atomic req: AVG((TO_INT(TCC_EA_ATOMIC[::_1]) / $denom)) placeholder_range: - "::_1": 32 + "::_1": $total_l2_chan cli_style: simple_multiple_bar # - metric_table: @@ -258,7 +258,7 @@ Panel Config: id: 1806 title: L2-Fabric Read Latency (Cycles) header: - metric: Metric + metric: Channel expr: Expression metric: "::_1": @@ -266,14 +266,14 @@ Panel Config: ((TCC_EA_RDREQ_LEVEL[::_1] / TCC_EA_RDREQ[::_1]) if (TCC_EA_RDREQ[::_1] != 0) else None) placeholder_range: - "::_1": 32 + "::_1": $total_l2_chan cli_style: simple_box - metric_table: id: 1807 title: L2-Fabric Write and Atomic Latency (Cycles) header: - metric: Metric + metric: Channel expr: Expression metric: "::_1": @@ -281,28 +281,28 @@ Panel Config: ((TCC_EA_WRREQ_LEVEL[::_1] / TCC_EA_WRREQ[::_1]) if (TCC_EA_WRREQ[::_1] != 0) else None) placeholder_range: - "::_1": 32 + "::_1": $total_l2_chan cli_style: simple_box - metric_table: id: 1808 title: L2-Fabric Atomic Latency (Cycles per normUnit) header: - metric: Metric + metric: Channel expr: Expression metric: "::_1": expr: ((TCC_EA_ATOMIC_LEVEL[::_1] / TCC_EA_ATOMIC[::_1]) if (TCC_EA_ATOMIC[::_1] != 0) else 0) placeholder_range: - "::_1": 32 + "::_1": $total_l2_chan cli_style: simple_box - metric_table: id: 1809 title: L2-Fabric Read Stall (Cycles per normUnit) header: - metric: Metric + metric: Channel ea read stall - pcie: L2-Fabric Read Stall (PCIe) ea read stall - if: L2-Fabric Read Stall (Infinity Fabric™) ea read stall - hbm: L2-Fabric Read Stall (HBM) @@ -312,14 +312,14 @@ Panel Config: ea read stall - if: None # Missing perfmon ea read stall - hbm: None # Missing perfmon placeholder_range: - "::_1": 32 + "::_1": $total_l2_chan cli_style: simple_multiple_bar - metric_table: id: 1810 title: L2-Fabric Write and Atomic Stall (Cycles per normUnit) header: - metric: Metric + metric: Channel ea write stall - pcie: L2-Fabric Write Stall (PCIe) ea write stall - if: L2-Fabric Write Stall (Infinity Fabric™) ea write stall - hbm: L2-Fabric Write Stall (HBM) @@ -331,5 +331,5 @@ Panel Config: ea write stall - hbm: None # Missing perfmon ea write stall - starve: AVG((TO_INT(TCC_TOO_MANY_EA_WRREQS_STALL[::_1]) / $denom)) placeholder_range: - "::_1": 32 + "::_1": $total_l2_chan cli_style: simple_multiple_bar \ No newline at end of file diff --git a/projects/rocprofiler-compute/src/omniperf_soc/analysis_configs/gfx940/1800_L2_cache_per_channel.yaml b/projects/rocprofiler-compute/src/omniperf_soc/analysis_configs/gfx940/1800_L2_cache_per_channel.yaml index 259b324adf..47cb08f916 100644 --- a/projects/rocprofiler-compute/src/omniperf_soc/analysis_configs/gfx940/1800_L2_cache_per_channel.yaml +++ b/projects/rocprofiler-compute/src/omniperf_soc/analysis_configs/gfx940/1800_L2_cache_per_channel.yaml @@ -6,7 +6,7 @@ Metric Description: # Define the panel properties and properties of each metric in the panel. Panel Config: id: 1800 - title: L2 Cache (per Metric) + title: L2 Cache (per Channel) data source: - metric_table: id: 1801 @@ -109,7 +109,7 @@ Panel Config: id: 1802 title: L2 Cache Hit Rate (pct) header: - metric: Metric + metric: Channel expr: Expression metric: "::_1": @@ -124,7 +124,7 @@ Panel Config: id: 1803 title: L2 Requests (per normUnit) header: - metric: Metric + metric: Channel expr: Expression metric: "::_1": @@ -137,7 +137,7 @@ Panel Config: id: 1804 title: L2 Requests (per normUnit) header: - metric: Metric + metric: Channel read req: L2 Read write req: L2 Write atomic req: L2 Atomic @@ -154,7 +154,7 @@ Panel Config: id: 1805 title: L2-Fabric Requests (per normUnit) header: - metric: Metric + metric: Channel read req: L2-Fabric Read write req: L2-Fabric Write and Atomic atomic req: L2-Fabric Atomic @@ -194,7 +194,7 @@ Panel Config: id: 1806 title: L2-Fabric Read Latency (Cycles) header: - metric: Metric + metric: Channel expr: Expression metric: "::_1": @@ -209,7 +209,7 @@ Panel Config: id: 1807 title: L2-Fabric Write and Atomic Latency (Cycles) header: - metric: Metric + metric: Channel expr: Expression metric: "::_1": @@ -224,7 +224,7 @@ Panel Config: id: 1808 title: L2-Fabric Atomic Latency (Cycles per normUnit) header: - metric: Metric + metric: Channel expr: Expression metric: "::_1": @@ -238,15 +238,15 @@ Panel Config: id: 1809 title: L2-Fabric Read Stall (Cycles per normUnit) header: - metric: Metric - ea read stall - io: L2-Fabric Read Stall - IO - ea read stall - gmi: L2-Fabric Read Stall - GMI - ea read stall - dram: L2-Fabric Read Stall - DRAM + metric: Channel + ea read stall - pcie: L2-Fabric Read Stall (PCIe) + ea read stall - if: L2-Fabric Read Stall (Infinity Fabric™) + ea read stall - hbm: L2-Fabric Read Stall (HBM) metric: "::_1": - ea read stall - io: None # Missing perfmon - ea read stall - gmi: None # Missing perfmon - ea read stall - dram: None # Missing perfmon + ea read stall - pcie: None # Missing perfmon + ea read stall - if: None # Missing perfmon + ea read stall - hbm: None # Missing perfmon placeholder_range: "::_1": $total_l2_chan cli_style: simple_multiple_bar @@ -255,17 +255,44 @@ Panel Config: id: 1810 title: L2-Fabric Write and Atomic Stall (Cycles per normUnit) header: - metric: Metric - ea write stall - io: L2-Fabric Write Stall - IO - ea write stall - gmi: L2-Fabric Write Stall - GMI - ea write stall - dram: L2-Fabric Write Stall - DRAM - ea write stall - starve: L2-Fabric Write Stall - Starve + metric: Channel + ea write stall - pcie: L2-Fabric Write Stall (PCIe) + ea write stall - gmi: L2-Fabric Write Stall (Infinity Fabric™) + ea write stall - dram: L2-Fabric Write Stall (HBM) + ea write stall - starve: L2-Fabric Write Starve metric: "::_1": - ea write stall - io: None # Missing perfmon - ea write stall - gmi: None # Missing perfmon - ea write stall - dram: None # Missing perfmon - ea write stall - starve: None # Missing perfmon + ea write stall - pcie: None # Missing perfmon + ea write stall - if: None # Missing perfmon + ea write stall - hbm: None # Missing perfmon + ea write stall - starve: AVG((TO_INT(TCC_TOO_MANY_EA_WRREQS_STALL[::_1]) / $denom)) placeholder_range: "::_1": $total_l2_chan cli_style: simple_multiple_bar + + # - metric_table: + # id: 1811 + # title: L2 Tag Stall (cycles) + # header: + # metric: Metric + # expr: Expression + # metric: + # "::_1": + # expr: TCC_TAG_STALL[::_1] + # placeholder_range: + # "::_1": $total_l2_chan + # cli_style: simple_box + + - metric_table: + id: 1812 + title: L2-Fabric (128B read requests per normUnit) + header: + metric: Channel + expr: Expression + metric: + "::_1": + expr: (TO_INT(TCC_BUBBLE[::_1]) / $denom) + placeholder_range: + "::_1": $total_l2_chan + # tips: Number of 128-byte read requests sent to EA + cli_style: simple_box diff --git a/projects/rocprofiler-compute/src/omniperf_soc/analysis_configs/gfx941/1800_L2_cache_per_channel.yaml b/projects/rocprofiler-compute/src/omniperf_soc/analysis_configs/gfx941/1800_L2_cache_per_channel.yaml index 259b324adf..47cb08f916 100644 --- a/projects/rocprofiler-compute/src/omniperf_soc/analysis_configs/gfx941/1800_L2_cache_per_channel.yaml +++ b/projects/rocprofiler-compute/src/omniperf_soc/analysis_configs/gfx941/1800_L2_cache_per_channel.yaml @@ -6,7 +6,7 @@ Metric Description: # Define the panel properties and properties of each metric in the panel. Panel Config: id: 1800 - title: L2 Cache (per Metric) + title: L2 Cache (per Channel) data source: - metric_table: id: 1801 @@ -109,7 +109,7 @@ Panel Config: id: 1802 title: L2 Cache Hit Rate (pct) header: - metric: Metric + metric: Channel expr: Expression metric: "::_1": @@ -124,7 +124,7 @@ Panel Config: id: 1803 title: L2 Requests (per normUnit) header: - metric: Metric + metric: Channel expr: Expression metric: "::_1": @@ -137,7 +137,7 @@ Panel Config: id: 1804 title: L2 Requests (per normUnit) header: - metric: Metric + metric: Channel read req: L2 Read write req: L2 Write atomic req: L2 Atomic @@ -154,7 +154,7 @@ Panel Config: id: 1805 title: L2-Fabric Requests (per normUnit) header: - metric: Metric + metric: Channel read req: L2-Fabric Read write req: L2-Fabric Write and Atomic atomic req: L2-Fabric Atomic @@ -194,7 +194,7 @@ Panel Config: id: 1806 title: L2-Fabric Read Latency (Cycles) header: - metric: Metric + metric: Channel expr: Expression metric: "::_1": @@ -209,7 +209,7 @@ Panel Config: id: 1807 title: L2-Fabric Write and Atomic Latency (Cycles) header: - metric: Metric + metric: Channel expr: Expression metric: "::_1": @@ -224,7 +224,7 @@ Panel Config: id: 1808 title: L2-Fabric Atomic Latency (Cycles per normUnit) header: - metric: Metric + metric: Channel expr: Expression metric: "::_1": @@ -238,15 +238,15 @@ Panel Config: id: 1809 title: L2-Fabric Read Stall (Cycles per normUnit) header: - metric: Metric - ea read stall - io: L2-Fabric Read Stall - IO - ea read stall - gmi: L2-Fabric Read Stall - GMI - ea read stall - dram: L2-Fabric Read Stall - DRAM + metric: Channel + ea read stall - pcie: L2-Fabric Read Stall (PCIe) + ea read stall - if: L2-Fabric Read Stall (Infinity Fabric™) + ea read stall - hbm: L2-Fabric Read Stall (HBM) metric: "::_1": - ea read stall - io: None # Missing perfmon - ea read stall - gmi: None # Missing perfmon - ea read stall - dram: None # Missing perfmon + ea read stall - pcie: None # Missing perfmon + ea read stall - if: None # Missing perfmon + ea read stall - hbm: None # Missing perfmon placeholder_range: "::_1": $total_l2_chan cli_style: simple_multiple_bar @@ -255,17 +255,44 @@ Panel Config: id: 1810 title: L2-Fabric Write and Atomic Stall (Cycles per normUnit) header: - metric: Metric - ea write stall - io: L2-Fabric Write Stall - IO - ea write stall - gmi: L2-Fabric Write Stall - GMI - ea write stall - dram: L2-Fabric Write Stall - DRAM - ea write stall - starve: L2-Fabric Write Stall - Starve + metric: Channel + ea write stall - pcie: L2-Fabric Write Stall (PCIe) + ea write stall - gmi: L2-Fabric Write Stall (Infinity Fabric™) + ea write stall - dram: L2-Fabric Write Stall (HBM) + ea write stall - starve: L2-Fabric Write Starve metric: "::_1": - ea write stall - io: None # Missing perfmon - ea write stall - gmi: None # Missing perfmon - ea write stall - dram: None # Missing perfmon - ea write stall - starve: None # Missing perfmon + ea write stall - pcie: None # Missing perfmon + ea write stall - if: None # Missing perfmon + ea write stall - hbm: None # Missing perfmon + ea write stall - starve: AVG((TO_INT(TCC_TOO_MANY_EA_WRREQS_STALL[::_1]) / $denom)) placeholder_range: "::_1": $total_l2_chan cli_style: simple_multiple_bar + + # - metric_table: + # id: 1811 + # title: L2 Tag Stall (cycles) + # header: + # metric: Metric + # expr: Expression + # metric: + # "::_1": + # expr: TCC_TAG_STALL[::_1] + # placeholder_range: + # "::_1": $total_l2_chan + # cli_style: simple_box + + - metric_table: + id: 1812 + title: L2-Fabric (128B read requests per normUnit) + header: + metric: Channel + expr: Expression + metric: + "::_1": + expr: (TO_INT(TCC_BUBBLE[::_1]) / $denom) + placeholder_range: + "::_1": $total_l2_chan + # tips: Number of 128-byte read requests sent to EA + cli_style: simple_box diff --git a/projects/rocprofiler-compute/src/omniperf_soc/analysis_configs/gfx942/1800_L2_cache_per_channel.yaml b/projects/rocprofiler-compute/src/omniperf_soc/analysis_configs/gfx942/1800_L2_cache_per_channel.yaml index a24e204f23..47cb08f916 100644 --- a/projects/rocprofiler-compute/src/omniperf_soc/analysis_configs/gfx942/1800_L2_cache_per_channel.yaml +++ b/projects/rocprofiler-compute/src/omniperf_soc/analysis_configs/gfx942/1800_L2_cache_per_channel.yaml @@ -6,7 +6,7 @@ Metric Description: # Define the panel properties and properties of each metric in the panel. Panel Config: id: 1800 - title: L2 Cache (per Metric) + title: L2 Cache (per Channel) data source: - metric_table: id: 1801 @@ -109,7 +109,7 @@ Panel Config: id: 1802 title: L2 Cache Hit Rate (pct) header: - metric: Metric + metric: Channel expr: Expression metric: "::_1": @@ -124,7 +124,7 @@ Panel Config: id: 1803 title: L2 Requests (per normUnit) header: - metric: Metric + metric: Channel expr: Expression metric: "::_1": @@ -137,7 +137,7 @@ Panel Config: id: 1804 title: L2 Requests (per normUnit) header: - metric: Metric + metric: Channel read req: L2 Read write req: L2 Write atomic req: L2 Atomic @@ -154,7 +154,7 @@ Panel Config: id: 1805 title: L2-Fabric Requests (per normUnit) header: - metric: Metric + metric: Channel read req: L2-Fabric Read write req: L2-Fabric Write and Atomic atomic req: L2-Fabric Atomic @@ -194,7 +194,7 @@ Panel Config: id: 1806 title: L2-Fabric Read Latency (Cycles) header: - metric: Metric + metric: Channel expr: Expression metric: "::_1": @@ -209,7 +209,7 @@ Panel Config: id: 1807 title: L2-Fabric Write and Atomic Latency (Cycles) header: - metric: Metric + metric: Channel expr: Expression metric: "::_1": @@ -224,7 +224,7 @@ Panel Config: id: 1808 title: L2-Fabric Atomic Latency (Cycles per normUnit) header: - metric: Metric + metric: Channel expr: Expression metric: "::_1": @@ -238,15 +238,15 @@ Panel Config: id: 1809 title: L2-Fabric Read Stall (Cycles per normUnit) header: - metric: Metric - ea read stall - io: L2-Fabric Read Stall - IO - ea read stall - gmi: L2-Fabric Read Stall - GMI - ea read stall - dram: L2-Fabric Read Stall - DRAM + metric: Channel + ea read stall - pcie: L2-Fabric Read Stall (PCIe) + ea read stall - if: L2-Fabric Read Stall (Infinity Fabric™) + ea read stall - hbm: L2-Fabric Read Stall (HBM) metric: "::_1": - ea read stall - io: None # Missing perfmon - ea read stall - gmi: None # Missing perfmon - ea read stall - dram: None # Missing perfmon + ea read stall - pcie: None # Missing perfmon + ea read stall - if: None # Missing perfmon + ea read stall - hbm: None # Missing perfmon placeholder_range: "::_1": $total_l2_chan cli_style: simple_multiple_bar @@ -255,17 +255,17 @@ Panel Config: id: 1810 title: L2-Fabric Write and Atomic Stall (Cycles per normUnit) header: - metric: Metric - ea write stall - io: L2-Fabric Write Stall - IO - ea write stall - gmi: L2-Fabric Write Stall - GMI - ea write stall - dram: L2-Fabric Write Stall - DRAM - ea write stall - starve: L2-Fabric Write Stall - Starve + metric: Channel + ea write stall - pcie: L2-Fabric Write Stall (PCIe) + ea write stall - gmi: L2-Fabric Write Stall (Infinity Fabric™) + ea write stall - dram: L2-Fabric Write Stall (HBM) + ea write stall - starve: L2-Fabric Write Starve metric: "::_1": - ea write stall - io: None # Missing perfmon - ea write stall - gmi: None # Missing perfmon - ea write stall - dram: None # Missing perfmon - ea write stall - starve: None # Missing perfmon + ea write stall - pcie: None # Missing perfmon + ea write stall - if: None # Missing perfmon + ea write stall - hbm: None # Missing perfmon + ea write stall - starve: AVG((TO_INT(TCC_TOO_MANY_EA_WRREQS_STALL[::_1]) / $denom)) placeholder_range: "::_1": $total_l2_chan cli_style: simple_multiple_bar @@ -287,7 +287,7 @@ Panel Config: id: 1812 title: L2-Fabric (128B read requests per normUnit) header: - metric: Metric + metric: Channel expr: Expression metric: "::_1": diff --git a/projects/rocprofiler-compute/src/utils/parser.py b/projects/rocprofiler-compute/src/utils/parser.py index 98885cd7c0..27742740f1 100644 --- a/projects/rocprofiler-compute/src/utils/parser.py +++ b/projects/rocprofiler-compute/src/utils/parser.py @@ -497,7 +497,7 @@ def build_dfs(archConfigs, filter_metrics, sys_info): "cli_style" in data_config and data_config["cli_style"] == "simple_box" ): - headers.append("Metric") + headers.append(data_config["header"]["metric"]) for k in simple_box.keys(): headers.append(k) @@ -855,29 +855,36 @@ def apply_filters(workload, dir, is_gui, debug): # We pick up kernel names from kerne ids first. # Then filter valid entries with kernel names. if workload.filter_kernel_ids: - # Verify valid kernel filter - kernels_df = pd.read_csv(os.path.join(dir, "pmc_kernel_top.csv")) - for kernel_id in workload.filter_kernel_ids: - if kernel_id >= len(kernels_df["Kernel_Name"]): - error( - "{} is an invalid kernel id. Please enter an id between 0-{}".format( - kernel_id, len(kernels_df["Kernel_Name"]) - 1 + if type(workload.filter_kernel_ids) == int: + # Verify valid kernel filter + kernels_df = pd.read_csv(os.path.join(dir, "pmc_kernel_top.csv")) + for kernel_id in workload.filter_kernel_ids: + if kernel_id >= len(kernels_df["Kernel_Name"]): + error( + "{} is an invalid kernel id. Please enter an id between 0-{}".format( + kernel_id, len(kernels_df["Kernel_Name"]) - 1 + ) ) - ) - kernels = [] - # NB: mark selected kernels with "*" - # Todo: fix it for unaligned comparison - kernel_top_df = workload.dfs[pmc_kernel_top_table_id] - kernel_top_df["S"] = "" - for kernel_id in workload.filter_kernel_ids: - # print("------- ", kernel_id) - kernels.append(kernel_top_df.loc[kernel_id, "Kernel_Name"]) - kernel_top_df.loc[kernel_id, "S"] = "*" + kernels = [] + # NB: mark selected kernels with "*" + # Todo: fix it for unaligned comparison + kernel_top_df = workload.dfs[pmc_kernel_top_table_id] + kernel_top_df["S"] = "" + for kernel_id in workload.filter_kernel_ids: + # print("------- ", kernel_id) + kernels.append(kernel_top_df.loc[kernel_id, "Kernel_Name"]) + kernel_top_df.loc[kernel_id, "S"] = "*" - if kernels: - # print("fitlered df:", len(df.index)) + if kernels: + # print("fitlered df:", len(df.index)) + ret_df = ret_df.loc[ + ret_df[schema.pmc_perf_file_prefix]["Kernel_Name"].isin(kernels) + ] + elif type(workload.filter_kernel_ids) == str: ret_df = ret_df.loc[ - ret_df[schema.pmc_perf_file_prefix]["Kernel_Name"].isin(kernels) + ret_df[schema.pmc_perf_file_prefix]["Kernel_Name"].isin( + workload.filter_kernel_ids + ) ] if workload.filter_dispatch_ids: diff --git a/projects/rocprofiler-compute/src/utils/schema.py b/projects/rocprofiler-compute/src/utils/schema.py index 08d02d3ed1..e8bbfed528 100644 --- a/projects/rocprofiler-compute/src/utils/schema.py +++ b/projects/rocprofiler-compute/src/utils/schema.py @@ -101,19 +101,19 @@ supported_field = [ "L2 Read Req", "L2 Write Req", "L2 Atomic Req", - "L2 - Fabric Read Req", - "L2 - Fabric Write and Atomic Req", - "L2 - Fabric Atomic Req", - "L2 - Fabric Read Latency", - "L2 - Fabric Write Latency", - "L2 - Fabric Atomic Latency", - "L2 - Fabric Read Stall (PCIe)", - "L2 - Fabric Read Stall (Infinity Fabric™)", - "L2 - Fabric Read Stall (HBM)", - "L2 - Fabric Write Stall (PCIe)", - "L2 - Fabric Write Stall (Infinity Fabric™)", - "L2 - Fabric Write Stall (HBM)", - "L2 - Fabric Write Starve", + "L2-Fabric Read Req", + "L2-Fabric Write and Atomic Req", + "L2-Fabric Atomic Req", + "L2-Fabric Read Latency", + "L2-Fabric Write Latency", + "L2-Fabric Atomic Latency", + "L2-Fabric Read Stall (PCIe)", + "L2-Fabric Read Stall (Infinity Fabric™)", + "L2-Fabric Read Stall (HBM)", + "L2-Fabric Write Stall (PCIe)", + "L2-Fabric Write Stall (Infinity Fabric™)", + "L2-Fabric Write Stall (HBM)", + "L2-Fabric Write Starve", ] # The prefix of raw pmc_perf.csv diff --git a/projects/rocprofiler-compute/src/utils/specs.py b/projects/rocprofiler-compute/src/utils/specs.py index 7beb457e86..7f17794f89 100644 --- a/projects/rocprofiler-compute/src/utils/specs.py +++ b/projects/rocprofiler-compute/src/utils/specs.py @@ -255,16 +255,11 @@ def get_rocm_ver(): error("Unable to detect a complete local ROCm installation.\nThe expected %s/.info/ versioning directory is missing. Please ensure you have valid ROCm installation." % _rocm_path) return rocm_ver -<<<<<<< HEAD -def run(cmd, exit_on_error=False): - p = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) -======= def run(cmd,exit_on_error=False): try: p = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) except FileNotFoundError as e: error(f"Unable to parse specs. Can't find ROCm asset: {e.filename}\nTry passing a path to an existing workload results in 'analyze' mode.") ->>>>>>> 2d92bcf (Enhance correct_sys_info() func and err checking) if exit_on_error: if cmd[0] == "rocm-smi":