Skip to content

Commit 4dc08e6

Browse files
Enable publishing of macOS wheel (#1818)
* Enable publishing of macOS wheel * Update macOS target to 14.0+ * Update doc
1 parent 177494c commit 4dc08e6

File tree

5 files changed

+18
-13
lines changed

5 files changed

+18
-13
lines changed

.github/scripts/set_platform_tag.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def get_platform_tag(architecture):
99
if system == "Linux":
1010
tag = "manylinux_2_24_x86_64" if architecture == "x86_64" else "manylinux_2_24_aarch64"
1111
elif system == "Darwin":
12-
tag = "macosx_13_1_x86_64" if architecture == "x86_64" else "macosx_13_1_arm64"
12+
tag = "macosx_14_0_arm64"
1313
elif system == "Windows":
1414
tag = "win_amd64" if architecture == "x86_64" else "win_arm64"
1515
else:

.github/workflows/python-package.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,7 @@ jobs:
266266
# `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`
267267
STABLE_PLACEHOLDER_VERSION="1.33.7.preview"
268268
269-
# exclude macos wheels for now
270-
find tmp/ -type f -name '*.whl' ! -name '*macos*' -print0 | while IFS= read -r -d '' wheel; do
269+
find tmp/ -type f -name '*.whl' -print0 | while IFS= read -r -d '' wheel; do
271270
wheel_filename=$(basename "$wheel")
272271
273272
# Strip off the original version
@@ -318,9 +317,11 @@ jobs:
318317
if [[ "$fname" == *"manylinux_2_24_x86_64"* ]]; then
319318
echo "### Linux (x86_64)" >> body.md
320319
elif [[ "$fname" == *"manylinux_2_24_aarch64"* ]]; then
321-
echo "### Linux (ARM/aarch64)" >> body.md
320+
echo "### Linux (aarch64)" >> body.md
322321
elif [[ "$fname" == *"win_amd64"* ]]; then
323322
echo "### Windows (x86_64)" >> body.md
323+
elif [[ "$fname" == *"macosx"* ]]; then
324+
echo "### macOS 14+ (arm64)" >> body.md
324325
else
325326
echo "### Other platform" >> body.md
326327
fi
@@ -340,7 +341,7 @@ jobs:
340341
> pip install https://.../bitsandbytes-1.33.7-preview-py3-none-manylinux_2_24_x86_64.whl
341342
Collecting bitsandbytes==1.33.7rc0
342343
...
343-
Successfully installed bitsandbytes-0.46.0.dev0
344+
Successfully installed bitsandbytes-0.49.0.dev0
344345
```
345346
ENDOFMARKDOWN
346347
@@ -405,9 +406,6 @@ jobs:
405406
pattern: "bdist_wheel_*"
406407
merge-multiple: true
407408

408-
- name: Remove macOS wheels
409-
run: rm dist/*macos*
410-
411409
- name: Publish to PyPI
412410
uses: pypa/gh-action-pypi-publish@release/v1
413411
with:

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ set_property(CACHE COMPUTE_BACKEND PROPERTY STRINGS cpu cuda hip mps xpu)
3737
option(PTXAS_VERBOSE "Pass through -v flag to PTX Assembler" OFF)
3838

3939
if(APPLE)
40-
set(CMAKE_OSX_DEPLOYMENT_TARGET 13.1)
40+
set(CMAKE_OSX_DEPLOYMENT_TARGET 14.0)
4141
endif()
4242

4343
set(BNB_OUTPUT_NAME "bitsandbytes")

docs/source/installation.mdx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33
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.
44

5-
We provide official support for NVIDIA GPUs, CPUs, Intel XPUs, and Intel Gaudi platforms. We also have experimental support for
6-
additional platforms such as AMD ROCm.
5+
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.
76

87
## Table of Contents
98

@@ -100,7 +99,7 @@ pip install -e . # `-e` for "editable" install, when developing BNB (otherwise
10099

101100
Compilation from source on Windows systems require Visual Studio with C++ support as well as an installation of the CUDA Toolkit.
102101

103-
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**.
102+
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**.
104103

105104
```bash
106105
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
163162
| **Linux x86-64** | GCC 11.4 | AVX2 |
164163
| **Linux aarch64** | GCC 11.4 | |
165164
| **Windows x86-64** | MSVC 19.43+ (VS2022) | AVX2 |
165+
| **macOS arm64** | Apple Clang 17 | |
166166

167167
The Linux build has a minimum glibc version of 2.24.
168168

@@ -243,4 +243,11 @@ pip install --force-reinstall https://github.com/bitsandbytes-foundation/bitsand
243243
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
244244
```
245245
</hfoption>
246+
<hfoption id="macOS">
247+
248+
```bash
249+
# Note: if you don't want to reinstall our dependencies, append the `--no-deps` flag!
250+
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
251+
```
252+
</hfoption>
246253
</hfoptions>

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ classifiers = [
3131
"Intended Audience :: Developers",
3232
"Intended Audience :: Science/Research",
3333
"Operating System :: POSIX :: Linux",
34-
# "Operating System :: MacOS",
34+
"Operating System :: MacOS",
3535
"Operating System :: Microsoft :: Windows",
3636
"Programming Language :: C++",
3737
"Programming Language :: Python :: Implementation :: CPython",

0 commit comments

Comments
 (0)