diff --git a/src/omniperf_analyze/analysis_webui.py b/src/omniperf_analyze/analysis_webui.py index 68ee3e089..54645cbbb 100644 --- a/src/omniperf_analyze/analysis_webui.py +++ b/src/omniperf_analyze/analysis_webui.py @@ -102,6 +102,7 @@ def generate_from_filter( console_debug("analysis", "gui normalization is %s" % norm_filt) base_data = self.initalize_runs() # Re-initalizes everything + hbm_bw = base_data[base_run].sys_info["hbm_bw"][0] panel_configs = copy.deepcopy(arch_configs.panel_configs) # Generate original raw df base_data[base_run].raw_pmc = file_io.create_df_pmc( @@ -213,6 +214,7 @@ def generate_from_filter( norm_filt=norm_filt, comparable_columns=comparable_columns, decimal=self.get_args().decimal, + hbm_bw=base_data[base_run].sys_info["hbm_bw"][0], ) # Update content for this section @@ -309,7 +311,6 @@ def run_analysis(self): input_filters, self._arch_configs[self.arch], ) - # Here I expect that self._runs[].raw_pmc will no longer be populated if args.random_port: self.app.run_server( debug=False, host="0.0.0.0", port=random.randint(1024, 49151) @@ -327,6 +328,7 @@ def determine_chart_type( norm_filt, comparable_columns, decimal, + hbm_bw, ): content = [] @@ -340,7 +342,9 @@ def determine_chart_type( # Determine chart type: # a) Barchart if table_config["id"] in [x for i in barchart_elements.values() for x in i]: - d_figs = build_bar_chart(display_df, table_config, barchart_elements, norm_filt) + d_figs = build_bar_chart( + display_df, table_config, barchart_elements, norm_filt, hbm_bw + ) # Smaller formatting if barchart yeilds several graphs if ( len(d_figs) diff --git a/src/utils/gui.py b/src/utils/gui.py index df0a0f6dd..b765cb8cd 100644 --- a/src/utils/gui.py +++ b/src/utils/gui.py @@ -121,7 +121,7 @@ def discrete_background_color_bins(df, n_bins=5, columns="all"): #################### # GRAPHICAL ELEMENTS #################### -def build_bar_chart(display_df, table_config, barchart_elements, norm_filt): +def build_bar_chart(display_df, table_config, barchart_elements, norm_filt, hbm_bw): """ Read data into a bar chart. ID will determine which subtype of barchart. """ @@ -221,20 +221,17 @@ def build_bar_chart(display_df, table_config, barchart_elements, norm_filt): x="Avg", y="Metric", color="Avg", - range_color=[0, 1638], + range_color=[0, hbm_bw], labels={"Avg": "GB/s"}, height=220, orientation="h", - ).update_xaxes(range=[0, 1638]) + ).update_xaxes(range=[0, hbm_bw]) ) # append second GB/s chart else: - key = "Avg" - if table_config["id"] in [1101]: - key = "Pct of Peak" d_figs.append( px.bar( display_df, - x=key, + x="Avg", y="Metric", color="Avg", range_color=[0, 100],