Skip to content

Commit

Permalink
ws changes to trigger ci tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Varun Sundar Rabindranath committed Jul 17, 2024
1 parent a178ce1 commit fb111f9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/kernels/quant_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ def ref_dynamic_per_token_quant(x: torch.tensor,
qtype_max = as_float32_tensor(qtype_traits.max)

# For fp8, in order to match the cuda kernel output, we have to do exactly
# the same operations as in the corresponding fp8 kernel to prevent rounding
# errors.
# the same operations as in the corresponding fp8 kernel to prevent
# rounding errors.

# Compute scales
x_token_max, _ = x.abs().max(dim=-1)
Expand Down Expand Up @@ -45,8 +45,8 @@ def ref_dynamic_per_tensor_fp8_quant(x: torch.tensor) \
one = as_float32_tensor(1.0)

# For fp8, in order to match the cuda kernel output, we have to do exactly
# the same operations as in the corresponding fp8 kernel to prevent rounding
# errors.
# the same operations as in the corresponding fp8 kernel to prevent
# rounding errors.

x_max = as_float32_tensor(x.abs().max())
ref_scale = x_max / fp8_max
Expand Down

0 comments on commit fb111f9

Please sign in to comment.