"git@developer.sourcefind.cn:OpenDAS/mmcv.git" did not exist on "1e922b84eed0e2bdb138564c70a5d905d5155bf4"
Commit eac9aca4 authored by justheuristic's avatar justheuristic
Browse files

cast bias too

parent a9fe0ff9
...@@ -234,6 +234,8 @@ class MatMul8bitLt(torch.autograd.Function): ...@@ -234,6 +234,8 @@ class MatMul8bitLt(torch.autograd.Function):
if A_dtype != torch.float16: if A_dtype != torch.float16:
warnings.warn(f"MatMul8bitLt: input matrix will be converted from {A_dtype} to float16") warnings.warn(f"MatMul8bitLt: input matrix will be converted from {A_dtype} to float16")
A = A.to(torch.float16) A = A.to(torch.float16)
if bias is not None:
bias = bias.to(torch.float16)
# 1. Quantize A # 1. Quantize A
if len(A.shape) == 3: if len(A.shape) == 3:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment