Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
bitsandbytes
Commits
cbfdf0b5
Commit
cbfdf0b5
authored
Sep 18, 2022
by
justheuristic
Browse files
cast edge case
parent
e35e2c66
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
bitsandbytes/autograd/_functions.py
bitsandbytes/autograd/_functions.py
+2
-2
No files found.
bitsandbytes/autograd/_functions.py
View file @
cbfdf0b5
...
@@ -212,9 +212,9 @@ class MatMul8bitLt(torch.autograd.Function):
...
@@ -212,9 +212,9 @@ class MatMul8bitLt(torch.autograd.Function):
ctx
.
B
=
B
ctx
.
B
=
B
ctx
.
bias
=
bias
ctx
.
bias
=
bias
if
A
.
shape
[
-
1
]
==
B
.
shape
[
0
]:
if
A
.
shape
[
-
1
]
==
B
.
shape
[
0
]:
return
torch
.
empty
(
A
.
shape
[:
-
1
]
+
B
.
shape
[
1
:],
dtype
=
torch
.
float16
,
device
=
A
.
device
)
return
torch
.
empty
(
A
.
shape
[:
-
1
]
+
B
.
shape
[
1
:],
dtype
=
A
.
dtype
,
device
=
A
.
device
)
else
:
else
:
return
torch
.
empty
(
A
.
shape
[:
-
1
]
+
B
.
shape
[:
1
],
dtype
=
torch
.
float16
,
device
=
A
.
device
)
return
torch
.
empty
(
A
.
shape
[:
-
1
]
+
B
.
shape
[:
1
],
dtype
=
A
.
dtype
,
device
=
A
.
device
)
# 1. Quantize A
# 1. Quantize A
# 2. Quantize B
# 2. Quantize B
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment