Skip to content

Commit

Permalink
typo fix
Browse files Browse the repository at this point in the history
  • Loading branch information
LeiWang1999 committed Aug 5, 2024
1 parent af16059 commit ac316fd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion integration/pytorch/bitblas_quant_linear.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def pack(self, linear, scales, zeros=None):
(w[:, idx] + scale_zeros[:, g_idx]) / scales[:, g_idx]).to(torch.int)[:, None])
intweight = torch.cat(intweight, dim=1)
intweight = intweight.contiguous()
intweight = intweight.cpu().astype(np.int8)
intweight = intweight.cpu().to(torch.int8)
# quantize to 4bit
qw_np = general_compress(intweight, source_bits=self.bits, storage_dtype=np.int8)
# do interleave for fast type conversion
Expand Down
2 changes: 1 addition & 1 deletion testing/python/module/test_bitblas_linear.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def correctness_weight_only_dequantize(
inputs.append(torch.rand(output_shape, dtype=torch.float16).cuda())

intweight = inputs[1]
intweight = intweight.cpu().astype(np.int8)
intweight = intweight.cpu().to(torch.int8)
if source_format == "int":
intweight = intweight + maxq
if with_zeros:
Expand Down
2 changes: 1 addition & 1 deletion testing/python/operators/test_general_matmul_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def matmul_torch_forward(M, N, K, A_dtype, W_dtype, accum_dtype, out_dtype, layo
inputs.append(torch.rand(output_shape, dtype=torch.float16).cuda())

intweight = inputs[1]
intweight = intweight.cpu().astype(np.int8)
intweight = intweight.cpu().to(torch.int8)
if source_format == "int":
intweight = intweight + maxq
if with_zeros:
Expand Down

0 comments on commit ac316fd

Please sign in to comment.