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
ab9dee06
Commit
ab9dee06
authored
Sep 18, 2022
by
justheuristic
Browse files
cast edge case
parent
cbfdf0b5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
4 deletions
+1
-4
bitsandbytes/autograd/_functions.py
bitsandbytes/autograd/_functions.py
+1
-4
No files found.
bitsandbytes/autograd/_functions.py
View file @
ab9dee06
...
@@ -221,9 +221,6 @@ class MatMul8bitLt(torch.autograd.Function):
...
@@ -221,9 +221,6 @@ class MatMul8bitLt(torch.autograd.Function):
# 3. Matmul
# 3. Matmul
# 4. Mixed-precision decomposition matmul
# 4. Mixed-precision decomposition matmul
# 5. Save state
# 5. Save state
requires_gradA
=
A
.
requires_grad
requires_gradB
=
B
.
requires_grad
requires_gradBias
=
bias
is
not
None
and
bias
.
requires_grad
formatB
=
state
.
formatB
formatB
=
state
.
formatB
input_shape
=
A
.
shape
input_shape
=
A
.
shape
if
state
.
outlier_pool
is
None
:
if
state
.
outlier_pool
is
None
:
...
@@ -330,7 +327,7 @@ class MatMul8bitLt(torch.autograd.Function):
...
@@ -330,7 +327,7 @@ class MatMul8bitLt(torch.autograd.Function):
ctx
.
grad_shape
=
input_shape
ctx
.
grad_shape
=
input_shape
ctx
.
dtype_A
,
ctx
.
dtype_B
,
ctx
.
dtype_bias
=
A
.
dtype
,
B
.
dtype
,
None
if
bias
is
None
else
bias
.
dtype
ctx
.
dtype_A
,
ctx
.
dtype_B
,
ctx
.
dtype_bias
=
A
.
dtype
,
B
.
dtype
,
None
if
bias
is
None
else
bias
.
dtype
if
requires_gradA
or
requires_gradB
:
if
any
(
ctx
.
needs_input_grad
[:
2
])
:
ctx
.
tensors
=
(
CAt
,
subA
)
ctx
.
tensors
=
(
CAt
,
subA
)
ctx
.
tensor_states
=
(
SCAt
,
state
.
idx
)
ctx
.
tensor_states
=
(
SCAt
,
state
.
idx
)
else
:
else
:
...
...
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