From fd63b2b7f39210a52c559d9ae4ae08b27a0a1417 Mon Sep 17 00:00:00 2001 From: Matthew Douglas <38992547+matthewdouglas@users.noreply.github.com> Date: Fri, 14 Nov 2025 11:16:58 -0500 Subject: [PATCH 1/2] ROCm: Add build for ROCm 7.1 --- .github/scripts/build-rocm.sh | 4 ++-- .github/workflows/python-package.yml | 2 +- docs/source/installation.mdx | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/scripts/build-rocm.sh b/.github/scripts/build-rocm.sh index d2cb950d1..4d69aa486 100644 --- a/.github/scripts/build-rocm.sh +++ b/.github/scripts/build-rocm.sh @@ -7,10 +7,10 @@ set -xeuo pipefail bnb_rocm_arch="gfx90a;gfx942;gfx1100;gfx1101" # ROCm 6.4+ - Add gfx1200/gfx1201. Note we assume >=6.4.1. -[[ "${rocm_version}" == 6.4.* || "${rocm_version}" == 7.*.* ]] && bnb_rocm_arch="${bnb_rocm_arch};gfx1200;gfx1201" +[[ "${rocm_version}" == 6.4.* || "${rocm_version}" == 7.* ]] && bnb_rocm_arch="${bnb_rocm_arch};gfx1200;gfx1201" # ROCm 7.0+ - Add gfx950 -[[ "${rocm_version}" == 7.*.* ]] && bnb_rocm_arch="${bnb_rocm_arch};gfx950" +[[ "${rocm_version}" == 7.* ]] && bnb_rocm_arch="${bnb_rocm_arch};gfx950" if [ "${build_os:0:6}" == ubuntu ]; then image=rocm/dev-ubuntu-22.04:${rocm_version}-complete diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index e9dce87bf..90e196237 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -137,7 +137,7 @@ jobs: matrix: os: [ubuntu-22.04] arch: [x86_64] - rocm_version: ["6.2.4", "6.3.4", "6.4.4", "7.0.2"] + rocm_version: ["6.2.4", "6.3.4", "6.4.4", "7.0.2", "7.1"] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 diff --git a/docs/source/installation.mdx b/docs/source/installation.mdx index c125eff48..85c43e4b6 100644 --- a/docs/source/installation.mdx +++ b/docs/source/installation.mdx @@ -196,6 +196,7 @@ The currently distributed preview `bitsandbytes` are built with the following co | **Linux x86-64** | 6.3.4 | CDNA: gfx90a, gfx942 / RDNA: gfx1100, gfx1101 | **Linux x86-64** | 6.4.4 | CDNA: gfx90a, gfx942 / RDNA: gfx1100, gfx1101, gfx1200, gfx1201 | **Linux x86-64** | 7.0.2 | CDNA: gfx90a, gfx942, gfx950 / RDNA: gfx1100 / gfx1101 / gfx1200 / gfx1201 +| **Linux x86-64** | 7.1.0 | CDNA: gfx90a, gfx942, gfx950 / RDNA: gfx1100 / gfx1101 / gfx1200 / gfx1201 **Windows is not currently supported.** From 20ea209b35cf519c0a00f093cb2606e44b8f3c40 Mon Sep 17 00:00:00 2001 From: Matthew Douglas <38992547+matthewdouglas@users.noreply.github.com> Date: Fri, 14 Nov 2025 12:05:21 -0500 Subject: [PATCH 2/2] Use newer CMake from PyPI for ROCm build --- .github/scripts/build-rocm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/build-rocm.sh b/.github/scripts/build-rocm.sh index 4d69aa486..1eb4a9f46 100644 --- a/.github/scripts/build-rocm.sh +++ b/.github/scripts/build-rocm.sh @@ -18,7 +18,7 @@ if [ "${build_os:0:6}" == ubuntu ]; then docker run --rm --platform "linux/$build_arch" -i \ -w /src -v "$PWD:/src" "$image" sh -c \ "apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends cmake \ + && pip install cmake==3.31.6 \ && cmake -DCOMPUTE_BACKEND=hip -DBNB_ROCM_ARCH=\"${bnb_rocm_arch}\" . \ && cmake --build ." fi