Skip to content

Commit

Permalink
Add warning when using activation mixed precision (#1182)
Browse files Browse the repository at this point in the history
* Add warning when using activation mixed precision
  • Loading branch information
lapid92 authored Aug 21, 2024
1 parent 0b64802 commit 8834847
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions model_compression_toolkit/core/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,12 @@ def core_runner(in_model: Any,
f'Mixed Precision has overwrite bit-width configuration{core_config.mixed_precision_config.configuration_overwrite}')
bit_widths_config = core_config.mixed_precision_config.configuration_overwrite

if (target_resource_utilization.activation_memory < np.inf or
target_resource_utilization.total_memory < np.inf):
Logger.warning(
f"Running mixed precision for activation compression, please note this feature is experimental and is "
f"subject to future changes. If you encounter an issue, please open an issue in our GitHub "
f"project https://github.com/sony/model_optimization")
else:
bit_widths_config = []

Expand Down

0 comments on commit 8834847

Please sign in to comment.