From a984ddc9b9df2473c368e667d5da117aac130922 Mon Sep 17 00:00:00 2001 From: coleramos425 Date: Fri, 1 Mar 2024 13:53:12 -0600 Subject: [PATCH] More formatting! Signed-off-by: coleramos425 [ROCm/rocprofiler-compute commit: eaf701abf0c00c97a53f9a766bbc3a1a72fd34c2] --- .../src/utils/roofline_calc.py | 58 +++++++++++++++---- 1 file changed, 46 insertions(+), 12 deletions(-) diff --git a/projects/rocprofiler-compute/src/utils/roofline_calc.py b/projects/rocprofiler-compute/src/utils/roofline_calc.py index cadf0db08c..1998b11f80 100644 --- a/projects/rocprofiler-compute/src/utils/roofline_calc.py +++ b/projects/rocprofiler-compute/src/utils/roofline_calc.py @@ -195,11 +195,21 @@ def calc_ai(sort_type, ret_df): df = df.sort_values(by=["Kernel_Name"]) df = df.reset_index(drop=True) - total_flops = valu_flops = mfma_flops_bf16 = mfma_flops_f16 = mfma_iops_i8 = ( + total_flops = ( + valu_flops + ) = ( + mfma_flops_bf16 + ) = ( + mfma_flops_f16 + ) = ( + mfma_iops_i8 + ) = ( mfma_flops_f32 - ) = mfma_flops_f64 = lds_data = L1cache_data = L2cache_data = hbm_data = calls = ( - totalDuration - ) = avgDuration = 0.0 + ) = ( + mfma_flops_f64 + ) = ( + lds_data + ) = L1cache_data = L2cache_data = hbm_data = calls = totalDuration = avgDuration = 0.0 kernelName = "" @@ -380,11 +390,23 @@ def calc_ai(sort_type, ret_df): kernelName, idx, calls ) ) - total_flops = valu_flops = mfma_flops_bf16 = mfma_flops_f16 = mfma_iops_i8 = ( + total_flops = ( + valu_flops + ) = ( + mfma_flops_bf16 + ) = ( + mfma_flops_f16 + ) = ( + mfma_iops_i8 + ) = ( mfma_flops_f32 - ) = mfma_flops_f64 = lds_data = L1cache_data = L2cache_data = hbm_data = ( - calls - ) = totalDuration = avgDuration = 0.0 + ) = ( + mfma_flops_f64 + ) = ( + lds_data + ) = ( + L1cache_data + ) = L2cache_data = hbm_data = calls = totalDuration = avgDuration = 0.0 if sort_type == "dispatches": myList.append( @@ -406,11 +428,23 @@ def calc_ai(sort_type, ret_df): avgDuration, ) ) - total_flops = valu_flops = mfma_flops_bf16 = mfma_flops_f16 = mfma_iops_i8 = ( + total_flops = ( + valu_flops + ) = ( + mfma_flops_bf16 + ) = ( + mfma_flops_f16 + ) = ( + mfma_iops_i8 + ) = ( mfma_flops_f32 - ) = mfma_flops_f64 = lds_data = L1cache_data = L2cache_data = hbm_data = ( - calls - ) = totalDuration = avgDuration = 0.0 + ) = ( + mfma_flops_f64 + ) = ( + lds_data + ) = ( + L1cache_data + ) = L2cache_data = hbm_data = calls = totalDuration = avgDuration = 0.0 myList.sort(key=lambda x: x.totalDuration, reverse=True)