Skip to content

Commit c6b714d

Browse files
committed
fix tests
Signed-off-by: jiqing-feng <[email protected]>
1 parent feb8ad2 commit c6b714d

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

bitsandbytes/autograd/_functions.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -378,11 +378,13 @@ def matmul_4bit(
378378
if A.device.type == "cpu":
379379
quant_state.dtype = A.dtype
380380

381-
if getattr(quant_state, "packing_format_for_cpu", False):
382-
out = F.gemv_4bit(A, B, out, state=quant_state)
383-
if bias is not None:
384-
out += bias
385-
return out
381+
if getattr(quant_state, "packing_format_for_cpu", False):
382+
out = F.gemv_4bit(A, B, out, state=quant_state)
383+
if bias is not None:
384+
out += bias
385+
return out
386+
else:
387+
return MatMul4Bit.apply(A, B, out, bias, quant_state)
386388

387389
if A.numel() == A.shape[-1] and A.requires_grad == False and A.device.type != "hpu":
388390
if A.shape[-1] % quant_state.blocksize != 0:

0 commit comments

Comments
 (0)