Skip to content

GKX 2.1.0

Choose a tag to compare

@rogeriojorge rogeriojorge released this 15 Sep 06:33
· 1098 commits to main since this release
4c6c9ac

GKX 2.1.0

A minor release, cut on 2026-09-15. Nothing is removed since 2.0.0: gkx.api.__all__ is the same 15 names and no module path changed. It repairs the 2.0.0 end-damping regression and certifies every eigenpair the solvers return. It also adds solver and damping provenance to results and publishes the solver, velocity-space and throughput evidence behind the next phase of work.

Fixes

  • End damping (#197, #223). The per-step end-damping contract that 2.0.0 removed is restored (issue #192). #197 reproduces the recorded artifact bit-identically at all 11 ky. That is not a new physics certification: historical 2.0.0 time-integrated numbers still need repaired-build evidence (see docs/release_scope.rst). Ambiguous legacy damping scaling is now rejected before any expensive work (#223).
  • Eigenpairs are certified (#233). KrylovConfig() previously defaulted to an ungated propagator route. On the exact-operator ladder it returned the wrong mode with residual ≈1.
    • KrylovConfig() and dominant_eigenpair now default to the adaptive route.
    • The raw power, arnoldi and propagator routes are gated on the original-operator residual.
    • A zero eigenvector no longer scores residual 0.
  • Linked chains (#237). Linear eigen routes solve only on the linked-chain modes; the sparse route assembles only those columns. Certification still applies the full operator.
  • Also fixed:
    • explicit linear integration stops at the requested horizon (#208);
    • Laguerre round-trip errors that are not finite are rejected (#210);
    • differentiable species-parallel initial states are preserved (#211);
    • the spectral hypercollision and line-inverse contracts are restored (#226);
    • the f32/endpoint repairs and the species-state AD fix landed (#219).

Added

  • End damping: an opt-in differentiable end-damping rate (#212), and damping reference provenance with resolved reload (#224).
  • Inner-solve diagnostics (#230): shift-invert inner-solve statistics in statuses and errors. shift_solve_method is no longer a recompile key, and implicit_maxiter now counts iterations.
  • Profiling: tools/profiling/profile_runtime_kernels.py nonlinear-step-hlo is an op-name HLO ledger for the nonlinear step (#231). It has a --route runtime option for the scan that run_runtime_nonlinear compiles (#239).
  • Infrastructure:
    • Phase 0 infrastructure: evidence ledger, API contracts, prepare usability, precision (#218);
    • reproducible regenerated release artifacts, with CI failing on staleness (#195);
    • independent EM, uncertainty and refinement gates (#225);
    • CONTRIBUTING.md (#215).
  • Solver status on results (#242).
    • RuntimeLinearResult.eigen_status carries the returned pair's original-operator residual, the gate tolerance, a certified flag, the route, and shift-invert inner-solve statistics. dominant_eigenpair(..., return_status=True) returns the same status.
    • implicit_solve on linear and nonlinear runtime results reports the max relative residual, max iterations, solve count and unconverged count. summary() gains matching flat keys.
    • Library integrators opt in with return_solve_stats=True. Graphs that do not request stats compile unchanged.
  • Float32 window gradients in CI (#240). float32 is the default precision, but the finite-window gradient matrix previously ran only in x64, and 11 of its tests failed in float32. The cause was the tests' float32 finite-difference references losing their step to rounding, not GKX: float32 gradients match float64 to within 5.7e-6. The matrix now compares against an x64 finite-difference reference, and CI runs it in float32 on the Python floor.
  • Shared linked-chain transforms (#243). Parallel streaming and the |k_z| hypercollision branch now share one FFT/IFFT per linked-chain class, and the chain gather keeps the state's own axis order instead of transposing around every transform.
    • One FFT per chain class is the exact minimum, since each chain length has its own frequencies.
    • At 32×32×24 one nonlinear RHS drops from 23 to 13 FFT launches. Bytes materialized fall 43–48% on every measured graph (2.87 → 1.50 GB for a 64×64×24 runtime rk3 step).
    • 100-step trajectories are bitwise identical in float32 and float64.
    • Wall-clock timing on a shared CPU host found no consistent speed-up or slowdown, so no speed claim is made.

Behaviour changes

  • Raw eigen routes raise on an uncertified pair unless certify=False is passed explicitly (#233).
  • Legacy damping inputs with ambiguous scaling are rejected (#223).
  • run_runtime_linear (implicit) and run_runtime_nonlinear (IMEX) raise RuntimeError if any inner solve did not converge, instead of returning that trajectory (#242).

Evidence (plan.md and plan/log.md)

  • Shift-invert sizes (#232): an exact sparse shift-invert ladder up to production single-chain size. The adaptive route certifies the production pair (n=73728) in 761 s on CPU.
  • Preconditioners (#236): a structured bake-off. The pr3-cm design is adopted for L4, but matrix-free shift-invert with it does not beat adaptive at production size.
  • Laguerre convergence (#234, #238): at Cyclone ky=.55, only ν=1e-2 converges in Nl (γ=.01717, collision-modified). The collisionless references at that ky are unconverged truncation values.
  • GX collisional control (#244). GX with vnewk=1e-2 matches GKX's ν=1e-2 Cyclone ky=.55 growth rate to within 5e-7 relative at Nl 24 and 32, and the frequency to within 3.3e-6. Both codes show the same −1.56% Nl24→32 change. The two parameters are one-to-one for this ion: in source, both codes damp at ν(b+2ℓ+m) with the same restoring terms. GX ran on the rebuilt office toolchain, whose outputs are bitwise identical to its pre-deletion runs. The converged collisional value is collision-modified, not a collisionless limit.
  • Cross-code linear Cyclone controls (#245). Adiabatic-electron Cyclone runs in GS2 8.2.1, stella v1.0 and gyaradax on declared resolution ladders, compared with GKX's certified eigenpairs and GX's shipped goldens.
    • s-alpha, ky .30: GS2 (.09219), gyaradax (.09209) and GKX (.09309) agree within 1.1%.
    • Miller, ky .55: GS2 converges to .12516, matching the GX golden within 1%, and GKX's certified pair is within 0.65%.
    • stella: on identical, converged Miller input it runs 1.40–1.47× above GS2. The cause is not identified.
    • s-alpha, ky .55: no cross-code reference is established. GS2 is limited by its energy grid, and GKX is unconverged in Nl.

Installing

pip install gkx==2.1.0