Skip to content

Commit

Permalink
use same instance of ru calculator in refine final config
Browse files Browse the repository at this point in the history
  • Loading branch information
irenaby committed Jan 7, 2025
1 parent e4babed commit a3073db
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -207,12 +207,10 @@ def compute_resource_utilization_for_config(self, config: List[int]) -> Resource
"""
act_qcs, w_qcs = self.ru_helper.get_configurable_qcs(config)
# TODO on graph or on orig graph???
ru_calc = ResourceUtilizationCalculator(self.graph, self.fw_impl, self.fw_info)
ru = ru_calc.compute_resource_utilization(target_criterion=TargetInclusionCriterion.AnyQuantized,
bitwidth_mode=BitwidthMode.MpCustom,
act_qcs=act_qcs,
w_qcs=w_qcs)
ru = self.ru_helper.ru_calculator.compute_resource_utilization(target_criterion=TargetInclusionCriterion.AnyQuantized,
bitwidth_mode=BitwidthMode.MpCustom,
act_qcs=act_qcs,
w_qcs=w_qcs)
return ru

def finalize_distance_metric(self, layer_to_metrics_mapping: Dict[int, Dict[int, float]]):
Expand Down

0 comments on commit a3073db

Please sign in to comment.