66 branches : [main]
77 paths :
88 - " .github/workflows/python-package.yml"
9+ - " .github/scripts/**"
910 - " bitsandbytes/**"
1011 - " csrc/**"
1112 - " include/**"
1213 - " tests/**"
1314 - " CMakeLists.txt"
14- - " requirements*.txt "
15+ - " MANIFEST.in "
1516 - " setup.py"
1617 - " pyproject.toml"
1718 release :
@@ -25,19 +26,19 @@ concurrency:
2526
2627jobs :
2728 # #
28- # This job matrix builds the non-CUDA versions of the libraries for all supported platforms.
29+ # This job matrix builds the CPU versions of the libraries for all supported platforms.
2930 # #
30- build-shared-libs :
31+ build-cpu :
3132 strategy :
3233 matrix :
3334 include :
3435 - os : ubuntu-22.04
3536 arch : x86_64
3637 - os : ubuntu-22.04-arm
3738 arch : aarch64
38- - os : windows-latest
39+ - os : windows-2025
3940 arch : x86_64
40- - os : macos-latest
41+ - os : macos-15
4142 arch : arm64
4243 runs-on : ${{ matrix.os }}
4344 steps :
@@ -56,37 +57,39 @@ jobs:
5657 name : shared_library_${{ matrix.os }}_${{ matrix.arch }}
5758 path : output/*
5859 retention-days : 7
60+
5961 # #
6062 # This job matrix builds the CUDA versions of the libraries for platforms that support CUDA (Linux x64/aarch64 + Windows x64)
6163 # #
62- build-shared-libs- cuda :
64+ build-cuda :
6365 strategy :
6466 fail-fast : false
6567 matrix :
66- os : [ubuntu-22.04, ubuntu-22.04-arm, windows-latest ]
68+ os : [ubuntu-22.04, ubuntu-22.04-arm, windows-2025 ]
6769 include :
6870 - os : ubuntu-22.04
6971 arch : x86_64
7072 - os : ubuntu-22.04-arm
7173 arch : aarch64
72- - os : windows-latest
74+ - os : windows-2025
7375 arch : x86_64
7476 cuda_version :
75- ["11.8.0", "12.0.1", "12.1.1", "12.2.2", "12.3.2", "12.4.1", "12.5.1", "12.6.3", "12.8.1", "12.9.1"]
77+ ["11.8.0", "12.0.1", "12.1.1", "12.2.2", "12.3.2", "12.4.1", "12.5.1", "12.6.3", "12.8.1", "12.9.1", "13.0.2" ]
7678 runs-on : ${{ matrix.os }}
7779 steps :
7880 - uses : actions/checkout@v4
7981 # Windows: We install Cuda on the agent (slow)
80- - uses : Jimver/cuda-toolkit@c35baa1a18fd1fc9dcf47c5bd839bf30559c0bc3 # v0.2.24
82+ - uses : Jimver/cuda-toolkit@6008063726ffe3309d1b22e413d9e88fed91a2f2 # v0.2.29
8183 if : startsWith(matrix.os, 'windows')
8284 id : cuda-toolkit
8385 with :
84- # Temporary: Use CUDA 12.9.0 for Windows until 12.9.1 is supported with this action.
85- cuda : ${{ matrix.cuda_version == '12.9.1' && '12.9.0' || matrix.cuda_version }}
86+ cuda : ${{ matrix.cuda_version }}
8687 method : " network"
87- sub-packages : ' ["nvcc","cudart","cusparse","cublas","thrust","nvrtc_dev","cublas_dev","cusparse_dev"] '
88- linux-local-args : ' ["--toolkit"] '
88+ # The "crt" "nvvm" and "nvptxcompiler" components are added for CUDA 13.
89+ sub-packages : ${{ format( '["nvcc"{0},"cudart","cusparse","cublas","thrust","cublas_dev","cusparse_dev"]', startsWith(matrix.cuda_version, '13.') && ',"crt","nvvm","nvptxcompiler"' || '') }}
8990 use-github-cache : false
91+ use-local-cache : false
92+ log-file-suffix : ${{matrix.os}}-${{matrix.cuda_version}}.txt
9093 - name : Setup MSVC
9194 if : startsWith(matrix.os, 'windows')
9295 uses : ilammy/msvc-dev-cmd@v1.13.0 # to use cl
@@ -103,37 +106,56 @@ jobs:
103106 path : output/*
104107 retention-days : 7
105108
106- build-shared-libs-rocm :
109+ build-xpu :
110+ strategy :
111+ matrix :
112+ os : [ubuntu-22.04, windows-2025]
113+ runs-on : ${{ matrix.os }}
114+ steps :
115+ - uses : actions/checkout@v4
116+ - name : Build C++ (Linux)
117+ if : runner.os == 'Linux'
118+ run : bash .github/scripts/build-xpu.sh
119+ env :
120+ build_os : ${{ matrix.os }}
121+ - name : Build C++ (Windows)
122+ if : runner.os == 'Windows'
123+ run : .github/scripts/build-xpu-windows.bat
124+ shell : cmd
125+ env :
126+ build_os : ${{ matrix.os }}
127+ - name : Upload build artifact
128+ uses : actions/upload-artifact@v4
129+ with :
130+ name : shared_library_xpu_${{ matrix.os }}_x86_64
131+ path : output/*
132+ retention-days : 7
133+
134+ build-rocm :
107135 strategy :
108136 matrix :
109137 os : [ubuntu-22.04]
110138 arch : [x86_64]
111- rocm_version :
112- ["6.1.2", "6.2.4", "6.3.2"]
139+ rocm_version : ["6.2.4", "6.3.4", "6.4.4", "7.0.2", "7.1", "7.2"]
113140 runs-on : ${{ matrix.os }}
114141 steps :
115142 - uses : actions/checkout@v4
116- - name : Set up Docker multiarch
117- uses : docker/setup-qemu-action@v3
118143 - name : Clean up disk space
119144 run : |
145+ echo "Disk space before cleanup:"
146+ df -h
147+
148+ # These are the biggest disk space hogs.
120149 sudo rm -rf \
121- /usr/share/dotnet \
122- /opt/ghc \
123- "/usr/local/share/boost" \
124- "$AGENT_TOOLSDIRECTORY" \
125- /opt/hostedtoolcache \
126- /opt/google/chrome \
127- /opt/microsoft/msedge \
128- /opt/microsoft/powershell \
129- /opt/pipx \
130- /usr/lib/mono \
131- /usr/local/julia* \
132- /usr/local/lib/android \
133- /usr/local/lib/node_modules \
134- /usr/local/share/chromium \
135- /usr/local/share/powershell \
136- /usr/share/swift
150+ /opt/hostedtoolcache/CodeQL \
151+ /usr/lib/dotnet \
152+ /usr/lib/jvm \
153+ /usr/local/.ghcup \
154+ /usr/local/lib/android \
155+ /usr/share/swift
156+
157+ echo "Disk space after cleanup:"
158+ df -h
137159 - name : Build C++
138160 run : bash .github/scripts/build-rocm.sh
139161 env :
@@ -148,24 +170,28 @@ jobs:
148170 retention-days : 7
149171
150172 build-wheels :
173+ env :
174+ # Skip rebuilding the CPU library when building the wheels.
175+ BNB_SKIP_CMAKE : 1
151176 needs :
152- - build-shared-libs
153- - build-shared-libs-cuda
154- - build-shared-libs-rocm
177+ - build-cpu
178+ - build-cuda
179+ - build-rocm
180+ - build-xpu
155181 strategy :
156182 matrix :
157- os : [ubuntu-22.04, ubuntu-22.04-arm, windows-latest , macos-latest ]
183+ os : [ubuntu-22.04, ubuntu-22.04-arm, windows-2025 , macos-15 ]
158184 include :
159185 - os : ubuntu-22.04
160186 arch : x86_64
161187 - os : ubuntu-22.04-arm
162188 arch : aarch64
163- - os : windows-latest
189+ - os : windows-2025
164190 arch : x86_64
165- - os : macos-latest
191+ - os : macos-15
166192 arch : arm64
167193 # The specific Python version is irrelevant in this context as we are only packaging non-C extension
168- # code. This ensures compatibility across Python versions, including Python 3.9, as compatibility is
194+ # code. This ensures compatibility across Python versions, as compatibility is
169195 # dictated by the packaged code itself, not the Python version used for packaging.
170196 python-version : ["3.10"]
171197 runs-on : ${{ matrix.os }}
@@ -239,8 +265,7 @@ jobs:
239265 # `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`
240266 STABLE_PLACEHOLDER_VERSION="1.33.7.preview"
241267
242- # exclude macos wheels for now
243- find tmp/ -type f -name '*.whl' ! -name '*macos*' -print0 | while IFS= read -r -d '' wheel; do
268+ find tmp/ -type f -name '*.whl' -print0 | while IFS= read -r -d '' wheel; do
244269 wheel_filename=$(basename "$wheel")
245270
246271 # Strip off the original version
@@ -291,9 +316,11 @@ jobs:
291316 if [[ "$fname" == *"manylinux_2_24_x86_64"* ]]; then
292317 echo "### Linux (x86_64)" >> body.md
293318 elif [[ "$fname" == *"manylinux_2_24_aarch64"* ]]; then
294- echo "### Linux (ARM/ aarch64)" >> body.md
319+ echo "### Linux (aarch64)" >> body.md
295320 elif [[ "$fname" == *"win_amd64"* ]]; then
296321 echo "### Windows (x86_64)" >> body.md
322+ elif [[ "$fname" == *"macosx"* ]]; then
323+ echo "### macOS 14+ (arm64)" >> body.md
297324 else
298325 echo "### Other platform" >> body.md
299326 fi
@@ -313,7 +340,7 @@ jobs:
313340 > pip install https://.../bitsandbytes-1.33.7-preview-py3-none-manylinux_2_24_x86_64.whl
314341 Collecting bitsandbytes==1.33.7rc0
315342 ...
316- Successfully installed bitsandbytes-0.46 .0.dev0
343+ Successfully installed bitsandbytes-0.49 .0.dev0
317344 ```
318345 ENDOFMARKDOWN
319346
@@ -378,9 +405,6 @@ jobs:
378405 pattern : " bdist_wheel_*"
379406 merge-multiple : true
380407
381- - name : Remove macOS wheels
382- run : rm dist/*macos*
383-
384408 - name : Publish to PyPI
385409 uses : pypa/gh-action-pypi-publish@release/v1
386410 with :
0 commit comments