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,40 @@ 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.1" ]
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 : N-Storm /cuda-toolkit@d68ba29a800229200a2c3f572f9e816d7f67cdb4 # v0.2.24m
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+ # Temporary: Use CUDA 13.0 .0 for Windows until 13.0 .1 is supported with this action.
87+ cuda : ${{ matrix.cuda_version == '13.0 .1' && '13.0 .0' || matrix.cuda_version }}
8688 method : " network"
87- sub-packages : ' ["nvcc","cudart","cusparse","cublas","thrust","nvrtc_dev","cublas_dev","cusparse_dev"] '
88- linux-local-args : ' ["--toolkit"] '
89+ # The "crt" "nvvm" and "nvptxcompiler" components are added for CUDA 13.
90+ sub-packages : ${{ format( '["nvcc"{0},"cudart","cusparse","cublas","thrust","cublas_dev","cusparse_dev"]', startsWith(matrix.cuda_version, '13.') && ',"crt","nvvm","nvptxcompiler"' || '') }}
8991 use-github-cache : false
92+ use-local-cache : false
93+ log-file-suffix : ${{matrix.os}}-${{matrix.cuda_version}}.txt
9094 - name : Setup MSVC
9195 if : startsWith(matrix.os, 'windows')
9296 uses :
ilammy/[email protected] # to use cl @@ -103,37 +107,56 @@ jobs:
103107 path : output/*
104108 retention-days : 7
105109
106- build-shared-libs-rocm :
110+ build-xpu :
111+ strategy :
112+ matrix :
113+ os : [ubuntu-22.04, windows-2025]
114+ runs-on : ${{ matrix.os }}
115+ steps :
116+ - uses : actions/checkout@v4
117+ - name : Build C++ (Linux)
118+ if : runner.os == 'Linux'
119+ run : bash .github/scripts/build-xpu.sh
120+ env :
121+ build_os : ${{ matrix.os }}
122+ - name : Build C++ (Windows)
123+ if : runner.os == 'Windows'
124+ run : .github/scripts/build-xpu-windows.bat
125+ shell : cmd
126+ env :
127+ build_os : ${{ matrix.os }}
128+ - name : Upload build artifact
129+ uses : actions/upload-artifact@v4
130+ with :
131+ name : shared_library_xpu_${{ matrix.os }}_x86_64
132+ path : output/*
133+ retention-days : 7
134+
135+ build-rocm :
107136 strategy :
108137 matrix :
109138 os : [ubuntu-22.04]
110139 arch : [x86_64]
111- rocm_version :
112- ["6.1.2", "6.2.4", "6.3.2"]
140+ rocm_version : ["6.2.4", "6.3.4", "6.4.4", "7.0.2"]
113141 runs-on : ${{ matrix.os }}
114142 steps :
115143 - uses : actions/checkout@v4
116- - name : Set up Docker multiarch
117- uses : docker/setup-qemu-action@v3
118144 - name : Clean up disk space
119145 run : |
146+ echo "Disk space before cleanup:"
147+ df -h
148+
149+ # These are the biggest disk space hogs.
120150 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
151+ /opt/hostedtoolcache/CodeQL \
152+ /usr/lib/dotnet \
153+ /usr/lib/jvm \
154+ /usr/local/.ghcup \
155+ /usr/local/lib/android \
156+ /usr/share/swift
157+
158+ echo "Disk space after cleanup:"
159+ df -h
137160 - name : Build C++
138161 run : bash .github/scripts/build-rocm.sh
139162 env :
@@ -149,23 +172,24 @@ jobs:
149172
150173 build-wheels :
151174 needs :
152- - build-shared-libs
153- - build-shared-libs-cuda
154- - build-shared-libs-rocm
175+ - build-cpu
176+ - build-cuda
177+ - build-rocm
178+ - build-xpu
155179 strategy :
156180 matrix :
157- os : [ubuntu-22.04, ubuntu-22.04-arm, windows-latest , macos-latest ]
181+ os : [ubuntu-22.04, ubuntu-22.04-arm, windows-2025 , macos-15 ]
158182 include :
159183 - os : ubuntu-22.04
160184 arch : x86_64
161185 - os : ubuntu-22.04-arm
162186 arch : aarch64
163- - os : windows-latest
187+ - os : windows-2025
164188 arch : x86_64
165- - os : macos-latest
189+ - os : macos-15
166190 arch : arm64
167191 # 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
192+ # code. This ensures compatibility across Python versions, as compatibility is
169193 # dictated by the packaged code itself, not the Python version used for packaging.
170194 python-version : ["3.10"]
171195 runs-on : ${{ matrix.os }}
0 commit comments