Skip to content

Commit e820409

Browse files
(docs) Clarify Python and CUDA Toolkit version requirement (#1076)
(misc) Update CUDA download URLs
1 parent e4376db commit e820409

File tree

4 files changed

+19
-40
lines changed

4 files changed

+19
-40
lines changed

bitsandbytes/cuda_setup/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def run_cuda_setup(self):
161161
self.add_log_entry('3. CUDA not installed')
162162
self.add_log_entry('4. You have multiple conflicting CUDA libraries')
163163
self.add_log_entry('5. Required library not pre-compiled for this bitsandbytes release!')
164-
self.add_log_entry('CUDA SETUP: If you compiled from source, try again with `make CUDA_VERSION=DETECTED_CUDA_VERSION` for example, `make CUDA_VERSION=113`.')
164+
self.add_log_entry('CUDA SETUP: If you compiled from source, try again with `make CUDA_VERSION=DETECTED_CUDA_VERSION` for example, `make CUDA_VERSION=118`.')
165165
self.add_log_entry('CUDA SETUP: The CUDA version for the compile might depend on your conda install. Inspect CUDA version via `conda list | grep cuda`.')
166166
self.add_log_entry('='*80)
167167
self.add_log_entry('')
@@ -268,7 +268,7 @@ def warn_in_case_of_duplicates(results_paths: Set[Path]) -> None:
268268
"BNB_CUDA_VERSION=122 python ..."
269269
"OR set the environmental variable in your .bashrc: export BNB_CUDA_VERSION=122"
270270
"In the case of a manual override, make sure you set the LD_LIBRARY_PATH, e.g."
271-
"export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-11.2")
271+
"export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-12.2")
272272
CUDASetup.get_instance().add_log_entry(warning_msg, is_warning=True)
273273

274274

docs/source/installation.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Installation
22

3-
bitsandbytes is only supported on CUDA GPUs for CUDA versions **10.2 - 12.0**. Select your operating system below to see the installation instructions.
3+
bitsandbytes is only supported on CUDA GPUs for CUDA versions **11.0 - 12.3**. Select your operating system below to see the installation instructions.
44

55
<hfoptions id="OS system">
66
<hfoption id="Linux">
@@ -21,7 +21,7 @@ To install from PyPI.
2121
pip install bitsandbytes
2222
```
2323

24-
To compile from source, you need CMake >= **3.22.1** and Python >= **3.10** installed. Make sure you have a compiler installed to compile C++ (gcc, make, headers, etc.). For example, to install a compiler and CMake on Ubuntu:
24+
To compile from source, you need CMake >= **3.22.1** and Python >= **3.8** installed. Make sure you have a compiler installed to compile C++ (gcc, make, headers, etc.). For example, to install a compiler and CMake on Ubuntu:
2525

2626
```bash
2727
apt-get install -y build-essential cmake
@@ -47,7 +47,7 @@ pip install .
4747

4848
Windows systems require Visual Studio with C++ support as well as an installation of the CUDA SDK.
4949

50-
You'll need to build bitsandbytes from source. To compile from source, you need CMake >= **3.22.1** and Python >= **3.10** installed. You should also install CUDA Toolkit by following the [CUDA Installation Guide for Windows](https://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/index.html) guide from NVIDIA.
50+
You'll need to build bitsandbytes from source. To compile from source, you need CMake >= **3.22.1** and Python >= **3.8** installed. You should also install CUDA Toolkit by following the [CUDA Installation Guide for Windows](https://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/index.html) guide from NVIDIA.
5151

5252
```bash
5353
git clone https://github.com/TimDettmers/bitsandbytes.git && cd bitsandbytes/
@@ -82,7 +82,7 @@ Then locally install the CUDA version you need with this script from bitsandbyte
8282
```bash
8383
wget https://raw.githubusercontent.com/TimDettmers/bitsandbytes/main/install_cuda.sh
8484
# Syntax cuda_install CUDA_VERSION INSTALL_PREFIX EXPORT_TO_BASH
85-
# CUDA_VERSION in {110, 111, 112, 113, 114, 115, 116, 117, 118, 120, 121, 122}
85+
# CUDA_VERSION in {110, 111, 112, 113, 114, 115, 116, 117, 118, 120, 121, 122, 123}
8686
# EXPORT_TO_BASH in {0, 1} with 0=False and 1=True
8787

8888
# For example, the following installs CUDA 11.7 to ~/local/cuda-11.7 and exports the path to your .bashrc

install_cuda.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,21 @@
44
from urllib.request import urlretrieve
55

66
cuda_versions = {
7-
"92": "https://developer.nvidia.com/compute/cuda/9.2/Prod2/local_installers/cuda_9.2.148_396.37_linux",
8-
"100": "https://developer.nvidia.com/compute/cuda/10.0/Prod/local_installers/cuda_10.0.130_410.48_linux",
9-
"101": "https://developer.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.105_418.39_linux.run",
10-
"102": "https://developer.download.nvidia.com/compute/cuda/10.2/Prod/local_installers/cuda_10.2.89_440.33.01_linux.run",
117
"110": "https://developer.download.nvidia.com/compute/cuda/11.0.3/local_installers/cuda_11.0.3_450.51.06_linux.run",
128
"111": "https://developer.download.nvidia.com/compute/cuda/11.1.1/local_installers/cuda_11.1.1_455.32.00_linux.run",
139
"112": "https://developer.download.nvidia.com/compute/cuda/11.2.2/local_installers/cuda_11.2.2_460.32.03_linux.run",
1410
"113": "https://developer.download.nvidia.com/compute/cuda/11.3.1/local_installers/cuda_11.3.1_465.19.01_linux.run",
1511
"114": "https://developer.download.nvidia.com/compute/cuda/11.4.4/local_installers/cuda_11.4.4_470.82.01_linux.run",
1612
"115": "https://developer.download.nvidia.com/compute/cuda/11.5.2/local_installers/cuda_11.5.2_495.29.05_linux.run",
1713
"116": "https://developer.download.nvidia.com/compute/cuda/11.6.2/local_installers/cuda_11.6.2_510.47.03_linux.run",
18-
"117": "https://developer.download.nvidia.com/compute/cuda/11.7.0/local_installers/cuda_11.7.0_515.43.04_linux.run",
14+
"117": "https://developer.download.nvidia.com/compute/cuda/11.7.1/local_installers/cuda_11.7.1_515.65.01_linux.run",
1915
"118": "https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux.run",
20-
"120": "https://developer.download.nvidia.com/compute/cuda/12.0.0/local_installers/cuda_12.0.0_525.60.13_linux.run",
21-
"121": "https://developer.download.nvidia.com/compute/cuda/12.1.0/local_installers/cuda_12.1.0_530.30.02_linux.run",
22-
"122": "https://developer.download.nvidia.com/compute/cuda/12.2.0/local_installers/cuda_12.2.0_535.54.03_linux.run",
23-
"123": "https://developer.download.nvidia.com/compute/cuda/12.3.1/local_installers/cuda_12.3.1_545.23.08_linux.run",
16+
"120": "https://developer.download.nvidia.com/compute/cuda/12.0.1/local_installers/cuda_12.0.1_525.85.12_linux.run",
17+
"121": "https://developer.download.nvidia.com/compute/cuda/12.1.1/local_installers/cuda_12.1.1_530.30.02_linux.run",
18+
"122": "https://developer.download.nvidia.com/compute/cuda/12.2.2/local_installers/cuda_12.2.2_535.104.05_linux.run",
19+
"123": "https://developer.download.nvidia.com/compute/cuda/12.3.2/local_installers/cuda_12.3.2_545.23.08_linux.run",
2420
}
2521

26-
2722
def install_cuda(version, base_path, download_path):
2823
formatted_version = f"{version[:-1]}.{version[-1]}"
2924
folder = f"cuda-{formatted_version}"

install_cuda.sh

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,33 @@
1-
URL92=https://developer.nvidia.com/compute/cuda/9.2/Prod2/local_installers/cuda_9.2.148_396.37_linux
2-
URL100=https://developer.nvidia.com/compute/cuda/10.0/Prod/local_installers/cuda_10.0.130_410.48_linux
3-
URL101=https://developer.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.105_418.39_linux.run
4-
URL102=https://developer.download.nvidia.com/compute/cuda/10.2/Prod/local_installers/cuda_10.2.89_440.33.01_linux.run
51
URL110=https://developer.download.nvidia.com/compute/cuda/11.0.3/local_installers/cuda_11.0.3_450.51.06_linux.run
62
URL111=https://developer.download.nvidia.com/compute/cuda/11.1.1/local_installers/cuda_11.1.1_455.32.00_linux.run
73
URL112=https://developer.download.nvidia.com/compute/cuda/11.2.2/local_installers/cuda_11.2.2_460.32.03_linux.run
84
URL113=https://developer.download.nvidia.com/compute/cuda/11.3.1/local_installers/cuda_11.3.1_465.19.01_linux.run
95
URL114=https://developer.download.nvidia.com/compute/cuda/11.4.4/local_installers/cuda_11.4.4_470.82.01_linux.run
106
URL115=https://developer.download.nvidia.com/compute/cuda/11.5.2/local_installers/cuda_11.5.2_495.29.05_linux.run
117
URL116=https://developer.download.nvidia.com/compute/cuda/11.6.2/local_installers/cuda_11.6.2_510.47.03_linux.run
12-
URL117=https://developer.download.nvidia.com/compute/cuda/11.7.0/local_installers/cuda_11.7.0_515.43.04_linux.run
8+
URL117=https://developer.download.nvidia.com/compute/cuda/11.7.1/local_installers/cuda_11.7.1_515.65.01_linux.run
139
URL118=https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux.run
14-
URL120=https://developer.download.nvidia.com/compute/cuda/12.0.0/local_installers/cuda_12.0.0_525.60.13_linux.run
10+
URL120=https://developer.download.nvidia.com/compute/cuda/12.0.1/local_installers/cuda_12.0.1_525.85.12_linux.run
1511
URL121=https://developer.download.nvidia.com/compute/cuda/12.1.1/local_installers/cuda_12.1.1_530.30.02_linux.run
16-
URL122=https://developer.download.nvidia.com/compute/cuda/12.2.1/local_installers/cuda_12.2.1_535.86.10_linux.run
17-
URL123=https://developer.download.nvidia.com/compute/cuda/12.3.1/local_installers/cuda_12.3.1_545.23.08_linux.run
12+
URL122=https://developer.download.nvidia.com/compute/cuda/12.2.2/local_installers/cuda_12.2.2_535.104.05_linux.run
13+
URL123=https://developer.download.nvidia.com/compute/cuda/12.3.2/local_installers/cuda_12.3.2_545.23.08_linux.run
1814

1915

2016
CUDA_VERSION=$1
2117
BASE_PATH=$2
2218
EXPORT_BASHRC=$3
2319

2420
if [[ -n "$CUDA_VERSION" ]]; then
25-
if [[ "$CUDA_VERSION" -eq "92" ]]; then
26-
URL=$URL92
27-
FOLDER=cuda-9.2
28-
elif [[ "$CUDA_VERSION" -eq "100" ]]; then
29-
URL=$URL100
30-
FOLDER=cuda-10.0
31-
elif [[ "$CUDA_VERSION" -eq "101" ]]; then
32-
URL=$URL101
33-
FOLDER=cuda-10.1
34-
elif [[ "$CUDA_VERSION" -eq "102" ]]; then
35-
URL=$URL102
36-
FOLDER=cuda-10.2
37-
elif [[ "$CUDA_VERSION" -eq "110" ]]; then
21+
if [[ "$CUDA_VERSION" -eq "110" ]]; then
3822
URL=$URL110
3923
FOLDER=cuda-11.0
40-
elif [[ "$CUDA_VERSION" -eq "111" ]]; then
24+
elif [[ "$CUDA_VERSION" -eq "111" ]]; then
4125
URL=$URL111
4226
FOLDER=cuda-11.1
43-
elif [[ "$CUDA_VERSION" -eq "112" ]]; then
27+
elif [[ "$CUDA_VERSION" -eq "112" ]]; then
4428
URL=$URL112
4529
FOLDER=cuda-11.2
46-
elif [[ "$CUDA_VERSION" -eq "113" ]]; then
30+
elif [[ "$CUDA_VERSION" -eq "113" ]]; then
4731
URL=$URL113
4832
FOLDER=cuda-11.3
4933
elif [[ "$CUDA_VERSION" -eq "114" ]]; then

0 commit comments

Comments
 (0)