From 1772b6ead27a3218c9c2c9ad88bd4e94623fb74c Mon Sep 17 00:00:00 2001 From: Tejas Ramesh <63494847+tejas3070@users.noreply.github.com> Date: Thu, 28 Mar 2024 12:22:46 -0400 Subject: [PATCH] [DEV] Fixed Indentation issue in the Analyzer (#23) Co-authored-by: Tejas Ramesh --- triton_viz/analysis.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/triton_viz/analysis.py b/triton_viz/analysis.py index 79cbfb4..33b13db 100644 --- a/triton_viz/analysis.py +++ b/triton_viz/analysis.py @@ -31,16 +31,17 @@ def analyze_records(): mask_false = np.count_nonzero(np.logical_not(record.access_masks)) total_store_bytes_true += mask_true * element_size total_store_bytes_attempted += (mask_true + mask_false) * element_size - overall_load_ratio = ( - total_load_bytes_true / total_load_bytes_attempted - if total_load_bytes_attempted > 0 - else 0 - ) - overall_store_ratio = ( - total_store_bytes_true / total_store_bytes_attempted - if total_store_bytes_attempted > 0 - else 0 - ) + + overall_load_ratio = ( + total_load_bytes_true / total_load_bytes_attempted + if total_load_bytes_attempted > 0 + else 0 + ) + overall_store_ratio = ( + total_store_bytes_true / total_store_bytes_attempted + if total_store_bytes_attempted > 0 + else 0 + ) data = [["Grid Size", tuple(grid_size)]] data += [[op_type, count] for op_type, count in op_type_counts.items()] data.append(["Masked Load Ratio", overall_load_ratio])