summaryrefslogtreecommitdiff
path: root/bitsandbytes/__main__.py
diff options
context:
space:
mode:
authorTim Dettmers <TimDettmers@users.noreply.github.com>2022-09-05 16:29:36 -0700
committerGitHub <noreply@github.com>2022-09-05 16:29:36 -0700
commitf0ae860c86039d1c1e41166aaf2153a5bd9b9a89 (patch)
tree75477acfbce2da2a753ee21d4cf0da64f3f50ea5 /bitsandbytes/__main__.py
parenteab4d8232d558f2e6bd7f7cc3d00e2e6e94f4e80 (diff)
parentaca55881b9815a462142f42f3ff0dc917830d85c (diff)
Merge pull request #25 from TimDettmers/remove_unused_code
Remove unused code, switch to warnings
Diffstat (limited to 'bitsandbytes/__main__.py')
-rw-r--r--bitsandbytes/__main__.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/bitsandbytes/__main__.py b/bitsandbytes/__main__.py
index 5f11875..175a30e 100644
--- a/bitsandbytes/__main__.py
+++ b/bitsandbytes/__main__.py
@@ -3,8 +3,9 @@
# cli()
import os
import sys
-import torch
+from warnings import warn
+import torch
HEADER_WIDTH = 60
@@ -32,8 +33,6 @@ print()
from . import COMPILED_WITH_CUDA, PACKAGE_GITHUB_URL
from .cuda_setup.main import get_compute_capabilities, get_cuda_lib_handle
from .cuda_setup.env_vars import to_be_ignored
-from .utils import print_stderr
-
print_header("POTENTIALLY LIBRARY-PATH-LIKE ENV VARS")
for k, v in os.environ.items():
@@ -84,7 +83,7 @@ try:
except ImportError:
print()
- print_stderr(
+ warn(
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,\nplease report an issue!"