Skip to content

Commit 15a1d5f

Browse files
committed
ci: build cuda.core against the cuda-bindings just built
Windows coverage has produced no wheel since 2026-07-29, so the job fails before Coverage (Windows) can start and the crash diagnostics on this branch have nowhere to run. PIP_PRE is set here so pip will consider the locally built cuda-bindings at all: it carries a .devN version, which counts as a pre-release. The side effect is that PyPI's pre-releases become eligible too, and cuda-bindings 13.4.0b1, published that same day, outranks the local build for `cuda-bindings==13.*`. So the wheel built one step earlier is discarded and a 13.4 wheel is downloaded instead. Its cydriver.pxd is generated from CTK 13.4 headers, where CUmemLocation has a `localized` field, while cuda.core compiles against the 13.3.0 mini-CTK, where it does not. Cython generates a struct converter over every field, and MSVC rejects it: _managed_memory_ops.cpp(18447): error C2039: 'localized' is not a member of 'CUmemLocation_st' Linux is unaffected, and build-wheel.yml escapes it as well, because cibuildwheel sets PIP_FIND_LINKS without PIP_PRE. Constraining cuda-bindings to the version just built keeps what PIP_PRE was for and drops what it let in. The version is read from the wheel filename rather than hardcoded, with the local segment removed: PEP 440 has a public `==` specifier ignore a candidate's local label, so `==13.3.2.dev139` still selects 13.3.2.dev139+g0123456, and constraints files stay free of local versions, which pip has objected to before. TEMPORARY, like the pull-request push trigger above it. The real fix belongs upstream; this only exists so the diagnostics can run before that lands.
1 parent d6e9c59 commit 15a1d5f

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

.github/workflows/coverage.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,10 +248,43 @@ jobs:
248248
cd cuda_bindings
249249
../.venv/Scripts/pip wheel -v --no-deps . -w ../wheels/
250250
251+
# TEMPORARY (do not merge): build against the cuda-bindings wheel built a
252+
# step ago, not whatever PyPI offers.
253+
#
254+
# PIP_PRE is here so pip will consider the locally built wheel at all --
255+
# it carries a .devN version, which is a pre-release. The side effect is
256+
# that PyPI's pre-releases become eligible too, and cuda-bindings
257+
# 13.4.0b1, published 2026-07-29, outranks the local build for
258+
# `cuda-bindings==13.*`. Its cydriver.pxd is generated from CTK 13.4
259+
# headers, so CUmemLocation gains a `localized` field, while cuda.core
260+
# compiles against the 13.3.0 mini-CTK that has no such field. Cython
261+
# generates a struct converter over every field, and the build dies:
262+
#
263+
# _managed_memory_ops.cpp(18447): error C2039: 'localized' is not a
264+
# member of 'CUmemLocation_st'
265+
#
266+
# Windows coverage has produced nothing since; the job fails here and
267+
# Coverage (Windows) is skipped. cibuildwheel escapes it in
268+
# build-wheel.yml only because it sets PIP_FIND_LINKS without PIP_PRE.
269+
#
270+
# Pinning the exact local version keeps what PIP_PRE was for and drops
271+
# what it let in. The real fix belongs upstream; this only exists so the
272+
# crash diagnostics on this branch can run before that lands.
251273
- name: Build cuda.core wheel
252274
run: |
253275
export PIP_FIND_LINKS="$(pwd)/wheels"
254276
export PIP_PRE=1
277+
bindings_whl="$(ls ./wheels/cuda_bindings-*.whl | head -1)"
278+
bindings_ver="$(basename "$bindings_whl" | cut -d- -f2)"
279+
# Drop the local segment: PEP 440 says a public `==` specifier ignores
280+
# a candidate's local label, so `==13.3.2.dev139` still selects
281+
# 13.3.2.dev139+g0123456 while avoiding local versions in a
282+
# constraints file, which pip has been unhappy with before.
283+
bindings_ver="${bindings_ver%%+*}"
284+
echo "cuda-bindings==${bindings_ver}" > "$GITHUB_WORKSPACE/constraints.txt"
285+
echo "=== pip constraints ==="
286+
cat "$GITHUB_WORKSPACE/constraints.txt"
287+
export PIP_CONSTRAINT="$GITHUB_WORKSPACE/constraints.txt"
255288
cd cuda_core
256289
../.venv/Scripts/pip wheel -v --no-deps . -w ../wheels/
257290

0 commit comments

Comments
 (0)