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
6a5a18a1
Commit
6a5a18a1
authored
Mar 13, 2024
by
Titus von Koeller
Committed by
Aarni Koskela
Mar 13, 2024
Browse files
Sanity check: Add check for `lib` being None
parent
e2db55ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
bitsandbytes/diagnostics/main.py
bitsandbytes/diagnostics/main.py
+15
-0
No files found.
bitsandbytes/diagnostics/main.py
View file @
6a5a18a1
...
@@ -13,6 +13,21 @@ from bitsandbytes.diagnostics.utils import print_dedented, print_header
...
@@ -13,6 +13,21 @@ from bitsandbytes.diagnostics.utils import print_dedented, print_header
def
sanity_check
():
def
sanity_check
():
from
bitsandbytes.cextension
import
lib
if
lib
is
None
:
print_dedented
(
"""
Couldn't load the bitsandbytes library, likely due to missing binaries.
Please ensure bitsandbytes is properly installed.
For source installations, compile the binaries with `cmake -DCOMPUTE_BACKEND=cuda -S .`.
See the documentation for more details if needed.
Trying a simple check anyway, but this will likely fail...
"""
)
from
bitsandbytes.optim
import
Adam
from
bitsandbytes.optim
import
Adam
p
=
torch
.
nn
.
Parameter
(
torch
.
rand
(
10
,
10
).
cuda
())
p
=
torch
.
nn
.
Parameter
(
torch
.
rand
(
10
,
10
).
cuda
())
...
...
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