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
140cdbe8
Commit
140cdbe8
authored
Sep 17, 2022
by
justheuristic
Browse files
check dtypes first
parent
a9c7953e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
tests/test_autograd.py
tests/test_autograd.py
+3
-1
No files found.
tests/test_autograd.py
View file @
140cdbe8
...
...
@@ -354,7 +354,7 @@ def test_matmullt(
state
.
SCB
,
SCBt
,
coo_tensorB
,
)
=
bnb
.
functional
.
double_quant
(
B2
.
half
(
))
)
=
bnb
.
functional
.
double_quant
(
B2
.
to
(
torch
.
float16
))
B2
=
state
.
CB
if
not
transpose
[
0
]
and
transpose
[
1
]:
...
...
@@ -367,6 +367,8 @@ def test_matmullt(
if
has_bias
:
out_torch
+=
bias
assert
out_bnb
.
dtype
==
torch
.
dtype
n
=
out_bnb
.
numel
()
err
=
torch
.
abs
(
out_bnb
-
out_torch
).
mean
().
item
()
# print(f'abs error {err:.4f}')
...
...
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