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
9b7d307b
"git@developer.sourcefind.cn:OpenDAS/vision.git" did not exist on "b6770a7ee198ecb3426d2dc4ffe2f88e4dc62952"
Commit
9b7d307b
authored
Sep 20, 2022
by
Tim Dettmers
Committed by
justheuristic
Sep 20, 2022
Browse files
review
parent
cff3a715
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
bitsandbytes/autograd/_functions.py
bitsandbytes/autograd/_functions.py
+1
-1
No files found.
bitsandbytes/autograd/_functions.py
View file @
9b7d307b
...
@@ -381,7 +381,7 @@ class MatMul8bitLt(torch.autograd.Function):
...
@@ -381,7 +381,7 @@ class MatMul8bitLt(torch.autograd.Function):
grad_A
=
F
.
mm_dequant
(
gradA32
,
SgradA32
,
SCgrad
,
state
.
SCBt
).
view
(
ctx
.
grad_shape
).
to
(
ctx
.
dtype_A
)
grad_A
=
F
.
mm_dequant
(
gradA32
,
SgradA32
,
SCgrad
,
state
.
SCBt
).
view
(
ctx
.
grad_shape
).
to
(
ctx
.
dtype_A
)
elif
state
.
CB
is
not
None
:
elif
state
.
CB
is
not
None
:
CB
=
state
.
CB
.
to
(
ctx
.
dtype_A
,
copy
=
True
).
mul_
(
state
.
SCB
.
unsqueeze
(
1
).
div
(
127.0
))
CB
=
state
.
CB
.
to
(
ctx
.
dtype_A
,
copy
=
True
).
mul_
(
state
.
SCB
.
unsqueeze
(
1
).
mul
(
1.
/
127.0
))
grad_A
=
torch
.
matmul
(
grad_output
,
CB
).
view
(
ctx
.
grad_shape
).
to
(
ctx
.
dtype_A
)
grad_A
=
torch
.
matmul
(
grad_output
,
CB
).
view
(
ctx
.
grad_shape
).
to
(
ctx
.
dtype_A
)
else
:
else
:
raise
Exception
(
'State must contain either CBt or CB matrix for backward'
)
raise
Exception
(
'State must contain either CBt or CB matrix for backward'
)
...
...
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