From 867fe575f1a43a516b3c6e433b0f179ed4e1145f Mon Sep 17 00:00:00 2001 From: Matthew Douglas <38992547+matthewdouglas@users.noreply.github.com> Date: Tue, 2 Dec 2025 14:28:47 -0500 Subject: [PATCH 1/3] Enable publishing of macOS wheel --- .github/scripts/set_platform_tag.py | 2 +- .github/workflows/python-package.yml | 12 +++++------- pyproject.toml | 2 +- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/scripts/set_platform_tag.py b/.github/scripts/set_platform_tag.py index c82077074..1ffeeec9d 100644 --- a/.github/scripts/set_platform_tag.py +++ b/.github/scripts/set_platform_tag.py @@ -9,7 +9,7 @@ def get_platform_tag(architecture): if system == "Linux": tag = "manylinux_2_24_x86_64" if architecture == "x86_64" else "manylinux_2_24_aarch64" elif system == "Darwin": - tag = "macosx_13_1_x86_64" if architecture == "x86_64" else "macosx_13_1_arm64" + tag = "macosx_14_0_arm64" elif system == "Windows": tag = "win_amd64" if architecture == "x86_64" else "win_arm64" else: diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 90e196237..46e210b39 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -266,8 +266,7 @@ jobs: # `pip install https://github.com/bitsandbytes-foundation/bitsandbytes/releases/download/continuous-release_main/bitsandbytes-1.33.7.preview-py3-none-manylinux_2_24_x86_64.whl` STABLE_PLACEHOLDER_VERSION="1.33.7.preview" - # exclude macos wheels for now - find tmp/ -type f -name '*.whl' ! -name '*macos*' -print0 | while IFS= read -r -d '' wheel; do + find tmp/ -type f -name '*.whl' -print0 | while IFS= read -r -d '' wheel; do wheel_filename=$(basename "$wheel") # Strip off the original version @@ -318,9 +317,11 @@ jobs: if [[ "$fname" == *"manylinux_2_24_x86_64"* ]]; then echo "### Linux (x86_64)" >> body.md elif [[ "$fname" == *"manylinux_2_24_aarch64"* ]]; then - echo "### Linux (ARM/aarch64)" >> body.md + echo "### Linux (aarch64)" >> body.md elif [[ "$fname" == *"win_amd64"* ]]; then echo "### Windows (x86_64)" >> body.md + elif [[ "$fname" == *"macosx"* ]]; then + echo "### macOS 14+ (arm64)" >> body.md else echo "### Other platform" >> body.md fi @@ -340,7 +341,7 @@ jobs: > pip install https://.../bitsandbytes-1.33.7-preview-py3-none-manylinux_2_24_x86_64.whl Collecting bitsandbytes==1.33.7rc0 ... - Successfully installed bitsandbytes-0.46.0.dev0 + Successfully installed bitsandbytes-0.49.0.dev0 ``` ENDOFMARKDOWN @@ -405,9 +406,6 @@ jobs: pattern: "bdist_wheel_*" merge-multiple: true - - name: Remove macOS wheels - run: rm dist/*macos* - - name: Publish to PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: diff --git a/pyproject.toml b/pyproject.toml index 4f807e04e..65f9314c5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,7 +31,7 @@ classifiers = [ "Intended Audience :: Developers", "Intended Audience :: Science/Research", "Operating System :: POSIX :: Linux", - # "Operating System :: MacOS", + "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", "Programming Language :: C++", "Programming Language :: Python :: Implementation :: CPython", From dff22fa6b79c26fbc01df71f02e2a0e95b738317 Mon Sep 17 00:00:00 2001 From: Matthew Douglas <38992547+matthewdouglas@users.noreply.github.com> Date: Tue, 2 Dec 2025 14:37:12 -0500 Subject: [PATCH 2/3] Update macOS target to 14.0+ --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7d126d488..5f451478c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,7 +37,7 @@ set_property(CACHE COMPUTE_BACKEND PROPERTY STRINGS cpu cuda hip mps xpu) option(PTXAS_VERBOSE "Pass through -v flag to PTX Assembler" OFF) if(APPLE) - set(CMAKE_OSX_DEPLOYMENT_TARGET 13.1) + set(CMAKE_OSX_DEPLOYMENT_TARGET 14.0) endif() set(BNB_OUTPUT_NAME "bitsandbytes") From 17e27772cc158c520033278711e5aaa16c385d9d Mon Sep 17 00:00:00 2001 From: Matthew Douglas <38992547+matthewdouglas@users.noreply.github.com> Date: Tue, 2 Dec 2025 14:54:33 -0500 Subject: [PATCH 3/3] Update doc --- docs/source/installation.mdx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/source/installation.mdx b/docs/source/installation.mdx index 85c43e4b6..0686373f8 100644 --- a/docs/source/installation.mdx +++ b/docs/source/installation.mdx @@ -2,8 +2,7 @@ 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. -We provide official support for NVIDIA GPUs, CPUs, Intel XPUs, and Intel Gaudi platforms. We also have experimental support for -additional platforms such as AMD ROCm. +We provide official support for NVIDIA GPUs, CPUs, Intel XPUs, and Intel Gaudi. We also have experimental support for additional platforms such as AMD ROCm and Apple Silicon. ## Table of Contents @@ -100,7 +99,7 @@ pip install -e . # `-e` for "editable" install, when developing BNB (otherwise Compilation from source on Windows systems require Visual Studio with C++ support as well as an installation of the CUDA Toolkit. -To compile from source, you need CMake >= **3.22.1** and Python >= **3.9** 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. The current minimum supported CUDA Toolkit version that we support is **11.8**. +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. The current minimum supported CUDA Toolkit version that we support is **11.8**. ```bash git clone https://github.com/bitsandbytes-foundation/bitsandbytes.git && cd bitsandbytes/ @@ -163,6 +162,7 @@ The currently distributed `bitsandbytes` packages are built with the following c | **Linux x86-64** | GCC 11.4 | AVX2 | | **Linux aarch64** | GCC 11.4 | | | **Windows x86-64** | MSVC 19.43+ (VS2022) | AVX2 | +| **macOS arm64** | Apple Clang 17 | | The Linux build has a minimum glibc version of 2.24. @@ -243,4 +243,11 @@ pip install --force-reinstall https://github.com/bitsandbytes-foundation/bitsand pip install --force-reinstall https://github.com/bitsandbytes-foundation/bitsandbytes/releases/download/continuous-release_main/bitsandbytes-1.33.7.preview-py3-none-win_amd64.whl ``` + + +```bash +# Note: if you don't want to reinstall our dependencies, append the `--no-deps` flag! +pip install --force-reinstall https://github.com/bitsandbytes-foundation/bitsandbytes/releases/download/continuous-release_main/bitsandbytes-1.33.7.preview-py3-none-macosx_14_0_arm64.whl +``` +