Skip to content

Commit

Permalink
Initiate MP if any target resource utilization other than weights is …
Browse files Browse the repository at this point in the history
…requested.
  • Loading branch information
elad-c committed Jan 20, 2025
1 parent a6dc23b commit fca1011
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ def requires_mixed_precision(in_model: Any,
Returns: A boolean indicating if mixed precision is needed.
"""
# Any target resource utilization other than weights will always require MP calculation.
if target_resource_utilization.activation_restricted() or \
target_resource_utilization.total_mem_restricted() or \
target_resource_utilization.bops_restricted():
return True

core_config = _create_core_config_for_ru(core_config)

transformed_graph = graph_preparation_runner(in_model,
Expand Down

0 comments on commit fca1011

Please sign in to comment.