From a23984fed5f87f24348d2e8f10e8792853d5eaed Mon Sep 17 00:00:00 2001
From: jiqing-feng <107918818+jiqing-feng@users.noreply.github.com>
Date: Fri, 20 Sep 2024 07:35:40 +0800
Subject: [PATCH 01/17] check grad before using ipex (#1358)
---
bitsandbytes/nn/modules.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/bitsandbytes/nn/modules.py b/bitsandbytes/nn/modules.py
index ad424a6f4..32854413f 100644
--- a/bitsandbytes/nn/modules.py
+++ b/bitsandbytes/nn/modules.py
@@ -471,6 +471,7 @@ def forward(self, x: torch.Tensor):
and not hasattr(self.weight.quant_state, "op_context")
and self.weight.quant_state.shape[1] % self.weight.quant_state.blocksize == 0
and self.weight.quant_state.quant_type == "nf4"
+ and x.requires_grad == False
):
enable_ipex_fusion(self.weight, self.weight.quant_state)
From e8881bef17a4666ac5fee65a73bf337cdc8ca547 Mon Sep 17 00:00:00 2001
From: pnunna93 <104791500+pnunna93@users.noreply.github.com>
Date: Fri, 20 Sep 2024 15:54:58 -0500
Subject: [PATCH 02/17] Enable packaging for ROCm 6.2 (#1367)
* Enable 6.2 build
* Update documentation for 6.2.0 pip install
---
.github/workflows/python-package.yml | 2 +-
docs/source/installation.mdx | 2 +-
tests/test_functional.py | 1 +
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml
index d2da82501..21c4c1895 100644
--- a/.github/workflows/python-package.yml
+++ b/.github/workflows/python-package.yml
@@ -107,7 +107,7 @@ jobs:
os: [ubuntu-latest]
arch: [x86_64]
rocm_version:
- ["6.1.2"]
+ ["6.1.2", "6.2"]
runs-on: ${{ matrix.os }} # One day, we could run them on native agents. Azure supports this now but it's planned only for Q3 2023 for hosted agents
steps:
- uses: actions/checkout@v4
diff --git a/docs/source/installation.mdx b/docs/source/installation.mdx
index 60419b38a..146fb0ddd 100644
--- a/docs/source/installation.mdx
+++ b/docs/source/installation.mdx
@@ -167,7 +167,7 @@ apt-get update && apt-get install -y git && cd home
pip install torch --index-url https://download.pytorch.org/whl/rocm6.1/
# Install bitsandbytes from PyPI
-# (This is supported on Ubuntu 22.04, Python 3.10, ROCm 6.1.0/6.1.1/6.1.2 and gpu arch - gfx90a, gfx942, gfx1100
+# (This is supported on Ubuntu 22.04, Python 3.10, ROCm 6.1.0/6.1.1/6.1.2/6.2.0 and gpu arch - gfx90a, gfx942, gfx1100
# Please install from source if your configuration doesn't match with these)
pip install bitsandbytes
diff --git a/tests/test_functional.py b/tests/test_functional.py
index a9d926b89..35187db78 100644
--- a/tests/test_functional.py
+++ b/tests/test_functional.py
@@ -2303,6 +2303,7 @@ def test_gemv_4bit(dtype, storage_type, quant_storage, double_quant, kind):
assert maxratio < 1.02 and maxratio > 0.98
+@pytest.mark.skipif(HIP_ENVIRONMENT, reason="this test is not supported on ROCm yet")
@pytest.mark.parametrize("kind", ["fc1", "fc2", "attn", "attn_packed"])
@pytest.mark.parametrize("quant_type", ["nf4", "fp4"])
@pytest.mark.parametrize("dtype", [torch.float16, torch.bfloat16, torch.float32], ids=describe_dtype)
From 0d3d977c8f9fab7193345a4dc8f2e19c9bb35db3 Mon Sep 17 00:00:00 2001
From: Matthew Douglas <38992547+matthewdouglas@users.noreply.github.com>
Date: Mon, 9 Sep 2024 14:31:38 -0400
Subject: [PATCH 03/17] Update for VS2022 17.11 compatibility with CUDA < 12.4
(#1341)
* Update for VS2022 17.11 compatibility with CUDA < 12.4
* Try again
---
CMakeLists.txt | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index eac72fe52..315e0ff1b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -82,6 +82,11 @@ if(BUILD_CUDA)
# This needs to be added *before* we try to enable the CUDA language so CMake's compiler check passes.
if(MSVC AND MSVC_VERSION VERSION_GREATER_EQUAL 1940)
string(APPEND CMAKE_CUDA_FLAGS " --allow-unsupported-compiler")
+
+ # This is needed to build with VS2022 17.11+ and CUDA < 12.4.
+ if (MSVC_VERSION VERSION_GREATER_EQUAL 1941)
+ string(APPEND CMAKE_CUDA_FLAGS " -D_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH")
+ endif()
endif()
enable_language(CUDA) # This will fail if CUDA is not found
From e72637c99cd314a0b840615754fb4e433875b550 Mon Sep 17 00:00:00 2001
From: Matthew Douglas <38992547+matthewdouglas@users.noreply.github.com>
Date: Thu, 26 Sep 2024 09:45:42 -0400
Subject: [PATCH 04/17] Enable continuous releases for multi-backend-refactor
branch
---
.github/workflows/python-package.yml | 50 ++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml
index 21c4c1895..3aeeef9ba 100644
--- a/.github/workflows/python-package.yml
+++ b/.github/workflows/python-package.yml
@@ -197,6 +197,56 @@ jobs:
path: dist/bitsandbytes-*.whl
retention-days: 7
+ upload-pre-release-wheels:
+ name: Create release and upload artifacts
+ runs-on: ubuntu-latest
+ if: github.ref_name == 'multi-backend-refactor'
+ permissions:
+ contents: write
+ needs:
+ - build-wheels
+ steps:
+ - name: Download artifacts to tmp directory
+ uses: actions/download-artifact@v4
+ with:
+ path: tmp/
+ pattern: "bdist_wheel_*"
+ merge-multiple: true
+ - name: Inspect tmp directory after downloading artifacts
+ run: ls -alFR tmp/
+ - name: Move and rename wheel files
+ run: |
+ mkdir -p wheels/
+ find tmp/ -type f -name '*.whl' -print0 | while IFS= read -r -d '' wheel; do
+ wheel_filename=$(basename "$wheel")
+ if [[ $wheel_filename == *linux*x86_64* ]]; then
+ mv "$wheel" wheels/bnb-linux-x86_64.whl
+ elif [[ $wheel_filename == *linux*aarch64* ]]; then
+ mv "$wheel" wheels/bnb-linux-aarch64.whl
+ elif [[ $wheel_filename == *macosx*x86_64* ]]; then
+ mv "$wheel" wheels/bnb-macos-x86_64.whl
+ elif [[ $wheel_filename == *macosx*arm64* ]]; then
+ mv "$wheel" wheels/bnb-macos-arm64.whl
+ elif [[ $wheel_filename == *win*amd64* ]]; then
+ mv "$wheel" wheels/bnb-windows-x86_64.whl
+ else
+ echo "Unknown wheel format: $wheel_filename"
+ exit 1
+ fi
+ done
+ - name: Inspect wheels directory after renaming files
+ run: ls -alFR wheels/
+ - name: Create release and upload artifacts
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ GITHUB_CONTINUOUS_RELEASE_NAME: Multi-Backend Preview
+ GITHUB_CONTINUOUS_RELEASE_TYPE: prerelease
+ GITHUB_CONTINUOUS_RELEASE_TAG: continuous-release_preview
+ run: |
+ wget -q https://github.com/TheAssassin/pyuploadtool/releases/download/continuous/pyuploadtool-x86_64.AppImage
+ chmod +x pyuploadtool-x86_64.AppImage
+ ./pyuploadtool-x86_64.AppImage --appimage-extract-and-run wheels/*.whl
+
audit-wheels:
needs: build-wheels
runs-on: ubuntu-latest
From 662dc6057ad95207fe27fdd3925dd5c4094a8488 Mon Sep 17 00:00:00 2001
From: Matthew Douglas <38992547+matthewdouglas@users.noreply.github.com>
Date: Thu, 26 Sep 2024 13:01:34 -0400
Subject: [PATCH 05/17] Update release workflow
---
.github/workflows/python-package.yml | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml
index 3aeeef9ba..77316967d 100644
--- a/.github/workflows/python-package.yml
+++ b/.github/workflows/python-package.yml
@@ -237,15 +237,15 @@ jobs:
- name: Inspect wheels directory after renaming files
run: ls -alFR wheels/
- name: Create release and upload artifacts
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- GITHUB_CONTINUOUS_RELEASE_NAME: Multi-Backend Preview
- GITHUB_CONTINUOUS_RELEASE_TYPE: prerelease
- GITHUB_CONTINUOUS_RELEASE_TAG: continuous-release_preview
- run: |
- wget -q https://github.com/TheAssassin/pyuploadtool/releases/download/continuous/pyuploadtool-x86_64.AppImage
- chmod +x pyuploadtool-x86_64.AppImage
- ./pyuploadtool-x86_64.AppImage --appimage-extract-and-run wheels/*.whl
+ uses: softprops/action-gh-release@v2.0.8
+ with:
+ files: wheels/*.whl
+ prerelease: true
+ name: Multi-Backend Preview
+ tag_name: continuous-release-preview
+ make_latest: false
+ draft: true
+ target_commitish: ${{ github.ref_name }}
audit-wheels:
needs: build-wheels
From 3227cdd366770c1e7b40eff3bf43dbbe012b6a9e Mon Sep 17 00:00:00 2001
From: Matthew Douglas <38992547+matthewdouglas@users.noreply.github.com>
Date: Thu, 26 Sep 2024 13:20:00 -0400
Subject: [PATCH 06/17] Publish continuous release for multi-backend
---
.github/workflows/python-package.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml
index 77316967d..37e52be6c 100644
--- a/.github/workflows/python-package.yml
+++ b/.github/workflows/python-package.yml
@@ -244,7 +244,7 @@ jobs:
name: Multi-Backend Preview
tag_name: continuous-release-preview
make_latest: false
- draft: true
+ draft: false
target_commitish: ${{ github.ref_name }}
audit-wheels:
From 0a2b5392ff079645fdc9ff887f80d327f9e874f7 Mon Sep 17 00:00:00 2001
From: Titus von Koeller <9048635+Titus-von-Koeller@users.noreply.github.com>
Date: Fri, 27 Sep 2024 15:09:59 +0000
Subject: [PATCH 07/17] continuous release: revert wheel renaming due to
install err
---
.github/workflows/python-package.yml | 32 +++++-----------------------
1 file changed, 5 insertions(+), 27 deletions(-)
diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml
index 37e52be6c..42d3d0957 100644
--- a/.github/workflows/python-package.yml
+++ b/.github/workflows/python-package.yml
@@ -206,40 +206,18 @@ jobs:
needs:
- build-wheels
steps:
- - name: Download artifacts to tmp directory
+ - name: Download artifacts
uses: actions/download-artifact@v4
with:
- path: tmp/
+ path: artifacts/
pattern: "bdist_wheel_*"
merge-multiple: true
- - name: Inspect tmp directory after downloading artifacts
- run: ls -alFR tmp/
- - name: Move and rename wheel files
- run: |
- mkdir -p wheels/
- find tmp/ -type f -name '*.whl' -print0 | while IFS= read -r -d '' wheel; do
- wheel_filename=$(basename "$wheel")
- if [[ $wheel_filename == *linux*x86_64* ]]; then
- mv "$wheel" wheels/bnb-linux-x86_64.whl
- elif [[ $wheel_filename == *linux*aarch64* ]]; then
- mv "$wheel" wheels/bnb-linux-aarch64.whl
- elif [[ $wheel_filename == *macosx*x86_64* ]]; then
- mv "$wheel" wheels/bnb-macos-x86_64.whl
- elif [[ $wheel_filename == *macosx*arm64* ]]; then
- mv "$wheel" wheels/bnb-macos-arm64.whl
- elif [[ $wheel_filename == *win*amd64* ]]; then
- mv "$wheel" wheels/bnb-windows-x86_64.whl
- else
- echo "Unknown wheel format: $wheel_filename"
- exit 1
- fi
- done
- - name: Inspect wheels directory after renaming files
- run: ls -alFR wheels/
+ - name: Inspect artifacts directory after downloading
+ run: ls -alFR artifacts/
- name: Create release and upload artifacts
uses: softprops/action-gh-release@v2.0.8
with:
- files: wheels/*.whl
+ files: artifacts/**/*.whl
prerelease: true
name: Multi-Backend Preview
tag_name: continuous-release-preview
From 8c5499e7498112fbdf172d2cba0d92a505ecef44 Mon Sep 17 00:00:00 2001
From: Titus von Koeller <9048635+Titus-von-Koeller@users.noreply.github.com>
Date: Fri, 27 Sep 2024 17:38:12 +0000
Subject: [PATCH 08/17] Revert "continuous release: revert wheel renaming due
to install err"
This reverts commit 0a2b5392ff079645fdc9ff887f80d327f9e874f7.
---
.github/workflows/python-package.yml | 32 +++++++++++++++++++++++-----
1 file changed, 27 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml
index 42d3d0957..37e52be6c 100644
--- a/.github/workflows/python-package.yml
+++ b/.github/workflows/python-package.yml
@@ -206,18 +206,40 @@ jobs:
needs:
- build-wheels
steps:
- - name: Download artifacts
+ - name: Download artifacts to tmp directory
uses: actions/download-artifact@v4
with:
- path: artifacts/
+ path: tmp/
pattern: "bdist_wheel_*"
merge-multiple: true
- - name: Inspect artifacts directory after downloading
- run: ls -alFR artifacts/
+ - name: Inspect tmp directory after downloading artifacts
+ run: ls -alFR tmp/
+ - name: Move and rename wheel files
+ run: |
+ mkdir -p wheels/
+ find tmp/ -type f -name '*.whl' -print0 | while IFS= read -r -d '' wheel; do
+ wheel_filename=$(basename "$wheel")
+ if [[ $wheel_filename == *linux*x86_64* ]]; then
+ mv "$wheel" wheels/bnb-linux-x86_64.whl
+ elif [[ $wheel_filename == *linux*aarch64* ]]; then
+ mv "$wheel" wheels/bnb-linux-aarch64.whl
+ elif [[ $wheel_filename == *macosx*x86_64* ]]; then
+ mv "$wheel" wheels/bnb-macos-x86_64.whl
+ elif [[ $wheel_filename == *macosx*arm64* ]]; then
+ mv "$wheel" wheels/bnb-macos-arm64.whl
+ elif [[ $wheel_filename == *win*amd64* ]]; then
+ mv "$wheel" wheels/bnb-windows-x86_64.whl
+ else
+ echo "Unknown wheel format: $wheel_filename"
+ exit 1
+ fi
+ done
+ - name: Inspect wheels directory after renaming files
+ run: ls -alFR wheels/
- name: Create release and upload artifacts
uses: softprops/action-gh-release@v2.0.8
with:
- files: artifacts/**/*.whl
+ files: wheels/*.whl
prerelease: true
name: Multi-Backend Preview
tag_name: continuous-release-preview
From 02d5b423a56908e22edfe3a044de251de13dd231 Mon Sep 17 00:00:00 2001
From: Titus von Koeller <9048635+Titus-von-Koeller@users.noreply.github.com>
Date: Fri, 27 Sep 2024 19:08:29 +0000
Subject: [PATCH 09/17] add dynamic tag-based versioning + git hash for dev
vers
---
.github/workflows/python-package.yml | 21 +++++-------------
.gitignore | 2 ++
bitsandbytes/__init__.py | 5 +++--
setup.py | 32 +++++++++++++++++++++++++++-
4 files changed, 41 insertions(+), 19 deletions(-)
diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml
index 37e52be6c..f655df4f9 100644
--- a/.github/workflows/python-package.yml
+++ b/.github/workflows/python-package.yml
@@ -206,7 +206,7 @@ jobs:
needs:
- build-wheels
steps:
- - name: Download artifacts to tmp directory
+ - name: Download and rename artifacts
uses: actions/download-artifact@v4
with:
path: tmp/
@@ -214,25 +214,14 @@ jobs:
merge-multiple: true
- name: Inspect tmp directory after downloading artifacts
run: ls -alFR tmp/
- - name: Move and rename wheel files
+ - name: Move and rename wheel files with pattern replacement
run: |
mkdir -p wheels/
find tmp/ -type f -name '*.whl' -print0 | while IFS= read -r -d '' wheel; do
wheel_filename=$(basename "$wheel")
- if [[ $wheel_filename == *linux*x86_64* ]]; then
- mv "$wheel" wheels/bnb-linux-x86_64.whl
- elif [[ $wheel_filename == *linux*aarch64* ]]; then
- mv "$wheel" wheels/bnb-linux-aarch64.whl
- elif [[ $wheel_filename == *macosx*x86_64* ]]; then
- mv "$wheel" wheels/bnb-macos-x86_64.whl
- elif [[ $wheel_filename == *macosx*arm64* ]]; then
- mv "$wheel" wheels/bnb-macos-arm64.whl
- elif [[ $wheel_filename == *win*amd64* ]]; then
- mv "$wheel" wheels/bnb-windows-x86_64.whl
- else
- echo "Unknown wheel format: $wheel_filename"
- exit 1
- fi
+ # Remove the gith hash, e.g. `+1234567`, for a stable download link on the multi-backend pre-release
+ cleaned_filename=$(echo "$wheel_filename" | sed -E 's/\+[0-9a-f]{7}-/-/g')
+ mv "$wheel" "wheels/$cleaned_filename"
done
- name: Inspect wheels directory after renaming files
run: ls -alFR wheels/
diff --git a/.gitignore b/.gitignore
index 22f5a6cd6..cd1b797bb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -151,6 +151,8 @@ dmypy.json
# vim
*.swp
+# BNB-specific stuff
dependencies
cuda_build
output/
+bitsandbytes/_version.py
diff --git a/bitsandbytes/__init__.py b/bitsandbytes/__init__.py
index 1e638eb79..25ec8a79a 100644
--- a/bitsandbytes/__init__.py
+++ b/bitsandbytes/__init__.py
@@ -3,6 +3,9 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
+# Import the dynamically generated version from _version.py (see setup.py)
+from ._version import __version__ # isort: skip # type: ignore
+
import torch
from . import research, utils
@@ -73,5 +76,3 @@
"optim.optimizer.Optimizer8bit": False,
"optim.optimizer.MockArgs": False,
}
-
-__version__ = "0.43.3.dev"
diff --git a/setup.py b/setup.py
index 18de0fe5b..2b1c1aff3 100644
--- a/setup.py
+++ b/setup.py
@@ -4,6 +4,7 @@
# LICENSE file in the root directory of this source tree.
import glob
import os
+import subprocess
from setuptools import find_packages, setup
from setuptools.dist import Distribution
@@ -13,6 +14,35 @@
print("libs:", libs)
+def get_git_commit_hash():
+ return subprocess.check_output(["git", "rev-parse", "--short", "HEAD"]).decode("utf-8").strip()
+
+
+def is_git_tagged_commit():
+ tags = subprocess.check_output(["git", "tag", "--points-at", "HEAD"]).decode("utf-8").strip()
+ return bool(tags)
+
+
+def get_latest_semver_tag():
+ tags = subprocess.check_output(["git", "tag"], text=True).splitlines()
+ semver_tags = [tag for tag in tags if tag.count(".") == 2 and all(part.isdigit() for part in tag.split("."))]
+ if not semver_tags:
+ raise ValueError("No valid semantic version tags found")
+ return sorted(semver_tags, key=lambda s: list(map(int, s.split("."))))[-1]
+
+
+def write_version_file(version, filepath="bitsandbytes/_version.py"):
+ with open(filepath, "w") as f:
+ f.write(f'__version__ = "{version}"\n')
+
+
+def get_version_and_write_to_file():
+ latest_semver_tag = get_latest_semver_tag()
+ version = latest_semver_tag if is_git_tagged_commit() else f"{latest_semver_tag}.dev+{get_git_commit_hash()}"
+ write_version_file(version)
+ return version
+
+
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
@@ -25,7 +55,7 @@ def has_ext_modules(self):
setup(
name="bitsandbytes",
- version="0.43.3.dev",
+ version=get_version_and_write_to_file(),
author="Tim Dettmers",
author_email="dettmers@cs.washington.edu",
description="k-bit optimizers and matrix multiplication routines.",
From 6927dcc493562cdec804ffc833627275686b3904 Mon Sep 17 00:00:00 2001
From: Titus von Koeller <9048635+Titus-von-Koeller@users.noreply.github.com>
Date: Fri, 27 Sep 2024 19:50:51 +0000
Subject: [PATCH 10/17] docs: update w/ changes from `main`
---
docs/source/contributing.mdx | 5 +++--
docs/source/installation.mdx | 2 +-
docs/source/non_cuda_backends.mdx | 16 +++++++++++++++-
3 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/docs/source/contributing.mdx b/docs/source/contributing.mdx
index 4fe6b7541..5da42961e 100644
--- a/docs/source/contributing.mdx
+++ b/docs/source/contributing.mdx
@@ -5,8 +5,9 @@
### Setup pre-commit hooks
- Install pre-commit hooks with `pip install pre-commit`.
-- Run `pre-commit autoupdate` once to configure the hooks.
-- Re-run `pre-commit autoupdate` every time a new hook got added.
+- Run `pre-commit install` once to install the hooks, so they will be run on every commit.
+- If the hooks introduce changes, they'll be visible with `git diff`. Review them and `git add` them if everything is fine, then re-execute the before commit, it should pass now.
+- If you want to manually trigger the hooks, you may do `pre-commit run --all-files`
Now all the pre-commit hooks will be automatically run when you try to commit and if they introduce some changes, you need to re-add the changed files before being able to commit and push.
diff --git a/docs/source/installation.mdx b/docs/source/installation.mdx
index 146fb0ddd..2f82c199b 100644
--- a/docs/source/installation.mdx
+++ b/docs/source/installation.mdx
@@ -137,7 +137,7 @@ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/YOUR_USERNAME/local/cuda-11.7
## Multi-backend[[multi-backend]]
> [!TIP]
-> This functionality is currently in preview and therefore not yet production-ready!
+> This functionality is currently in preview and therefore not yet production-ready! Please reference [this guide](./non_cuda_backends) for more in-depth information about the different backends and their current status.
Please follow these steps to install bitsandbytes with device-specific backend support other than CUDA:
diff --git a/docs/source/non_cuda_backends.mdx b/docs/source/non_cuda_backends.mdx
index fca586534..fc7c6ac27 100644
--- a/docs/source/non_cuda_backends.mdx
+++ b/docs/source/non_cuda_backends.mdx
@@ -24,4 +24,18 @@ Thank you for your support!
### Intel
-### AMD
+The following performance data is collected from Intel 4th Gen Xeon (SPR) platform. The tables show speed-up and memory compared with different data types of [Llama-2-7b-chat-hf](https://huggingface.co/meta-llama/Llama-2-7b-chat-hf).
+
+#### Inference (CPU)
+
+| Data Type | BF16 | INT8 | NF4 | FP4 |
+|---|---|---|---|---|
+| Speed-Up (vs BF16) | 1.0x | 0.6x | 2.3x | 0.03x |
+| Memory (GB) | 13.1 | 7.6 | 5.0 | 4.6 |
+
+#### Fine-Tuning (CPU)
+
+| Data Type | AMP BF16 | INT8 | NF4 | FP4 |
+|---|---|---|---|---|
+| Speed-Up (vs AMP BF16) | 1.0x | 0.38x | 0.07x | 0.07x |
+| Memory (GB) | 40 | 9 | 6.6 | 6.6 |
From 8dcd971cc11ab3449eea01419ec1676d5d5e53c8 Mon Sep 17 00:00:00 2001
From: Titus von Koeller <9048635+Titus-von-Koeller@users.noreply.github.com>
Date: Fri, 27 Sep 2024 20:24:03 +0000
Subject: [PATCH 11/17] get tags for dynamic versioning
---
.github/workflows/python-package.yml | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml
index f655df4f9..9cd9ceb78 100644
--- a/.github/workflows/python-package.yml
+++ b/.github/workflows/python-package.yml
@@ -166,6 +166,13 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
+ with:
+ fetch-depth: 1 # shallow clone
+ - name: Fetch tags for dynamic versioning in setup.py
+ run: |
+ git fetch --depth=1 origin --tags
+ echo "Available Git tags:"
+ git tag -n
- name: Download build artifact
uses: actions/download-artifact@v4
with:
@@ -183,7 +190,8 @@ jobs:
python-version: ${{ matrix.python-version }}
cache: pip
- run: pip install build wheel
- - run: python -m build .
+ # for now need to do the below instead of prior `python -m build .`, which didn't allow us to access git tags
+ - run: python -m build --sdist && python -m build --wheel
- name: Determine and Set Platform Tag, then Tag Wheel
shell: bash
run: |
From 09ac7ec34f556d74356167ed4214d9e1f3f98bad Mon Sep 17 00:00:00 2001
From: Titus von Koeller <9048635+Titus-von-Koeller@users.noreply.github.com>
Date: Mon, 30 Sep 2024 18:34:53 +0000
Subject: [PATCH 12/17] fine-tune continuous release params
---
.github/workflows/python-package.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml
index 9cd9ceb78..f96dd995e 100644
--- a/.github/workflows/python-package.yml
+++ b/.github/workflows/python-package.yml
@@ -239,10 +239,10 @@ jobs:
files: wheels/*.whl
prerelease: true
name: Multi-Backend Preview
- tag_name: continuous-release-preview
+ tag_name: continuous-release_multi-backend-refactor
make_latest: false
draft: false
- target_commitish: ${{ github.ref_name }}
+ target_commitish: ${{ github.sha }}
audit-wheels:
needs: build-wheels
From cc56a30e7d54e42328f0a995106828372acaebfe Mon Sep 17 00:00:00 2001
From: Titus von Koeller <9048635+Titus-von-Koeller@users.noreply.github.com>
Date: Mon, 30 Sep 2024 23:10:12 +0000
Subject: [PATCH 13/17] reduce the pkg size + build times for the preview
release
---
.github/workflows/python-package.yml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml
index f96dd995e..6a2b3f63e 100644
--- a/.github/workflows/python-package.yml
+++ b/.github/workflows/python-package.yml
@@ -58,6 +58,7 @@ jobs:
# This job matrix builds the CUDA versions of the libraries for platforms that support CUDA (Linux x64/aarch64 + Windows x64)
##
build-shared-libs-cuda:
+ if: github.ref_name != 'multi-backend-refactor'
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
@@ -148,7 +149,7 @@ jobs:
build-wheels:
needs:
- build-shared-libs
- - build-shared-libs-cuda
+ # - build-shared-libs-cuda reduce the pkg size + build times for the preview release
- build-shared-libs-rocm
strategy:
matrix:
From 5225ebea79305af8e02bf9368aa282bc62f9b195 Mon Sep 17 00:00:00 2001
From: Titus <9048635+Titus-von-Koeller@users.noreply.github.com>
Date: Mon, 30 Sep 2024 17:49:11 -0600
Subject: [PATCH 14/17] refine docs for multi-backend alpha release (#1380)
* refine docs for multi-backend alpha release
* docs: further tweaks to multi-backend alpha docs
* docs: further tweaks to multi-backend alpha docs
* docs: further tweaks to multi-backend alpha docs
* docs: add multi-backend feedback links
* docs: add request for contributions
* docs: small fixes
* docs: small fixes
* docs: add info about `main` continuous build
* docs: further tweaks to multi-backend alpha docs
* docs: further tweaks to multi-backend alpha docs
---
docs/source/installation.mdx | 224 ++++++++++++++++++++++++------
docs/source/non_cuda_backends.mdx | 3 +
2 files changed, 184 insertions(+), 43 deletions(-)
diff --git a/docs/source/installation.mdx b/docs/source/installation.mdx
index 2f82c199b..2ac56e03f 100644
--- a/docs/source/installation.mdx
+++ b/docs/source/installation.mdx
@@ -1,29 +1,45 @@
-# Installation
+# Installation Guide
-## CUDA
+Welcome to the installation guide for the `bitsandbytes` library! This document provides step-by-step instructions to install `bitsandbytes` across various platforms and hardware configurations. The library primarily supports CUDA-based GPUs, but the team is actively working on enabling support for additional backends like AMD ROCm, Intel, and Apple Silicon.
-bitsandbytes is only supported on CUDA GPUs for CUDA versions **11.0 - 12.5**. However, there's a multi-backend effort under way which is currently in alpha release, check [the respective section below in case you're interested to help us with early feedback](#multi-backend).
+> [!TIP]
+> For a high-level overview of backend support and compatibility, see the [Multi-backend Support](#multi-backend) section.
-The latest version of bitsandbytes builds on:
+## Table of Contents
-| OS | CUDA | Compiler |
-|---|---|---|
-| Linux | 11.7 - 12.3 | GCC 11.4 |
-| | 12.4+ | GCC 13.2 |
-| Windows | 11.7 - 12.4 | MSVC 19.38+ (VS2022 17.8.0+) |
+- [CUDA](#cuda)
+ - [Installation via PyPI](#cuda-pip)
+ - [Compile from Source](#cuda-compile)
+- [Multi-backend Support (Alpha Release)](#multi-backend)
+ - [Supported Backends](#multi-backend-supported-backends)
+ - [Pre-requisites](#multi-backend-pre-requisites)
+ - [Installation](#multi-backend-pip)
+ - [Compile from Source](#multi-backend-compile)
+- [PyTorch CUDA Versions](#pytorch-cuda-versions)
-> [!TIP]
-> MacOS support is still a work in progress! Subscribe to this [issue](https://github.com/TimDettmers/bitsandbytes/issues/1020) to get notified about discussions and to track the integration progress.
+## CUDA[[cuda]]
-For Linux systems, make sure your hardware meets the following requirements to use bitsandbytes features.
+`bitsandbytes` is currently only supported on CUDA GPUs for CUDA versions **11.0 - 12.5**. However, there's an ongoing multi-backend effort under development, which is currently in alpha. If you're interested in providing feedback or testing, check out [the multi-backend section below](#multi-backend).
-| **Feature** | **Hardware requirement** |
-|---|---|
-| LLM.int8() | NVIDIA Turing (RTX 20 series, T4) or Ampere (RTX 30 series, A4-A100) GPUs |
-| 8-bit optimizers/quantization | NVIDIA Kepler (GTX 780 or newer) |
+### Supported CUDA Configurations[[cuda-pip]]
+
+The latest version of `bitsandbytes` builds on the following configurations:
+
+| **OS** | **CUDA Version** | **Compiler** |
+|-------------|------------------|----------------------|
+| **Linux** | 11.7 - 12.3 | GCC 11.4 |
+| | 12.4+ | GCC 13.2 |
+| **Windows** | 11.7 - 12.4 | MSVC 19.38+ (VS2022) |
+
+For Linux systems, ensure your hardware meets the following requirements:
+
+| **Feature** | **Hardware Requirement** |
+|---------------------------------|--------------------------------------------------------------------|
+| LLM.int8() | NVIDIA Turing (RTX 20 series, T4) or Ampere (RTX 30 series, A4-A100) GPUs |
+| 8-bit optimizers/quantization | NVIDIA Kepler (GTX 780 or newer) |
> [!WARNING]
-> bitsandbytes >= 0.39.1 no longer includes Kepler binaries in pip installations. This requires manual compilation, and you should follow the general steps and use `cuda11x_nomatmul_kepler` for Kepler-targeted compilation.
+> `bitsandbytes >= 0.39.1` no longer includes Kepler binaries in pip installations. This requires [manual compilation using](#cuda-compile) the `cuda11x_nomatmul_kepler` configuration.
To install from PyPI.
@@ -31,14 +47,41 @@ To install from PyPI.
pip install bitsandbytes
```
-### Compile from source[[compile]]
+### `pip install` pre-built wheel from latest `main` commit
+
+If you would like to use new feature even before they are officially released and help us test them, feel free to install the wheel directly from our CI (*the wheel links will remain stable!*):
+
+
+
+
+```
+# Note, if you don't want to reinstall BNBs dependencies, append the `--no-deps` flag!
+pip install --force-reinstall 'https://github.com/bitsandbytes-foundation/bitsandbytes/releases/download/continuous-release_main/bitsandbytes-0.44.2.dev0-py3-none-manylinux_2_24_x86_64.whl'
+```
+
+
+
+
+```
+# Note, if you don't want to reinstall BNBs dependencies, append the `--no-deps` flag!
+pip install --force-reinstall 'https://github.com/bitsandbytes-foundation/bitsandbytes/releases/download/continuous-release_multi-backend-refactor/bitsandbytes-0.44.1.dev0-py3-none-macosx_13_1_arm64.whl'
+```
+
+
+
+### Compile from source[[cuda-compile]]
+
+> [!TIP]
+> Don't hesitate to compile from source! The process is pretty straight forward and resilient. This might be needed for older CUDA versions or other less common configurations, which we don't support out of the box due to package size.
-For Linux and Windows systems, you can compile bitsandbytes from source. Installing from source allows for more build options with different CMake configurations.
+For Linux and Windows systems, compiling from source allows you to customize the build configurations. See below for detailed platform-specific instructions (see the `CMakeLists.txt` if you want to check the specifics and explore some additional options):
-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:
+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:
```bash
apt-get install -y build-essential cmake
@@ -48,16 +91,16 @@ You should also install CUDA Toolkit by following the [NVIDIA CUDA Installation
Refer to the following table if you're using another CUDA Toolkit version.
-| CUDA Toolkit | GCC |
-|---|---|
-| >= 11.4.1 | >= 11 |
-| >= 12.0 | >= 12 |
-| >= 12.4 | >= 13 |
+| CUDA Toolkit | GCC |
+|--------------|-------|
+| >= 11.4.1 | >= 11 |
+| >= 12.0 | >= 12 |
+| >= 12.4 | >= 13 |
Now to install the bitsandbytes package from source, run the following commands:
```bash
-git clone https://github.com/TimDettmers/bitsandbytes.git && cd bitsandbytes/
+git clone https://github.com/bitsandbytes-foundation/bitsandbytes.git && cd bitsandbytes/
pip install -r requirements-dev.txt
cmake -DCOMPUTE_BACKEND=cuda -S .
make
@@ -81,7 +124,7 @@ Refer to the following table if you're using another CUDA Toolkit version.
| >= 11.6 | 19.30+ (VS2022) |
```bash
-git clone https://github.com/TimDettmers/bitsandbytes.git && cd bitsandbytes/
+git clone https://github.com/bitsandbytes-foundation/bitsandbytes.git && cd bitsandbytes/
pip install -r requirements-dev.txt
cmake -DCOMPUTE_BACKEND=cuda -S .
cmake --build . --config Release
@@ -93,7 +136,7 @@ Big thanks to [wkpark](https://github.com/wkpark), [Jamezo97](https://github.com
-### PyTorch CUDA versions
+### PyTorch CUDA versions[[pytorch-cuda-versions]]
Some bitsandbytes features may need a newer CUDA version than the one currently supported by PyTorch binaries from Conda and pip. In this case, you should follow these instructions to load a precompiled bitsandbytes binary.
@@ -105,7 +148,7 @@ Some bitsandbytes features may need a newer CUDA version than the one currently
Then locally install the CUDA version you need with this script from bitsandbytes:
```bash
-wget https://raw.githubusercontent.com/TimDettmers/bitsandbytes/main/install_cuda.sh
+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}
# EXPORT_TO_BASH in {0, 1} with 0=False and 1=True
@@ -134,28 +177,62 @@ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/YOUR_USERNAME/local/cuda-11.7
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.
-## Multi-backend[[multi-backend]]
+## Multi-backend Support (Alpha Release)[[multi-backend]]
> [!TIP]
-> This functionality is currently in preview and therefore not yet production-ready! Please reference [this guide](./non_cuda_backends) for more in-depth information about the different backends and their current status.
+> This functionality is currently in preview and not yet production-ready. We very much welcome community feedback, contributions and leadership on topics like Apple Silicon as well as other less common accellerators! For more information, see [this guide on multi-backend support](./non_cuda_backends).
+
+**Link to give us feedback** (bugs, install issues, perf results, requests, etc.)**:**
+
+
+
+
+[**Multi-backend refactor: Alpha release (AMD ROCm ONLY)**](https://github.com/bitsandbytes-foundation/bitsandbytes/discussions/1339)
+
+
+
+
+[**Multi-backend refactor: Alpha release (INTEL ONLY)**](https://github.com/bitsandbytes-foundation/bitsandbytes/discussions/1338)
+
+
+
-Please follow these steps to install bitsandbytes with device-specific backend support other than CUDA:
+[**Github Discussion space on coordinating the kickoff of MPS backend development**](https://github.com/bitsandbytes-foundation/bitsandbytes/discussions/1340)
-### Pip install the pre-built wheel (recommended for most)
+
+
-WIP (will be added in the coming days)
+### Supported Backends[[multi-backend-supported-backends]]
-### Compilation
+| **Backend** | **Supported Versions** | **Python versions** | **Architecture Support** | **Status** |
+|-------------|------------------------|---------------------------|-------------------------|------------|
+| **AMD ROCm** | 6.1+ | 3.10+ | minimum CDNA - `gfx90a`, RDNA - `gfx1100` | Alpha |
+| **Apple Silicon (MPS)** | WIP | 3.10+ | M1/M2 chips | Planned |
+| **Intel CPU** | v2.4.0+ (`ipex`) | 3.10+ | Intel CPU | Alpha |
+| **Intel GPU** | v2.4.0+ (`ipex`) | 3.10+ | Intel GPU | Experimental |
+
+For each supported backend, follow the respective instructions below:
+
+### Pre-requisites[[multi-backend-pre-requisites]]
+
+To use bitsandbytes non-CUDA backends, be sure to install:
+
+```
+pip install "transformers>=4.45.1"
+```
-#### AMD GPU
-
-bitsandbytes is fully supported from ROCm 6.1 onwards (currently in alpha release).
+> [!WARNING]
+> Pre-compiled binaries are only built for ROCm versions `6.1.0`/`6.1.1`/`6.1.2`/`6.2.0` and `gfx90a`, `gfx942`, `gfx1100` GPU architectures. [Find the pip install instructions here](#multi-backend-pip).
+>
+> Other supported versions that don't come with pre-compiled binaries [can be compiled for with these instructions](#multi-backend-compile).
+>
+> **Windows is not supported for the ROCm backend**; also not WSL2 to our knowledge.
> [!TIP]
-> If you would like to install ROCm and PyTorch on bare metal, skip Docker steps and refer to our official guides at [ROCm installation overview](https://rocm.docs.amd.com/projects/install-on-linux/en/latest/tutorial/install-overview.html#rocm-install-overview) and [Installing PyTorch for ROCm](https://rocm.docs.amd.com/projects/install-on-linux/en/latest/how-to/3rd-party/pytorch-install.html#using-wheels-package) (Step 3 of wheels build for quick installation). Please make sure to get PyTorch wheel for the installed ROCm version.
+> If you would like to install ROCm and PyTorch on bare metal, skip the Docker steps and refer to ROCm's official guides at [ROCm installation overview](https://rocm.docs.amd.com/projects/install-on-linux/en/latest/tutorial/install-overview.html#rocm-install-overview) and [Installing PyTorch for ROCm](https://rocm.docs.amd.com/projects/install-on-linux/en/latest/how-to/3rd-party/pytorch-install.html#using-wheels-package) (Step 3 of wheels build for quick installation). Special note: please make sure to get the respective ROCm-specific PyTorch wheel for the installed ROCm version, e.g. `https://download.pytorch.org/whl/nightly/rocm6.2/`!
```bash
# Create a docker container with latest ROCm image, which includes ROCm libraries
@@ -165,9 +242,70 @@ apt-get update && apt-get install -y git && cd home
# Install pytorch compatible with above ROCm version
pip install torch --index-url https://download.pytorch.org/whl/rocm6.1/
+```
-# Install bitsandbytes from PyPI
-# (This is supported on Ubuntu 22.04, Python 3.10, ROCm 6.1.0/6.1.1/6.1.2/6.2.0 and gpu arch - gfx90a, gfx942, gfx1100
+
+
+
+Compatible hardware and functioning `import intel_extension_for_pytorch as ipex` capable environment with Python `3.10` as the minimum requirement.
+
+Please refer to [the official Intel installations instructions](https://intel.github.io/intel-extension-for-pytorch/index.html#installation?platform=cpu&version=v2.4.0%2bcpu&os=linux%2fwsl2) for guidance on how to pip install the necessary `intel_extension_for_pytorch` dependency.
+
+
+
+
+> [!TIP]
+> Apple Silicon support is still a WIP. Please visit and write us in [this Github Discussion space on coordinating the kickoff of MPS backend development](https://github.com/bitsandbytes-foundation/bitsandbytes/discussions/1340) and coordinate a community-led effort to implement this backend.
+
+
+
+
+### Installation
+
+You can install the pre-built wheels for each backend, or compile from source for custom configurations.
+
+#### Pre-built Wheel Installation (recommended)[[multi-backend-pip]]
+
+
+
+
+```
+# Note, if you don't want to reinstall BNBs dependencies, append the `--no-deps` flag!
+pip install --force-reinstall 'https://github.com/bitsandbytes-foundation/bitsandbytes/releases/download/continuous-release_multi-backend-refactor/bitsandbytes-0.44.1.dev0-py3-none-manylinux_2_24_x86_64.whl'
+```
+
+
+
+
+```
+# Note, if you don't want to reinstall BNBs dependencies, append the `--no-deps` flag!
+pip install --force-reinstall 'https://github.com/bitsandbytes-foundation/bitsandbytes/releases/download/continuous-release_multi-backend-refactor/bitsandbytes-0.44.1.dev0-py3-none-win_amd64.whl'
+```
+
+
+
+
+> [!WARNING]
+> bitsandbytes does not yet support Apple Silicon / Metal with a dedicated backend. However, the build infrastructure is in place and the below pip install will eventually provide Apple Silicon support as it becomes available on the `multi-backend-refactor` branch based on community contributions.
+
+```
+# Note, if you don't want to reinstall BNBs dependencies, append the `--no-deps` flag!
+pip install --force-reinstall 'https://github.com/bitsandbytes-foundation/bitsandbytes/releases/download/continuous-release_multi-backend-refactor/bitsandbytes-0.44.1.dev0-py3-none-macosx_13_1_arm64.whl'
+```
+
+
+
+
+#### Compile from Source[[multi-backend-compile]]
+
+
+
+
+#### AMD GPU
+
+bitsandbytes is fully supported from ROCm 6.1 onwards (currently in alpha release).
+
+```bash
# Please install from source if your configuration doesn't match with these)
pip install bitsandbytes
@@ -195,10 +333,10 @@ pip install -e . # `-e` for "editable" install, when developing BNB (otherwise
Similar to the CUDA case, you can compile bitsandbytes from source for Linux and Windows systems.
-The below commands are for Linux. For installing on Windows, please adapt the below commands according to the same pattern as described [the section above on compiling from source under the Windows tab](#compile).
+The below commands are for Linux. For installing on Windows, please adapt the below commands according to the same pattern as described [the section above on compiling from source under the Windows tab](#cuda-compile).
```
-git clone --depth 1 -b multi-backend-refactor https://github.com/TimDettmers/bitsandbytes.git && cd bitsandbytes/
+git clone --depth 1 -b multi-backend-refactor https://github.com/bitsandbytes-foundation/bitsandbytes.git && cd bitsandbytes/
pip install intel_extension_for_pytorch
pip install -r requirements-dev.txt
cmake -DCOMPUTE_BACKEND=cpu -S .
diff --git a/docs/source/non_cuda_backends.mdx b/docs/source/non_cuda_backends.mdx
index fc7c6ac27..728606b7b 100644
--- a/docs/source/non_cuda_backends.mdx
+++ b/docs/source/non_cuda_backends.mdx
@@ -1,5 +1,8 @@
# Multi-backend support (non-CUDA backends)
+> [!Tip]
+> If you feel these docs need some additional info, please consider submitting a PR or respectfully request the missing info in one of the below mentioned Github discussion spaces.
+
As part of a recent refactoring effort, we will soon offer official multi-backend support. Currently, this feature is available in a preview alpha release, allowing us to gather early feedback from users to improve the functionality and identify any bugs.
At present, the Intel CPU and AMD ROCm backends are considered fully functional. The Intel XPU backend has limited functionality and is less mature.
From e6cc10934c72f1ddc99944331da6a95673a605d6 Mon Sep 17 00:00:00 2001
From: Titus von Koeller <9048635+Titus-von-Koeller@users.noreply.github.com>
Date: Tue, 1 Oct 2024 14:01:09 +0000
Subject: [PATCH 15/17] docs: remove 2 obsolete lines
---
docs/source/installation.mdx | 3 ---
1 file changed, 3 deletions(-)
diff --git a/docs/source/installation.mdx b/docs/source/installation.mdx
index 2ac56e03f..609865436 100644
--- a/docs/source/installation.mdx
+++ b/docs/source/installation.mdx
@@ -306,9 +306,6 @@ pip install --force-reinstall 'https://github.com/bitsandbytes-foundation/bitsan
bitsandbytes is fully supported from ROCm 6.1 onwards (currently in alpha release).
```bash
-# Please install from source if your configuration doesn't match with these)
-pip install bitsandbytes
-
# Install bitsandbytes from source
# Clone bitsandbytes repo, ROCm backend is currently enabled on multi-backend-refactor branch
git clone --depth 1 -b multi-backend-refactor https://github.com/bitsandbytes-foundation/bitsandbytes.git && cd bitsandbytes/
From cd3cb6812dd4f2579f04ff51efa0662cc0467c63 Mon Sep 17 00:00:00 2001
From: pnunna93 <104791500+pnunna93@users.noreply.github.com>
Date: Wed, 16 Oct 2024 15:51:32 -0500
Subject: [PATCH 16/17] Remove depth option in installation steps (#1395)
* Add build job for rocm
* Add rocm build script
* Copy shared obj file into output_dir
* upload build artifacts and enable wheels build
* Remove cuda build temporarily
* Add ROCm version to .so filename
* Add rocm_version to whls build
* Revert "Remove cuda build temporarily"
This reverts commit 1413c5f3a2aed51140b86daa8ee9283c67cce738.
* Add rocm_version env var
* Remove thrush header files
* Print node info
* print cuda node info
* Revert "print cuda node info"
This reverts commit cdb209a2eb896d9c4166f53e9b2aa580c10e42c0.
* Revert "Print node info"
This reverts commit 7e9a65c33f66fffcb14ee2438170718777c06022.
* Add rocm arch to compile command
* Rename .so files to rocm
* Update default gpu arch
* Skip cpu based igemmlt int tests on ROCm
* Update Documentation
* Update upstream repo name
* Update docs
* Update string format
Co-authored-by: Aarni Koskela
* Remove pre-release option for torch install
* Update pytorch install path
Co-authored-by: Titus <9048635+Titus-von-Koeller@users.noreply.github.com>
* Add messages for Heuristics error
* Remove toolcache for disk space
* print disk usage
* Clean disk space for linux
* Fix for ubuntu
* Add sudo for apt clean
* Update clean up disk list
* remove disk usage print
* Add BNB_BACKEND variable
* Update diagnostic functions for ROCm
* Fix tuple error
* Fix library detection bug for recursive and symlink cases
* fix pre-commit errors
* Remove recursive path lib search
* Create function for runtime lib patterns
* Update logger format
Co-authored-by: Aarni Koskela
* Update error reporting
Co-authored-by: Aarni Koskela
* Remove commented code
Co-authored-by: Aarni Koskela
* Update error reporting
Co-authored-by: Aarni Koskela
* Update error reporting
* Create hip diagnostics functions
* Fix Typo
* Fix pre-commit checks
* Enable 6.2 build
* Skip gemv 4 bit cpu test
* Update documentation for 6.2.0 pip install
* Update README for default branch change
* Fix typo
* Sync README with upstream
* Remove depth
---------
Co-authored-by: Aarni Koskela
Co-authored-by: Titus <9048635+Titus-von-Koeller@users.noreply.github.com>
Co-authored-by: Aswin John Mathews <81309834+amathews-amd@users.noreply.github.com>
Co-authored-by: root
---
docs/source/installation.mdx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/source/installation.mdx b/docs/source/installation.mdx
index 609865436..d1acb2cd6 100644
--- a/docs/source/installation.mdx
+++ b/docs/source/installation.mdx
@@ -308,7 +308,7 @@ bitsandbytes is fully supported from ROCm 6.1 onwards (currently in alpha releas
```bash
# Install bitsandbytes from source
# Clone bitsandbytes repo, ROCm backend is currently enabled on multi-backend-refactor branch
-git clone --depth 1 -b multi-backend-refactor https://github.com/bitsandbytes-foundation/bitsandbytes.git && cd bitsandbytes/
+git clone -b multi-backend-refactor https://github.com/bitsandbytes-foundation/bitsandbytes.git && cd bitsandbytes/
# Install dependencies
pip install -r requirements-dev.txt
From 6a93812211109ae1c196d4544e0eb375c1b29d90 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
Date: Tue, 29 Oct 2024 16:27:08 +0000
Subject: [PATCH 17/17] sync instructions
---
docs/source/installation.mdx | 7 -------
1 file changed, 7 deletions(-)
diff --git a/docs/source/installation.mdx b/docs/source/installation.mdx
index 7fb4da18b..d1acb2cd6 100644
--- a/docs/source/installation.mdx
+++ b/docs/source/installation.mdx
@@ -244,15 +244,8 @@ apt-get update && apt-get install -y git && cd home
pip install torch --index-url https://download.pytorch.org/whl/rocm6.1/
```
-<<<<<<< HEAD
-# Install bitsandbytes from PyPI
-# (This is supported on Ubuntu 22.04, Python 3.10, ROCm 6.1.0/6.1.1/6.1.2/6.2.0 and gpu arch - gfx90a, gfx942, gfx1100
-# Please install from source if your configuration doesn't match with these)
-pip install bitsandbytes
-=======
->>>>>>> origin/upstream_sync
Compatible hardware and functioning `import intel_extension_for_pytorch as ipex` capable environment with Python `3.10` as the minimum requirement.