From 48911111be7b601eaed4e00c60c5b56577111a79 Mon Sep 17 00:00:00 2001 From: colramos-amd Date: Tue, 6 Feb 2024 16:08:00 -0600 Subject: [PATCH] Enable standalone GUI with new metric reordering Signed-off-by: colramos-amd --- src/omniperf_analyze/analysis_webui.py | 2 +- src/omniperf_analyze/assets/layout.css | 12 ++++++------ src/utils/gui.py | 24 ++++++++++++------------ src/utils/gui_components/header.py | 4 ++-- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/omniperf_analyze/analysis_webui.py b/src/omniperf_analyze/analysis_webui.py index f776f80580..0712532b4c 100644 --- a/src/omniperf_analyze/analysis_webui.py +++ b/src/omniperf_analyze/analysis_webui.py @@ -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"] + self.__hidden_sections = ["Memory Chart", "Kernels", "Roofline"] self.__hidden_columns = ["Tips", "coll_level"] # define different types of bar charts self.__barchart_elements = { diff --git a/src/omniperf_analyze/assets/layout.css b/src/omniperf_analyze/assets/layout.css index 7fdc373f60..3fb6d7c275 100644 --- a/src/omniperf_analyze/assets/layout.css +++ b/src/omniperf_analyze/assets/layout.css @@ -475,15 +475,15 @@ button.report:hover { /* ------------------------------------------------------------------ */ /* SPI Section /* ------------------------------------------------------------------ */ -#shader_processor_input_spi { +#workgroup_manager_spi { background: #2B2B2B; padding-top: 96px; padding-bottom: 66px; overflow: hidden; } -#shader_processor_input_spi a, #shader_processor_input_spi a:visited { color: #fff; } -#shader_processor_input_spi a:hover, #shader_processor_input_spi a:focus { color: #11ABB0; } +#workgroup_manager_spi a, #workgroup_manager_spi a:visited { color: #fff; } +#workgroup_manager_spi a:hover, #workgroup_manager_spi a:focus { color: #11ABB0; } /* ------------------------------------------------------------------ */ @@ -567,15 +567,15 @@ button.report:hover { /* ------------------------------------------------------------------ */ /* TA/TD Section /* ------------------------------------------------------------------ */ -#texture_addresser_and_texture_data_tatd { +#address_processing_unit_and_data_return_path_tatd { background: #2B2B2B; padding-top: 96px; padding-bottom: 66px; overflow: hidden; } -#texture_addresser_and_texture_data_tatd a, #texture_addresser_and_texture_data_tatd a:visited { color: #fff; } -#texture_addresser_and_texture_data_tatd a:hover, #texture_addresser_and_texture_data_tatd a:focus { color: #11ABB0; } +#address_processing_unit_and_data_return_path_tatd a, #address_processing_unit_and_data_return_path_tatd a:visited { color: #fff; } +#address_processing_unit_and_data_return_path_tatd a:hover, #address_processing_unit_and_data_return_path_tatd a:focus { color: #11ABB0; } /* ------------------------------------------------------------------ */ /* Vector L1D Section diff --git a/src/utils/gui.py b/src/utils/gui.py index 60d98cbf2d..d3e2b11c63 100644 --- a/src/utils/gui.py +++ b/src/utils/gui.py @@ -196,31 +196,31 @@ def build_bar_chart(display_df, table_config, barchart_elements, norm_filt): # Speed-of-light bar chart elif table_config["id"] in barchart_elements["sol"]: - display_df["Value"] = [ - x.astype(float) if x != "" else float(0) for x in display_df["Value"] + display_df["Avg"] = [ + x.astype(float) if x != "" else float(0) for x in display_df["Avg"] ] if table_config["id"] == 1701: # special layout for L2 Cache SOL d_figs.append( px.bar( display_df[display_df["Unit"] == "Pct"], - x="Value", + x="Avg", y="Metric", - color="Value", + color="Avg", range_color=[0, 100], - labels={"Value": "%"}, + labels={"Avg": "%"}, height=220, orientation="h", - ).update_xaxes(range=[0, 110], ticks="inside") + ).update_xaxes(range=[0, 110], ticks="inside", title="%") ) # append first % chart d_figs.append( px.bar( display_df[display_df["Unit"] == "Gb/s"], - x="Value", + x="Avg", y="Metric", - color="Value", + color="Avg", range_color=[0, 1638], - labels={"Value": "GB/s"}, + labels={"Avg": "GB/s"}, height=220, orientation="h", ).update_xaxes(range=[0, 1638]) @@ -229,11 +229,11 @@ def build_bar_chart(display_df, table_config, barchart_elements, norm_filt): d_figs.append( px.bar( display_df, - x="Value", + x="Avg", y="Metric", - color="Value", + color="Avg", range_color=[0, 100], - labels={"Value": "%"}, + labels={"Avg": "%"}, height=400, orientation="h", ).update_xaxes(range=[0, 110]) diff --git a/src/utils/gui_components/header.py b/src/utils/gui_components/header.py index 9c800930ac..be05b1e2f7 100644 --- a/src/utils/gui_components/header.py +++ b/src/utils/gui_components/header.py @@ -89,8 +89,8 @@ def get_header(raw_pmc, input_filters, kernel_names): external_link=True, ), dbc.DropdownMenuItem( - "Shader Processor Input (SPI)", - href="#shader_processor_input_spi", + "Workgroup Manager (SPI)", + href="#workgroup_manager_spi", external_link=True, ), dbc.DropdownMenuItem(