Skip to content

Commit 629af94

Browse files
committed
fix device error for xpu
Signed-off-by: jiqing-feng <[email protected]>
1 parent 5f78858 commit 629af94

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bitsandbytes/backends/cpu_xpu_common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ def quantize_4bit_impl(
365365

366366
if quant_type == "int8":
367367
out = out_uint8
368-
code = torch.Tensor(INT8_QUANT_TABLE, device=A.device)
368+
code = torch.Tensor(INT8_QUANT_TABLE).to(A.device)
369369
else:
370370
if out_uint8.size(-1) % 2:
371371
out_uint8 = torch.nn.functional.pad(out_uint8, (0, 1), value=0)

0 commit comments

Comments
 (0)