Skip to content

Commit

Permalink
fix precommit
Browse files Browse the repository at this point in the history
  • Loading branch information
oelayan7 committed Jan 16, 2025
1 parent e623838 commit 74d7c5d
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions tests/unit/ops/fp_quantizer/test_fp_quant.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,7 @@ def test_fp_quant_meta(dtype):
x_quantized, meta_tensor = fpq.quantize(ds_x, q_bits=q_bits, return_meta_tensor=True)
x_dequantized = fpq.dequantize(x_quantized, q_bits=q_bits, scale=meta_tensor)

qtorch_out = qtorch_quantize(x,
exp_bits=exp_bits,
man_bits=man_bits,
group_size=group_size)
qtorch_out = qtorch_quantize(x, exp_bits=exp_bits, man_bits=man_bits, group_size=group_size)
qtorch_error = (qtorch_out - x).abs().sum() / x.numel()
ds_error = (x_dequantized - x).abs().sum() / x.numel()

Expand Down Expand Up @@ -129,10 +126,7 @@ def test_fp_quant(dtype, q_bits):
else:
raise ValueError(f"unknown {q_bits=}")

qtorch_out = qtorch_quantize(x,
exp_bits=exp_bits,
man_bits=man_bits,
group_size=quant_config.group_size)
qtorch_out = qtorch_quantize(x, exp_bits=exp_bits, man_bits=man_bits, group_size=quant_config.group_size)

qtorch_error = (qtorch_out - x).abs().sum() / x.numel()
ds_error = (x_dequantized - x).abs().sum() / x.numel()
Expand Down

0 comments on commit 74d7c5d

Please sign in to comment.