From 1c237c1382517e63eec24a9c78ee6d7133dd0aba Mon Sep 17 00:00:00 2001 From: cfallows-amd Date: Fri, 14 Mar 2025 12:37:19 -0400 Subject: [PATCH] Debug logging during intensities calculations when no flops recorded (#608) Added debug log for when no flops are recorded (total_flops is 0), so AI points will not be plotted. Removed commented out print statement that is not functional- contains nonexistent method call. Signed-off-by: Carrie Fallows --- src/utils/roofline_calc.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/utils/roofline_calc.py b/src/utils/roofline_calc.py index 504d9c1fc9..1c99ac6247 100644 --- a/src/utils/roofline_calc.py +++ b/src/utils/roofline_calc.py @@ -447,13 +447,19 @@ def calc_ai(mspec, sort_type, ret_df): myList.sort(key=lambda x: x.totalDuration, reverse=True) - # print("Top 5 intensities ('{}')...".format(roof_details["sort"])) intensities = {"ai_l1": [], "ai_l2": [], "ai_hbm": []} curr_perf = [] kernelNames = [] i = 0 # Create list of top 5 intensities while i < TOP_N and i != len(myList): + if myList[i].total_flops == 0: + console_debug( + "No flops counted for {}, arithmetic intensities will not display on plots.".format( + myList[i].KernelName + ) + ) + kernelNames.append(myList[i].KernelName) ( intensities["ai_l1"].append(myList[i].total_flops / myList[i].L1cache_data)