Skip to content

Commit

Permalink
Fix (brevitas_examples/generative): scaling_min_val for any dtype (#1117
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Giuseppe5 authored Dec 6, 2024
1 parent 85c1626 commit 0ea7bac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/brevitas_examples/common/generative/quantize.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def generate_quantizers(
if weight_group_dim is not None:
weight_quant = weight_quant.let(**{'group_dim': weight_group_dim})

if dtype != torch.float32:
if scaling_min_val is not None:
weight_quant = weight_quant.let(**{'scaling_min_val': scaling_min_val})
input_quant = input_quant.let(
**{'scaling_min_val': scaling_min_val}) if input_quant is not None else None
Expand Down

0 comments on commit 0ea7bac

Please sign in to comment.