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
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two commits that together move the GPU stack to CUDA 13 and keep
configure_jaxworking on the JAX releases that stack pulls in.1. Move the GPU stack to CUDA 13 and numpy 2 (
c511158)requirements.txtasked forcupy-cuda12xandjax[cuda12]whilepyproject.toml'sjax-gpuandallextras already asked forjax[cuda13]— the two files disagreed about which CUDA major this project targets. Both cupy wheels provide the samecupymodule, 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.10requiresnumpy>=2.0— sonumpy==1.26.4forces 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 tonumpy>=2.1pulls injax-cuda13-plugin/jax-cuda13-pjrt. The<2.3ceiling is numba 0.61.2's, so that pin stays.numpy==1.26.4→numpy>=2.1,<2.3cupy-cuda12x==13.5.1→cupy-cuda13x>=13.6.0jax[cuda12]→jax[cuda13]>=0.10.0torch>=2.2.2→torch>=2.5.0, matching the floor pyproject already declared (CUDA 13 additionally needs a cu130 build, which current PyPI wheels provide)allextra combinedjax[cuda13]withcupy-cuda12x, which cannot both be right — nowcupy-cuda13x. The existingcupyextra stays on cuda12x for anyone still on that toolkit, with a newcupy-cuda13extra alongside.requirements-dev.txtnoting sigkernel'ssetup.pyimports Cython without declaring it in[build-system].requires, so it needs--no-build-isolation.Dependency metadata only — no source changes.
2. Keep
configure_jaxworking across the JAX 0.10/0.11 config rename (01f9deb)JAX 0.11 removed
jax_exec_time_optimization_effortandjax_memory_fitting_effort, replacing the continuous 0.0–1.0 floats with thejax_optimization_level/jax_memory_fitting_levelenums (UNKNOWN/O0–O3).jax.config.updateraisesAttributeErroron an unrecognised key, so on 0.11configure_jaxdied partway through — after enabling x64 and setting the XLA flags, but before matmul precision and the compilation cache were ever configured.Pinning
jax<0.11isn't an option: this project declaresjax>=0.10.0and 0.10 only accepts the old spelling, so a pin would trade one broken half of the declared range for the other._update_first_supportedapplies the first key the installed JAX recognises, leaving both ends working.Values carry the old intent over:
1.0was maximum execution-time effort →O3. Memory fitting was deliberately0.3for high-memory machines and the new default isO2, soO1keeps 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_jaxreports O3/O1 with x64 live and GPU detected, andtests/test_core_jax.pypasses 21/21.CI coverage note: the
CIworkflow installs.[jax-cpu,dev], and thejax-cpuextra (jax[cpu]>=0.4.34) is untouched here — so CI exercises theconfigure_jaxcompat fix against whatever JAX the CPU extra resolves to today, but does not cover the CUDA 13 / cupy / numpy changes, which live inrequirements.txtand the GPU extras. Those rest on the local 4x GPU verification above.