Skip to content

Commit 0acab1c

Browse files
case 3,4a/b: no lib but cuda validated
1 parent 71a9ce4 commit 0acab1c

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

bitsandbytes/cextension.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -135,16 +135,18 @@ def _format_lib_error_message(
135135
elif no_cuda_lib_found:
136136
version_list_str = "\n - " + "\n - ".join(available_versions) if available_versions else "NONE"
137137
analysis = (
138-
f"\n🚨 CUDA VERSION MISMATCH 🚨\n"
139-
f"Requested CUDA version: {requested_version}\n"
140-
f"Detected PyTorch CUDA version: {user_cuda_version}\n"
141-
f"Available pre-compiled versions: {version_list_str}\n\n"
142-
"This means:\n"
143-
"The version you're trying to use is NOT distributed with this package\n\n"
138+
(
139+
f"\n🚨 CUDA VERSION MISMATCH 🚨\n"
140+
f"Requested CUDA version: {requested_version}\n"
141+
f"Detected PyTorch CUDA version: {user_cuda_version}\n"
142+
f"Available pre-compiled versions: {version_list_str}\n\n"
143+
"This means:\n"
144+
"The version you're trying to use is NOT distributed with this package\n\n"
145+
)
144146
if available_versions
145-
else "1. You're not using the package but checked-out the source code\n"
146-
"2. You MUST compile from source for this specific CUDA version\n"
147-
"3. The installation will NOT work until you compile or choose a CUDA supported version via export BNB_CUDA_VERSION=<version>\n\n"
147+
else "\n🚨 Forgot to compile the bitsandbytes library? 🚨\n"
148+
"1. You're not using the package but checked-out the source code\n"
149+
"2. You MUST compile from source\n\n"
148150
)
149151

150152
base_msg = "Attempted to use bitsandbytes native library functionality but it's not available.\n\n"

0 commit comments

Comments
 (0)