Skip to content

Commit 5f1d795

Browse files
authored
Merge branch 'main' into fix/skip-missing-nvml-symbol
2 parents b613d9a + 51141c8 commit 5f1d795

6 files changed

Lines changed: 33 additions & 103 deletions

File tree

‎.github/workflows/build-wheel.yml‎

Lines changed: 11 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ jobs:
166166
cuda-version: ${{ inputs.cuda-version }}
167167

168168
- name: Build cuda.bindings wheel
169-
uses: pypa/cibuildwheel@294735312765b09d24a2fbec22660ce817587d55 # v4.1.0
169+
uses: pypa/cibuildwheel@4726cd35bb13f7bde50cf2761f2499ac7b3aa32c # v4.1.1
170170
with:
171171
package-dir: ./cuda_bindings/
172172
output-dir: ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}
@@ -234,7 +234,7 @@ jobs:
234234
if-no-files-found: error
235235

236236
- name: Build cuda.core wheel
237-
uses: pypa/cibuildwheel@294735312765b09d24a2fbec22660ce817587d55 # v4.1.0
237+
uses: pypa/cibuildwheel@4726cd35bb13f7bde50cf2761f2499ac7b3aa32c # v4.1.1
238238
with:
239239
package-dir: ./cuda_core/
240240
output-dir: ${{ env.CUDA_CORE_ARTIFACTS_DIR }}
@@ -338,13 +338,16 @@ jobs:
338338
id: setup-python2
339339
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
340340
with:
341-
# TODO: Pin beta.2 precisely until cibuildwheel catches up (b4 broke ABI for Cython);
342-
# this precise pin requires the explicit `freethreaded`.
343-
# When 3.15 is officially supported we can also remove the `allow-prereleases` override.
344-
python-version: ${{ startsWith(matrix.python-version, '3.15') && '3.15.0-beta.2' || matrix.python-version }}
345-
freethreaded: ${{ endsWith(matrix.python-version, 't') }}
341+
python-version: ${{ matrix.python-version }}
342+
# TODO: remove allow-prereleases once 3.15 is officially supported
346343
allow-prereleases: ${{ startsWith(matrix.python-version, '3.15') }}
347344

345+
- name: Enable Scientific Python Nightly Wheels for Python 3.15
346+
if: ${{ startsWith(matrix.python-version, '3.15') }}
347+
run: |
348+
echo "PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" >> "$GITHUB_ENV"
349+
echo "PIP_ONLY_BINARY=numpy" >> "$GITHUB_ENV"
350+
348351
- name: verify free-threaded build
349352
if: endsWith(matrix.python-version, 't')
350353
run: python -c 'import sys; assert not sys._is_gil_enabled()'
@@ -370,64 +373,6 @@ jobs:
370373
mv "/c/Program Files/Git/usr/bin/link.exe" "/c/Program Files/Git/usr/bin/link.exe.bak"
371374
fi
372375
373-
# TODO: remove the numpy pre-build steps once 3.15 is officially supported
374-
# (numpy will publish pre-built 3.15 wheels at that point)
375-
- name: Download and patch numpy sdist (pre-release Python)
376-
if: ${{ startsWith(matrix.python-version, '3.15') }}
377-
run: |
378-
pip download --no-binary numpy --no-deps "numpy>=1.21.1" -d numpy-sdist/
379-
cd numpy-sdist && tar xf numpy-*.tar.gz && rm numpy-*.tar.gz
380-
# WAR: numpy 2.4.x ships [tool.cibuildwheel] config that is
381-
# incompatible with cibuildwheel v4.0 (cpython-freethreading enable
382-
# group, OpenBLAS before-build scripts, etc.). Strip the cibuildwheel
383-
# sections but preserve [tool.meson-python] (vendored meson path).
384-
python -c "
385-
import glob
386-
for f in glob.glob('numpy-*/pyproject.toml'):
387-
lines, skip = open(f).readlines(), False
388-
out = []
389-
for line in lines:
390-
hdr = line.strip()
391-
if hdr.startswith('[tool.cibuildwheel') or hdr.startswith('[[tool.cibuildwheel'):
392-
skip = True
393-
continue
394-
if skip and hdr.startswith('[') and 'cibuildwheel' not in hdr:
395-
skip = False
396-
if not skip:
397-
out.append(line)
398-
open(f, 'w').writelines(out)
399-
"
400-
echo "NUMPY_SRC_DIR=$(pwd)/$(ls -d numpy-*/)" >> $GITHUB_ENV
401-
402-
- name: Build numpy wheel (pre-release Python)
403-
if: ${{ startsWith(matrix.python-version, '3.15') }}
404-
uses: pypa/cibuildwheel@294735312765b09d24a2fbec22660ce817587d55 # v4.1.0
405-
env:
406-
CIBW_BUILD: ${{ env.CIBW_BUILD }}
407-
CIBW_SKIP: "*-musllinux* *-win32"
408-
CIBW_ARCHS_LINUX: "native"
409-
CIBW_BUILD_VERBOSITY: 1
410-
CIBW_CONFIG_SETTINGS: "setup-args=-Dallow-noblas=true"
411-
CIBW_CONFIG_SETTINGS_WINDOWS: "setup-args=--vsenv setup-args=-Dallow-noblas=true"
412-
CIBW_BEFORE_BUILD_WINDOWS: "pip install delvewheel"
413-
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair -w {dest_dir} {wheel}"
414-
CIBW_ENABLE: "cpython-prerelease"
415-
with:
416-
package-dir: ${{ env.NUMPY_SRC_DIR }}
417-
output-dir: numpy-wheel/
418-
419-
- name: Upload numpy wheel
420-
if: ${{ startsWith(matrix.python-version, '3.15') }}
421-
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
422-
with:
423-
name: numpy-python${{ env.PYTHON_VERSION_FORMATTED }}-${{ inputs.host-platform }}
424-
path: numpy-wheel/*.whl
425-
if-no-files-found: error
426-
427-
- name: Install numpy wheel
428-
if: ${{ startsWith(matrix.python-version, '3.15') }}
429-
run: pip install numpy-wheel/*.whl
430-
431376
- name: Build cuda.bindings Cython tests
432377
run: |
433378
pip install ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}/*.whl --group ./cuda_bindings/pyproject.toml:test
@@ -508,7 +453,7 @@ jobs:
508453
rmdir $OLD_BASENAME
509454
510455
- name: Build cuda.core wheel
511-
uses: pypa/cibuildwheel@294735312765b09d24a2fbec22660ce817587d55 # v4.1.0
456+
uses: pypa/cibuildwheel@4726cd35bb13f7bde50cf2761f2499ac7b3aa32c # v4.1.1
512457
with:
513458
package-dir: ./cuda_core/
514459
output-dir: ${{ env.CUDA_CORE_ARTIFACTS_DIR }}

‎.github/workflows/test-wheel-linux.yml‎

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -296,16 +296,19 @@ jobs:
296296
- name: Set up Python ${{ matrix.PY_VER }}
297297
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
298298
with:
299-
# TODO: Pin beta.2 precisely until cibuildwheel catches up (b4 broke ABI for Cython)
300-
# this precise pin requires the explicit `freethreaded`.
301-
# When 3.15 is officially supported we can also remove the `allow-prereleases` override.
302-
python-version: ${{ startsWith(matrix.PY_VER, '3.15') && '3.15.0-beta.2' || matrix.PY_VER }}
303-
freethreaded: ${{ endsWith(matrix.PY_VER, 't') }}
299+
python-version: ${{ matrix.PY_VER }}
300+
# TODO: remove allow-prereleases once 3.15 is officially supported
304301
allow-prereleases: ${{ startsWith(matrix.PY_VER, '3.15') }}
305302
env:
306303
# we use self-hosted runners on which setup-python behaves weirdly (Python include can't be found)...
307304
AGENT_TOOLSDIRECTORY: "/opt/hostedtoolcache"
308305

306+
- name: Enable Scientific Python Nightly Wheels for Python 3.15
307+
if: ${{ startsWith(matrix.PY_VER, '3.15') }}
308+
run: |
309+
echo "PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" >> "$GITHUB_ENV"
310+
echo "PIP_ONLY_BINARY=numpy" >> "$GITHUB_ENV"
311+
309312
- name: Set up mini CTK
310313
if: ${{ matrix.LOCAL_CTK == '1' }}
311314
uses: ./.github/actions/fetch_ctk
@@ -314,18 +317,6 @@ jobs:
314317
host-platform: ${{ inputs.host-platform }}
315318
cuda-version: ${{ matrix.CUDA_VER }}
316319

317-
# TODO: remove the numpy wheel steps once 3.15 is officially supported
318-
- name: Download numpy wheel (pre-release Python)
319-
if: ${{ startsWith(matrix.PY_VER, '3.15') }}
320-
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
321-
with:
322-
name: numpy-python${{ env.PYTHON_VERSION_FORMATTED }}-${{ inputs.host-platform }}
323-
path: numpy-wheel
324-
325-
- name: Install numpy wheel (pre-release Python)
326-
if: ${{ startsWith(matrix.PY_VER, '3.15') }}
327-
run: pip install numpy-wheel/*.whl
328-
329320
- name: Set up latest cuda_sanitizer_api
330321
if: ${{ env.SETUP_SANITIZER == '1' }}
331322
uses: ./.github/actions/fetch_ctk

‎.github/workflows/test-wheel-windows.yml‎

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -276,13 +276,17 @@ jobs:
276276
- name: Set up Python ${{ matrix.PY_VER }}
277277
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
278278
with:
279-
# TODO: Pin beta.2 precisely until cibuildwheel catches up (b4 broke ABI for Cython)
280-
# this precise pin requires the explicit `freethreaded`.
281-
# When 3.15 is officially supported we can also remove the `allow-prereleases` override.
282-
python-version: ${{ startsWith(matrix.PY_VER, '3.15') && '3.15.0-beta.2' || matrix.PY_VER }}
283-
freethreaded: ${{ endsWith(matrix.PY_VER, 't') }}
279+
python-version: ${{ matrix.PY_VER }}
280+
# TODO: remove allow-prereleases once 3.15 is officially supported
284281
allow-prereleases: ${{ startsWith(matrix.PY_VER, '3.15') }}
285282

283+
- name: Enable Scientific Python Nightly Wheels for Python 3.15
284+
if: ${{ startsWith(matrix.PY_VER, '3.15') }}
285+
shell: bash --noprofile --norc -xeuo pipefail {0}
286+
run: |
287+
echo "PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" >> "$GITHUB_ENV"
288+
echo "PIP_ONLY_BINARY=numpy" >> "$GITHUB_ENV"
289+
286290
- name: Verify LongPathsEnabled
287291
run: |
288292
$val = (Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled').LongPathsEnabled
@@ -300,19 +304,6 @@ jobs:
300304
host-platform: ${{ inputs.host-platform }}
301305
cuda-version: ${{ matrix.CUDA_VER }}
302306

303-
# TODO: remove the numpy wheel steps once 3.15 is officially supported
304-
- name: Download numpy wheel (pre-release Python)
305-
if: ${{ startsWith(matrix.PY_VER, '3.15') }}
306-
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
307-
with:
308-
name: numpy-python${{ env.PYTHON_VERSION_FORMATTED }}-${{ inputs.host-platform }}
309-
path: numpy-wheel
310-
311-
- name: Install numpy wheel (pre-release Python)
312-
if: ${{ startsWith(matrix.PY_VER, '3.15') }}
313-
shell: bash --noprofile --norc -xeuo pipefail {0}
314-
run: pip install numpy-wheel/*.whl
315-
316307
- name: Set up test repetition on nightly runs
317308
shell: bash --noprofile --norc -xeuo pipefail {0}
318309
run: echo "PYTEST_ADDOPTS=\"--count=${{ inputs.nruns }}\"" >> "$GITHUB_ENV"

‎ci/test-matrix.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ windows:
128128
- { ARCH: 'amd64', PY_VER: '3.14t', CUDA_VER: '12.9.1', LOCAL_CTK: '1', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'TCC' }
129129
- { ARCH: 'amd64', PY_VER: '3.14t', CUDA_VER: '13.0.2', LOCAL_CTK: '0', GPU: 'a100', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'MCDM' }
130130
- { ARCH: 'amd64', PY_VER: '3.14t', CUDA_VER: '13.3.0', LOCAL_CTK: '0', GPU: 'a100', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'MCDM' }
131+
- { ARCH: 'amd64', PY_VER: '3.15', CUDA_VER: '13.3.0', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'MCDM' }
131132
# special runners
132133
- { ARCH: 'amd64', PY_VER: '3.14', CUDA_VER: '13.3.0', LOCAL_CTK: '1', GPU: 't4', GPU_COUNT: '2', DRIVER: 'latest', DRIVER_MODE: 'TCC' }
133134
- { ARCH: 'amd64', PY_VER: '3.14', CUDA_VER: '13.3.0', LOCAL_CTK: '0', GPU: 'h100', GPU_COUNT: '2', DRIVER: 'latest', DRIVER_MODE: 'MCDM' }

‎cuda_bindings/pyproject.toml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ test = [
4848
"setuptools>=80.0.0",
4949
# TODO: remove the Python 3.15 guard once 3.15 is officially supported
5050
"matplotlib>=3.5.0,<=3.10.9; python_version < '3.15'",
51-
"numpy>=1.21.1,<=2.5.0",
51+
# <=2.6.0.dev0 admits scientific-python nightlies (for Python 3.15)
52+
"numpy>=1.21.1,<=2.6.0.dev0",
5253
"pytest==9.1.0",
5354
"pytest-benchmark==5.2.3",
5455
"pytest-repeat==0.9.4",

‎cuda_core/pyproject.toml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ test = [
7373
# TODO: remove the Python 3.15 guard once 3.15 is officially supported
7474
"cffi==2.0.0; python_version < '3.15'",
7575
]
76-
ml-dtypes = ["ml-dtypes>=0.5.4,<0.6.0"]
76+
# TODO: drop the Windows 3.15 guard once ml-dtypes publishes cp315 Windows wheels
77+
ml-dtypes = ["ml-dtypes>=0.5.4,<0.6.0; sys_platform != 'win32' or python_version < '3.15'"]
7778
test-cu12 = [ {include-group = "ml-dtypes" }, {include-group = "test" }, "cupy-cuda12x; python_version < '3.14'", "cuda-toolkit[cudart]==12.*"] # runtime headers needed by CuPy
7879
test-cu13 = [ {include-group = "ml-dtypes" }, {include-group = "test" }, "cupy-cuda13x; python_version < '3.14'", "cuda-toolkit[cudart]==13.*"] # runtime headers needed by CuPy
7980
# free threaded build, cupy doesn't support free-threaded builds yet, so avoid installing it for now

0 commit comments

Comments
 (0)