Skip to content

deps: move the GPU stack to CUDA 13 + numpy 2, and keep configure_jax working across the JAX 0.10/0.11 config rename - #5

Merged
geekbeast merged 2 commits into
mainfrom
deps/cuda13-numpy2
Aug 20, 2026
Merged

deps: move the GPU stack to CUDA 13 + numpy 2, and keep configure_jax working across the JAX 0.10/0.11 config rename#5
geekbeast merged 2 commits into
mainfrom
deps/cuda13-numpy2

Conversation

@geekbeast

Copy link
Copy Markdown
Owner

Two commits that together move the GPU stack to CUDA 13 and keep configure_jax working on the JAX releases that stack pulls in.

1. Move the GPU stack to CUDA 13 and numpy 2 (c511158)

requirements.txt asked for cupy-cuda12x and jax[cuda12] while pyproject.toml's jax-gpu and all extras already asked for jax[cuda13] — the two files disagreed about which CUDA major this project targets. Both cupy wheels provide the same cupy module, so installing across the two shadows one rather than raising a conflict.

The numpy pin is the part that quietly costs a GPU. jax only gained CUDA 13 plugins in 0.10, and jax>=0.10 requires numpy>=2.0 — so numpy==1.26.4 forces the resolver down to a jax with no CUDA 13 plugin at all. It installs, imports, and runs on CPU next to a GPU-enabled torch and cupy, warning only in a log line. Relaxing to numpy>=2.1 pulls in jax-cuda13-plugin / jax-cuda13-pjrt. The <2.3 ceiling is numba 0.61.2's, so that pin stays.

  • numpy==1.26.4numpy>=2.1,<2.3
  • cupy-cuda12x==13.5.1cupy-cuda13x>=13.6.0
  • jax[cuda12]jax[cuda13]>=0.10.0
  • torch>=2.2.2torch>=2.5.0, matching the floor pyproject already declared (CUDA 13 additionally needs a cu130 build, which current PyPI wheels provide)
  • pyproject's all extra combined jax[cuda13] with cupy-cuda12x, which cannot both be right — now cupy-cuda13x. The existing cupy extra stays on cuda12x for anyone still on that toolkit, with a new cupy-cuda13 extra alongside.
  • Comment in requirements-dev.txt noting sigkernel's setup.py imports Cython without declaring it in [build-system].requires, so it needs --no-build-isolation.

Dependency metadata only — no source changes.

2. Keep configure_jax working across the JAX 0.10/0.11 config rename (01f9deb)

JAX 0.11 removed jax_exec_time_optimization_effort and jax_memory_fitting_effort, replacing the continuous 0.0–1.0 floats with the jax_optimization_level / jax_memory_fitting_level enums (UNKNOWN/O0O3). jax.config.update raises AttributeError on an unrecognised key, so on 0.11 configure_jax died partway through — after enabling x64 and setting the XLA flags, but before matmul precision and the compilation cache were ever configured.

Pinning jax<0.11 isn't an option: this project declares jax>=0.10.0 and 0.10 only accepts the old spelling, so a pin would trade one broken half of the declared range for the other. _update_first_supported applies the first key the installed JAX recognises, leaving both ends working.

Values carry the old intent over: 1.0 was maximum execution-time effort → O3. Memory fitting was deliberately 0.3 for high-memory machines and the new default is O2, so O1 keeps it below default.

Verification

Per the commit messages, verified on CUDA 13.0 (driver 580.178.04, 4x GPU): torch, cupy-cuda13x, and jax 0.11.1 all report GPU; numba 0.61.2 compiles against numpy 2.2.6. On 4x H100 with jax 0.11.1, configure_jax reports O3/O1 with x64 live and GPU detected, and tests/test_core_jax.py passes 21/21.

CI coverage note: the CI workflow installs .[jax-cpu,dev], and the jax-cpu extra (jax[cpu]>=0.4.34) is untouched here — so CI exercises the configure_jax compat fix against whatever JAX the CPU extra resolves to today, but does not cover the CUDA 13 / cupy / numpy changes, which live in requirements.txt and the GPU extras. Those rest on the local 4x GPU verification above.

requirements.txt asked for cupy-cuda12x and jax[cuda12] while pyproject's
jax-gpu and all extras already asked for jax[cuda13], so the two disagreed about
which CUDA major this project targets. Both cupy wheels provide the same `cupy`
module, so installing across the two leaves one of them shadowed rather than
raising a conflict.

The numpy pin is the part that quietly costs a GPU. jax only gained CUDA 13
plugins in 0.10, and jax>=0.10 requires numpy>=2.0, so numpy==1.26.4 forces the
resolver down to a jax with no CUDA 13 plugin at all. It installs, imports, and
runs on CPU next to a GPU-enabled torch and cupy, warning only in a log line.
Relaxing to numpy>=2.1 pulls jax-cuda13-plugin and jax-cuda13-pjrt in. The <2.3
ceiling is numba 0.61.2's, so that pin stays as is.

torch's floor moves from 2.2.2 to 2.5.0 to match the one pyproject already
declares; CUDA 13 additionally needs a cu130 build, which current PyPI wheels
provide.

pyproject's `all` extra combined jax[cuda13] with cupy-cuda12x, which cannot
both be right. It now uses cupy-cuda13x. The existing `cupy` extra is left on
cuda12x for anyone still on that toolkit, with `cupy-cuda13` added alongside.

Verified on CUDA 13.0 (driver 580.178.04, 4x GPU): torch 2.13.0+cu130,
cupy-cuda13x, and jax 0.11.1 all report GPU; numba 0.61.2 compiles against
numpy 2.2.6.

Dependency metadata only — no source changes.
JAX 0.11 removed jax_exec_time_optimization_effort and jax_memory_fitting_effort,
replacing the continuous 0.0-1.0 floats with the jax_optimization_level and
jax_memory_fitting_level enums (UNKNOWN/O0-O3). jax.config.update raises
AttributeError on an unrecognised key, so on 0.11 configure_jax died partway
through — after enabling x64 and setting the XLA flags, before the matmul
precision and the compilation cache were ever configured.

This project declares jax>=0.10.0 and 0.10 only accepts the old spelling, so
pinning to <0.11 would trade one broken half of the declared range for the
other. _update_first_supported instead applies the first key the installed JAX
recognises, leaving both ends of the range working.

Values carry the old intent over: 1.0 was maximum execution-time effort, so O3.
Memory fitting was deliberately set to 0.3 for high-memory machines and the new
default is O2, so O1 keeps it below default.

Verified against jax 0.11.1 on 4x H100 — configure_jax reports O3/O1 with x64
live and GPU detected, and tests/test_core_jax.py passes 21/21.
@geekbeast geekbeast self-assigned this Aug 20, 2026
@geekbeast
geekbeast merged commit 1b2f5c2 into main Aug 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant