Skip to content

Commit 9b7d307

Browse files
TimDettmersjustheuristic
authored andcommitted
review
1 parent cff3a71 commit 9b7d307

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bitsandbytes/autograd/_functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ def backward(ctx, grad_output):
381381
grad_A = F.mm_dequant(gradA32, SgradA32, SCgrad, state.SCBt).view(ctx.grad_shape).to(ctx.dtype_A)
382382

383383
elif state.CB is not None:
384-
CB = state.CB.to(ctx.dtype_A, copy=True).mul_(state.SCB.unsqueeze(1).div(127.0))
384+
CB = state.CB.to(ctx.dtype_A, copy=True).mul_(state.SCB.unsqueeze(1).mul(1. / 127.0))
385385
grad_A = torch.matmul(grad_output, CB).view(ctx.grad_shape).to(ctx.dtype_A)
386386
else:
387387
raise Exception('State must contain either CBt or CB matrix for backward')

0 commit comments

Comments
 (0)