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
ebfda251
Commit
ebfda251
authored
May 06, 2025
by
Titus von Koeller
Browse files
cleanup python -m bnb to align with changes
parent
f1d9d80a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
21 deletions
+9
-21
bitsandbytes/diagnostics/main.py
bitsandbytes/diagnostics/main.py
+9
-21
No files found.
bitsandbytes/diagnostics/main.py
View file @
ebfda251
...
...
@@ -13,21 +13,6 @@ from bitsandbytes.diagnostics.utils import print_dedented, print_header
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
p
=
torch
.
nn
.
Parameter
(
torch
.
rand
(
10
,
10
).
cuda
())
...
...
@@ -67,12 +52,15 @@ def main():
print
(
"SUCCESS!"
)
print
(
"Installation was successful!"
)
return
except
ImportError
:
except
RuntimeError
as
e
:
if
"not available in CPU-only"
in
str
(
e
):
print
(
f
"WARNING:
{
__package__
}
is currently running as CPU-only!
\n
"
"Therefore, 8-bit optimizers and GPU quantization are unavailable.
\n\n
"
f
"If you think that this is so erroneously,
\n
please report an issue!"
,
)
else
:
raise
e
except
Exception
:
traceback
.
print_exc
()
print_dedented
(
...
...
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