Skip to content

Commit 9e70800

Browse files
committed
fix contiguous
Signed-off-by: jiqing-feng <jiqing.feng@intel.com>
1 parent b6bfbeb commit 9e70800

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • bitsandbytes/backends/triton

bitsandbytes/backends/triton/ops.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def quantize_blockwise(A: torch.Tensor, code: torch.Tensor, blocksize: int) -> t
1818
torch._check_is_size(blocksize)
1919
# torch._check(A.dtype == torch.float32, lambda: f"A must be float32 on xpu, got {A.dtype}")
2020
with torch_accelerator_module.device(A.device):
21-
out, absmax = kernels_8bit_quant.quantize_blockwise_triton(A, code, blocksize)
21+
out, absmax = kernels_8bit_quant.quantize_blockwise_triton(A.contiguous(), code, blocksize)
2222
return out, absmax.float()
2323

2424

@@ -30,7 +30,7 @@ def dequantize_blockwise(
3030
# torch._check(dtype == torch.float32, lambda: f"dtype must be float32 on xpu, got {dtype}")
3131
with torch_accelerator_module.device(A.device):
3232
out = kernels_8bit_quant.dequant_8bit_blockwise(
33-
A,
33+
A.contiguous(),
3434
absmax,
3535
code,
3636
blocksize,

0 commit comments

Comments
 (0)