Enable verbosity level in GUI

Signed-off-by: colramos-amd <colramos@amd.com>
Dieser Commit ist enthalten in:
colramos-amd
2022-11-08 16:06:53 -06:00
Ursprung 1e2370209e
Commit f03d69ed33
5 geänderte Dateien mit 33 neuen und 26 gelöschten Zeilen
+13 -6
Datei anzeigen
@@ -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
@@ -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])
+8 -8
Datei anzeigen
@@ -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
+3 -3
Datei anzeigen
@@ -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(
+8 -8
Datei anzeigen
@@ -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