Skip to content

Commit

Permalink
Merge branch 'main' into int8
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewdouglas authored Dec 2, 2024
2 parents a2ee1c4 + 7dca700 commit ac09570
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
os: [ubuntu-latest, windows-latest]
arch: [x86_64, aarch64]
cuda_version:
["11.7.1", "11.8.0", "12.0.1", "12.1.1", "12.2.2", "12.3.2", "12.4.1", "12.5.0"]
["11.7.1", "11.8.0", "12.0.1", "12.1.1", "12.2.2", "12.3.2", "12.4.1", "12.5.1", "12.6.2"]
exclude:
- os: windows-latest # This probably requires arm64 Windows agents
arch: aarch64
Expand All @@ -79,7 +79,7 @@ jobs:
if: startsWith(matrix.os, 'ubuntu')
uses: docker/setup-qemu-action@v2
# Windows: We install Cuda on the agent (slow)
- uses: Jimver/[email protected].16
- uses: Jimver/[email protected].19
if: startsWith(matrix.os, 'windows')
id: cuda-toolkit
with:
Expand Down
12 changes: 7 additions & 5 deletions docs/source/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ The latest version of the distributed `bitsandbytes` package is built with the f
| **Linux** | 11.7 - 12.3 | GCC 11.4 |
| | 12.4 - 12.6 | GCC 13.2 |
| **Windows** | 11.7 - 12.6 | MSVC 19.42+ (VS2022) |
| | 12.4+ | GCC 13.2 |
| **Windows** | 11.7 - 12.6 | MSVC 19.38+ (VS2022) |

For CUDA systems, ensure your hardware meets the following requirements:

Expand Down Expand Up @@ -151,12 +153,12 @@ Then locally install the CUDA version you need with this script from bitsandbyte
```bash
wget https://raw.githubusercontent.com/bitsandbytes-foundation/bitsandbytes/main/install_cuda.sh
# Syntax cuda_install CUDA_VERSION INSTALL_PREFIX EXPORT_TO_BASH
# CUDA_VERSION in {110, 111, 112, 113, 114, 115, 116, 117, 118, 120, 121, 122, 123, 124, 125}
# CUDA_VERSION in {110, 111, 112, 113, 114, 115, 116, 117, 118, 120, 121, 122, 123, 124, 125, 126}
# EXPORT_TO_BASH in {0, 1} with 0=False and 1=True

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

bash install_cuda.sh 117 ~/local 1
bash install_cuda.sh 126 ~/local 1
```

2. Set the environment variables `BNB_CUDA_VERSION` and `LD_LIBRARY_PATH` by manually overriding the CUDA version installed by PyTorch.
Expand All @@ -172,8 +174,8 @@ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<PATH>
For example, to use a local install path:

```bash
export BNB_CUDA_VERSION=117
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/YOUR_USERNAME/local/cuda-11.7
export BNB_CUDA_VERSION=126
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/YOUR_USERNAME/local/cuda-12.6
```

3. Now when you launch bitsandbytes with these environment variables, the PyTorch CUDA version is overridden by the new CUDA version (in this example, version 11.7) and a different bitsandbytes library is loaded.
Expand Down
3 changes: 2 additions & 1 deletion install_cuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"122": "https://developer.download.nvidia.com/compute/cuda/12.2.2/local_installers/cuda_12.2.2_535.104.05_linux.run",
"123": "https://developer.download.nvidia.com/compute/cuda/12.3.2/local_installers/cuda_12.3.2_545.23.08_linux.run",
"124": "https://developer.download.nvidia.com/compute/cuda/12.4.1/local_installers/cuda_12.4.1_550.54.15_linux.run",
"125": "https://developer.download.nvidia.com/compute/cuda/12.5.0/local_installers/cuda_12.5.0_555.42.02_linux.run",
"125": "https://developer.download.nvidia.com/compute/cuda/12.5.1/local_installers/cuda_12.5.1_555.42.06_linux.run",
"126": "https://developer.download.nvidia.com/compute/cuda/12.6.2/local_installers/cuda_12.6.2_560.35.03_linux.run",
}


Expand Down
6 changes: 5 additions & 1 deletion install_cuda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ URL121=https://developer.download.nvidia.com/compute/cuda/12.1.1/local_installer
URL122=https://developer.download.nvidia.com/compute/cuda/12.2.2/local_installers/cuda_12.2.2_535.104.05_linux.run
URL123=https://developer.download.nvidia.com/compute/cuda/12.3.2/local_installers/cuda_12.3.2_545.23.08_linux.run
URL124=https://developer.download.nvidia.com/compute/cuda/12.4.1/local_installers/cuda_12.4.1_550.54.15_linux.run
URL125=https://developer.download.nvidia.com/compute/cuda/12.5.0/local_installers/cuda_12.5.0_555.42.02_linux.run
URL125=https://developer.download.nvidia.com/compute/cuda/12.5.1/local_installers/cuda_12.5.1_555.42.06_linux.run
URL126=https://developer.download.nvidia.com/compute/cuda/12.6.2/local_installers/cuda_12.6.2_560.35.03_linux.run

CUDA_VERSION=$1
BASE_PATH=$2
Expand Down Expand Up @@ -64,6 +65,9 @@ if [[ -n "$CUDA_VERSION" ]]; then
elif [[ "$CUDA_VERSION" -eq "125" ]]; then
URL=$URL125
FOLDER=cuda-12.5
elif [[ "$CUDA_VERSION" -eq "126" ]]; then
URL=$URL126
FOLDER=cuda-12.6
else
echo "argument error: No cuda version passed as input. Choose among versions 110 to 125"
fi
Expand Down

0 comments on commit ac09570

Please sign in to comment.