diff --git a/src/omniperf_cli/utils/gui.py b/src/omniperf_cli/utils/gui.py index b3ac93dfbd..1c347e2088 100644 --- a/src/omniperf_cli/utils/gui.py +++ b/src/omniperf_cli/utils/gui.py @@ -320,10 +320,17 @@ def build_layout( app.layout.children = html.Div( children=[ - dbc.Spinner(children=[ - get_header(runs[path_to_dir].raw_pmc, input_filters, filt_kernel_names), - html.Div(id="container", children=[]), - ], fullscreen=True, color="primary", spinner_style={"width": "6rem", "height": "6rem"}) + dbc.Spinner( + children=[ + get_header( + runs[path_to_dir].raw_pmc, input_filters, filt_kernel_names + ), + html.Div(id="container", children=[]), + ], + fullscreen=True, + color="primary", + spinner_style={"width": "6rem", "height": "6rem"}, + ) ] ) @@ -338,10 +345,10 @@ def build_layout( runs[path_to_dir].dfs = copy.deepcopy(archConfigs.dfs) # reset the equations # Generate original raw df runs[path_to_dir].raw_pmc = file_io.create_df_pmc(path_to_dir) - if verbose: + if verbose >= 1: print("disp-filter is ", disp_filt) print("kernel-filter is ", kernel_filter) - print("gpu-filter is ", gcd_filter) + print("gpu-filter is ", gcd_filter, "\n") runs[path_to_dir].filter_kernel_ids = kernel_filter runs[path_to_dir].filter_gpu_ids = gcd_filter runs[path_to_dir].filter_dispatch_ids = disp_filt diff --git a/src/omniperf_cli/utils/gui_components/roofline.py b/src/omniperf_cli/utils/gui_components/roofline.py index ee68e15762..ec33d7b231 100644 --- a/src/omniperf_cli/utils/gui_components/roofline.py +++ b/src/omniperf_cli/utils/gui_components/roofline.py @@ -183,7 +183,7 @@ def get_roofline(path_to_dir, ret_df, verbose): # Generate roofline plots print("Path: ", path_to_dir) ai_data = roofline_calc.plot_application("kernels", ret_df, verbose) - if verbose: + if verbose >= 1: # print AI data for each mem level for i in ai_data: print(i, "->", ai_data[i]) diff --git a/src/omniperf_cli/utils/roofline_calc.py b/src/omniperf_cli/utils/roofline_calc.py index 93f6f6670f..1f49c7dde2 100644 --- a/src/omniperf_cli/utils/roofline_calc.py +++ b/src/omniperf_cli/utils/roofline_calc.py @@ -239,7 +239,7 @@ def plot_application(sortType, ret_df, verbose): avgDuration / calls, ) ) - if verbose: + if verbose >= 2: print( "Just added {} to AI_Data at index {}. # of calls: {}".format( kernelName, index, calls @@ -299,7 +299,7 @@ def plot_application(sortType, ret_df, verbose): + (row["SQ_INSTS_VALU_MFMA_MOPS_F64"] * 512) ) except KeyError: - if verbose: + if verbose >= 2: print("Skipped total_flops at index {}".format(index)) pass try: @@ -327,7 +327,7 @@ def plot_application(sortType, ret_df, verbose): ) ) except KeyError: - if verbose: + if verbose >= 2: print("Skipped valu_flops at index {}".format(index)) pass @@ -338,7 +338,7 @@ def plot_application(sortType, ret_df, verbose): mfma_flops_f64 += row["SQ_INSTS_VALU_MFMA_MOPS_F64"] * 512 mfma_iops_i8 += row["SQ_INSTS_VALU_MFMA_MOPS_I8"] * 512 except KeyError: - if verbose: + if verbose >= 2: print("Skipped mfma ops at index {}".format(index)) pass @@ -347,14 +347,14 @@ def plot_application(sortType, ret_df, verbose): (row["SQ_LDS_IDX_ACTIVE"] - row["SQ_LDS_BANK_CONFLICT"]) * 4 * L2_BANKS ) # L2_BANKS = 32 (since assuming mi200) except KeyError: - if verbose: + if verbose >= 2: print("Skipped lds_data at index {}".format(index)) pass try: L1cache_data += row["TCP_TOTAL_CACHE_ACCESSES_sum"] * 64 except KeyError: - if verbose: + if verbose >= 2: print("Skipped L1cache_data at index {}".format(index)) pass @@ -366,7 +366,7 @@ def plot_application(sortType, ret_df, verbose): + row["TCP_TCC_READ_REQ_sum"] * 64 ) except KeyError: - if verbose: + if verbose >= 2: print("Skipped L2cache_data at index {}".format(index)) pass try: @@ -377,7 +377,7 @@ def plot_application(sortType, ret_df, verbose): + ((row["TCC_EA_WRREQ_sum"] - row["TCC_EA_WRREQ_64B_sum"]) * 32) ) except KeyError: - if verbose: + if verbose >= 2: print("Skipped hbm_data at index {}".format(index)) pass diff --git a/src/parser.py b/src/parser.py index 6559e7dc0b..0d94e2b2e3 100644 --- a/src/parser.py +++ b/src/parser.py @@ -80,7 +80,7 @@ def parse(my_parser): "-v", "--version", action="version", version="%(PROG)s (" + VER + ")" ) general_group.add_argument( - "-V", "--verbose", help="Increase output verbosity", action="store_true" + "-V", "--verbose", help="Increase output verbosity", action="count", default=0 ) profile_group.add_argument( @@ -231,7 +231,7 @@ def parse(my_parser): "-v", "--version", action="version", version="%(PROG)s (" + VER + ")" ) general_group.add_argument( - "-V", "--verbose", help="Increase output verbosity", action="store_true" + "-V", "--verbose", help="Increase output verbosity", action="count", default=0 ) interaction_group.add_argument( @@ -331,7 +331,7 @@ def parse(my_parser): "-v", "--version", action="version", version="%(PROG)s (" + VER + ")" ) general_group.add_argument( - "-V", "--verbose", help="Increase output verbosity", action="store_true" + "-V", "--verbose", help="Increase output verbosity", action="count", default=0 ) analyze_group.add_argument( diff --git a/src/utils/plot_roofline.py b/src/utils/plot_roofline.py index 496c5bffae..d1d0958cc7 100644 --- a/src/utils/plot_roofline.py +++ b/src/utils/plot_roofline.py @@ -294,7 +294,7 @@ def plot_application(inputs, verbose): avgDuration / calls, ) ) - if verbose: + if verbose >= 2: print( "Just added {} to AI_Data at index {}. # of calls: {}".format( kernelName, index, calls @@ -354,7 +354,7 @@ def plot_application(inputs, verbose): + (row["SQ_INSTS_VALU_MFMA_MOPS_F64"] * 512) ) except KeyError: - if verbose: + if verbose >= 2: print("Skipped total_flops at index {}".format(index)) pass try: @@ -382,7 +382,7 @@ def plot_application(inputs, verbose): ) ) except KeyError: - if verbose: + if verbose >= 2: print("Skipped valu_flops at index {}".format(index)) pass @@ -393,7 +393,7 @@ def plot_application(inputs, verbose): mfma_flops_f64 += row["SQ_INSTS_VALU_MFMA_MOPS_F64"] * 512 mfma_iops_i8 += row["SQ_INSTS_VALU_MFMA_MOPS_I8"] * 512 except KeyError: - if verbose: + if verbose >= 2: print("Skipped mfma ops at index {}".format(index)) pass @@ -402,14 +402,14 @@ def plot_application(inputs, verbose): (row["SQ_LDS_IDX_ACTIVE"] - row["SQ_LDS_BANK_CONFLICT"]) * 4 * L2_BANKS ) # L2_BANKS = 32 (since assuming mi200) except KeyError: - if verbose: + if verbose >= 2: print("Skipped lds_data at index {}".format(index)) pass try: L1cache_data += row["TCP_TOTAL_CACHE_ACCESSES_sum"] * 64 except KeyError: - if verbose: + if verbose >= 2: print("Skipped L1cache_data at index {}".format(index)) pass @@ -421,7 +421,7 @@ def plot_application(inputs, verbose): + row["TCP_TCC_READ_REQ_sum"] * 64 ) except KeyError: - if verbose: + if verbose >= 2: print("Skipped L2cache_data at index {}".format(index)) pass try: @@ -432,7 +432,7 @@ def plot_application(inputs, verbose): + ((row["TCC_EA_WRREQ_sum"] - row["TCC_EA_WRREQ_64B_sum"]) * 32) ) except KeyError: - if verbose: + if verbose >= 2: print("Skipped hbm_data at index {}".format(index)) pass