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
1341fb44
Commit
1341fb44
authored
Jan 04, 2023
by
Tim Dettmers
Browse files
Fixed issue where the CUDA SETUP was not printed.
parent
3901ebf7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
1 deletion
+24
-1
bitsandbytes/cextension.py
bitsandbytes/cextension.py
+3
-0
check_bnb_install.py
check_bnb_install.py
+20
-0
setup.py
setup.py
+1
-1
No files found.
bitsandbytes/cextension.py
View file @
1341fb44
import
ctypes
as
ct
import
ctypes
as
ct
import
os
import
torch
import
torch
from
pathlib
import
Path
from
pathlib
import
Path
...
@@ -10,6 +11,8 @@ from bitsandbytes.cuda_setup.main import CUDASetup
...
@@ -10,6 +11,8 @@ from bitsandbytes.cuda_setup.main import CUDASetup
setup
=
CUDASetup
.
get_instance
()
setup
=
CUDASetup
.
get_instance
()
if
setup
.
initialized
!=
True
:
if
setup
.
initialized
!=
True
:
setup
.
run_cuda_setup
()
setup
.
run_cuda_setup
()
if
'BITSANDBYTES_NOWELCOME'
not
in
os
.
environ
or
str
(
os
.
environ
[
'BITSANDBYTES_NOWELCOME'
])
==
'0'
:
setup
.
print_log_stack
()
lib
=
setup
.
lib
lib
=
setup
.
lib
try
:
try
:
...
...
check_bnb_install.py
0 → 100644
View file @
1341fb44
import
bitsandbytes
as
bnb
import
torch
p
=
torch
.
nn
.
Parameter
(
torch
.
rand
(
10
,
10
).
cuda
())
a
=
torch
.
rand
(
10
,
10
).
cuda
()
p1
=
p
.
data
.
sum
().
item
()
adam
=
bnb
.
optim
.
Adam
([
p
])
out
=
a
*
p
loss
=
out
.
sum
()
loss
.
backward
()
adam
.
step
()
p2
=
p
.
data
.
sum
().
item
()
assert
p1
!=
p2
print
(
'SUCCESS!'
)
print
(
'Installation was successful!'
)
setup.py
View file @
1341fb44
...
@@ -18,7 +18,7 @@ def read(fname):
...
@@ -18,7 +18,7 @@ def read(fname):
setup
(
setup
(
name
=
f
"bitsandbytes"
,
name
=
f
"bitsandbytes"
,
version
=
f
"0.36.0"
,
version
=
f
"0.36.0
-2
"
,
author
=
"Tim Dettmers"
,
author
=
"Tim Dettmers"
,
author_email
=
"dettmers@cs.washington.edu"
,
author_email
=
"dettmers@cs.washington.edu"
,
description
=
"8-bit optimizers and matrix multiplication routines."
,
description
=
"8-bit optimizers and matrix multiplication routines."
,
...
...
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