Skip to content

Commit

Permalink
Fix rebase changes
Browse files Browse the repository at this point in the history
  • Loading branch information
liord committed Mar 14, 2024
1 parent 59464fc commit 40a7ff6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,5 +125,5 @@ def pytorch_post_training_quantization(in_module: Module,
# If torch is not installed,
# we raise an exception when trying to use these functions.
def pytorch_post_training_quantization(*args, **kwargs):
Logger.critical('PyTorch must be installed to use pytorch_post_training_quantization_experimental. '
Logger.critical('PyTorch must be installed to use pytorch_post_training_quantization. '
"The 'torch' package is missing.") # pragma: no cover
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@ def get_trainable_quantizer_quantization_candidates(n: BaseNode, attr: str = Non
"""

if attr is not None:
# all candidates must have the same weights quantization method
weights_quantization_methods = set([cfg.weights_quantization_cfg.weights_quantization_method for cfg in n.candidates_quantization_cfg])
if len(weights_quantization_methods) > 1:
Logger.critical(f"Invalid 'candidates_quantization_cfg': Inconsistent weights "
f"quantization methods detected: {weights_quantization_methods}. "
f"Trainable quantizer requires all candidates to have the same weights "
f"quantization method.") # pragma: no cover
# all candidates must have the same weights quantization method
weights_quantization_methods = set([cfg.weights_quantization_cfg.weights_quantization_method for cfg in n.candidates_quantization_cfg])
if len(weights_quantization_methods) > 1:
Logger.critical(f"Invalid 'candidates_quantization_cfg': Inconsistent weights "
f"quantization methods detected: {weights_quantization_methods}. "
f"Trainable quantizer requires all candidates to have the same weights "
f"quantization method.") # pragma: no cover

# all candidates must have the same activation quantization method
activation_quantization_methods = set([cfg.activation_quantization_cfg.activation_quantization_method
Expand Down

0 comments on commit 40a7ff6

Please sign in to comment.