summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjustheuristic <justheuristic@gmail.com>2022-09-18 00:28:03 +0300
committerjustheuristic <justheuristic@gmail.com>2022-09-18 00:28:03 +0300
commit45dc1983e92f9c3125948f416aafc6b96b3a6c15 (patch)
tree7ba0802743f32dbfa5f984e6177615998d29549d
parent702cc72018eaa177b94a276043a6c069ff0da32b (diff)
cast properly
-rw-r--r--bitsandbytes/autograd/_functions.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/bitsandbytes/autograd/_functions.py b/bitsandbytes/autograd/_functions.py
index c3c2bf8..03949de 100644
--- a/bitsandbytes/autograd/_functions.py
+++ b/bitsandbytes/autograd/_functions.py
@@ -294,7 +294,7 @@ class MatMul8bitLt(torch.autograd.Function):
(outliers * state.SCB.view(-1, 1) / 127.0)
.t()
.contiguous()
- .half()
+ .to(B.dtype)
)
CA[:, state.idx.long()] = 0
CAt[:, state.idx.long()] = 0
@@ -321,7 +321,6 @@ class MatMul8bitLt(torch.autograd.Function):
# 4. Mixed-precision decomposition matmul
if coo_tensorA is not None and subA is not None:
- assert subA.dtype == state.subB.dtype, (subA.dtype, state.subB.dtype)
output += torch.matmul(subA, state.subB)
# 5. Save state