Enable the revamped Top Stats section in standalone GUI

Signed-off-by: colramos-amd <colramos@amd.com>


[ROCm/rocprofiler-compute commit: bd83f68412]
Этот коммит содержится в:
colramos-amd
2024-02-13 19:18:31 -06:00
родитель 85c4cec42e
Коммит 96786667ad
3 изменённых файлов: 70 добавлений и 45 удалений
+8 -8
Просмотреть файл
@@ -45,7 +45,7 @@ class webui_analysis(OmniAnalyze_Base):
self.dest_dir = os.path.abspath(args.path[0][0])
self.arch = None
self.__hidden_sections = ["Memory Chart", "Kernels", "Roofline"]
self.__hidden_sections = ["Memory Chart", "Roofline"]
self.__hidden_columns = ["Tips", "coll_level"]
# define different types of bar charts
self.__barchart_elements = {
@@ -126,19 +126,19 @@ class webui_analysis(OmniAnalyze_Base):
filter_gpu_ids=base_data[base_run].filter_gpu_ids,
filter_dispatch_ids=base_data[base_run].filter_dispatch_ids,
time_unit=self.get_args().time_unit,
max_kernel_num=base_data[base_run].filter_top_n,
max_stat_num=base_data[base_run].filter_top_n,
)
# Only display basic metrics if no filters are applied
if not (disp_filt or kernel_filter or gcd_filter):
temp = {}
keep = [1, 201, 101, 301]
keep = [1, 2, 101, 201, 301, 401]
for key in base_data[base_run].dfs:
if keep.count(key) != 0:
temp[key] = base_data[base_run].dfs[key]
base_data[base_run].dfs = temp
temp = {}
keep = [0, 100, 200, 300]
keep = [0, 100, 200, 300, 400]
for key in panel_configs:
if keep.count(key) != 0:
temp[key] = panel_configs[key]
@@ -159,7 +159,7 @@ class webui_analysis(OmniAnalyze_Base):
# Append memory chart and roofline
div_children.append(
get_memchart(panel_configs[300]["data source"], base_data[base_run])
get_memchart(panel_configs[400]["data source"], base_data[base_run])
)
has_roofline = os.path.isfile(os.path.join(self.dest_dir, "roofline.csv"))
if has_roofline and hasattr(self.get_socs()[self.arch], "roofline_obj"):
@@ -273,7 +273,7 @@ class webui_analysis(OmniAnalyze_Base):
filter_gpu_ids=self._runs[self.dest_dir].filter_gpu_ids,
filter_dispatch_ids=self._runs[self.dest_dir].filter_dispatch_ids,
time_unit=args.time_unit,
max_kernel_num=args.max_kernel_num,
max_stat_num=args.max_stat_num,
)
# create 'mega dataframe'
self._runs[self.dest_dir].raw_pmc = file_io.create_df_pmc(
@@ -299,7 +299,7 @@ class webui_analysis(OmniAnalyze_Base):
"gpu": self._runs[self.dest_dir].filter_gpu_ids,
"dispatch": self._runs[self.dest_dir].filter_dispatch_ids,
"normalization": args.normal_unit,
"top_n": args.max_kernel_num,
"top_n": args.max_stat_num,
}
self.build_layout(
@@ -340,7 +340,7 @@ def determine_chart_type(
# Smaller formatting if barchart yeilds several graphs
if (
len(d_figs) > 2
and not table_config["id"]
# and not table_config["id"]
# in barchart_elements["l2_cache_per_chan"]
):
temp_obj = []
+40 -19
Просмотреть файл
@@ -5,22 +5,10 @@
* license: https://www.styleshout.com/template-license/
* 03-18-2014
=====================================================================
TOC:
a. General Styles
b. Header Styles
c. About Section
d. Resume Section
e. Portfolio Section
f. Call To Action Section
g. Testimonials Section
h. Contact Section
i. Footer
===================================================================== */
*/
/* ------------------------------------------------------------------ */
/* a. General Styles
/* General Styles
/* ------------------------------------------------------------------ */
body { background: #0f0f0f; }
@@ -44,7 +32,7 @@ html {
}
/* ------------------------------------------------------------------ */
/* b. Header Styles
/* Header Styles
/* ------------------------------------------------------------------ */
header {
@@ -421,17 +409,27 @@ button.report:hover {
}
/* ------------------------------------------------------------------ */
/* Top Stat Section
/* Top Stats
/* ------------------------------------------------------------------ */
#top_stat {
#top_stats {
background: #2B2B2B;
padding-top: 96px;
padding-bottom: 66px;
overflow: hidden;
}
#top_stat a, #top_stat a:visited { color: #fff; }
#top_stat a:hover, #top_stat a:focus { color: #11ABB0; }
#top_stats .dash-table-container {
max-height: 500px;
overflow-y: scroll;
}
#top_stats th {
position: sticky;
top: 0;
}
#top_stats a, #top_stats a:visited { color: #fff; }
#top_stats a:hover, #top_stats a:focus { color: #11ABB0; }
/* ------------------------------------------------------------------ */
/* System Info Section
@@ -446,6 +444,29 @@ button.report:hover {
#system_info a, #system_info a:visited { color: #fff; }
#system_info a:hover, #system_info a:focus { color: #11ABB0; }
/* ------------------------------------------------------------------ */
/* Dispatch List Section
/* ------------------------------------------------------------------ */
#dispatch_list {
background: #2B2B2B;
padding-top: 96px;
padding-bottom: 66px;
overflow: hidden;
}
#dispatch_list .dash-table-container {
max-height: 500px;
overflow-y: scroll;
}
#dispatch_list th {
position: sticky;
top: 0;
}
#dispatch_list a, #dispatch_list a:visited { color: #fff; }
#dispatch_list a:hover, #dispatch_list a:focus { color: #11ABB0; }
/* ------------------------------------------------------------------ */
/* System Speed-of-Light Section
/* ------------------------------------------------------------------ */
+22 -18
Просмотреть файл
@@ -40,13 +40,22 @@ def list_unique(orig_list, is_numeric):
def create_span(input):
elmt = {}
elmt["label"] = (html.Span(str(input), title=str(input)),)
elmt["value"] = str(input)
return elmt
return {
"label": html.Span(str(input), title=str(input)),
"value": str(input)
}
def get_header(raw_pmc, input_filters, kernel_names):
kernel_names = list(
map(
str,
raw_pmc[
schema.pmc_perf_file_prefix
]["Kernel_Name"],
)
)
kernel_names = [x.strip() for x in kernel_names]
return html.Header(
id="home",
children=[
@@ -68,8 +77,8 @@ def get_header(raw_pmc, input_filters, kernel_names):
external_link=True,
),
dbc.DropdownMenuItem(
"Top Stat",
href="#top_stat",
"Top Stats",
href="#top_stats",
external_link=True,
),
dbc.DropdownMenuItem(
@@ -125,8 +134,8 @@ def get_header(raw_pmc, input_filters, kernel_names):
external_link=True,
),
dbc.DropdownMenuItem(
"Texture Addresser & Texture Data (TA/TD)",
href="#texture_addresser_and_texture_data_tatd",
"Address Processing Unit and Data Return Path (TA/TD)",
href="#address_processing_unit_and_data_return_path_tatd",
external_link=True,
),
dbc.DropdownMenuItem(
@@ -270,21 +279,16 @@ def get_header(raw_pmc, input_filters, kernel_names):
map(
create_span,
list_unique(
list(
map(
str,
raw_pmc[
schema.pmc_perf_file_prefix
]["Kernel_Name"],
)
),
False,
orig_list=kernel_names,
is_numeric=False,
), # list avail kernel names
)
),
id="kernel-filt",
multi=True,
value=kernel_names,
value=input_filters[
"kernel"
],
optionHeight=150,
placeholder="ALL",
style={