Skip to content

Accelerators and Mixed Precision

Scrollable formula. Use Left and Right arrow keys to reveal hidden content.

Scrollable table. Use Left and Right arrow keys to reveal additional columns.

Scrollable figure. Use Left and Right arrow keys to inspect hidden content.

Accelerators can reduce time to solution, and mixed precision can reduce memory traffic or raise arithmetic throughput. Neither improvement is free scientific evidence. Reduced precision changes rounding, cancellation, reduction order, nonlinear iteration, and sometimes the branch taken by a fallback. The acceptable question is therefore bounded: for a named architecture, workload, and observable tolerance, which operations may use lower precision while an all-high-precision control retains the same converged physical result?

Helpful background. Formulations of General Relativity supplies the evolved systems and constraints, Ordinary Differential Equations supplies stability and tolerance control, Computational Relativity supplies reproducibility standards, and Probability and Statistical Inference supplies uncertainty comparisons.

A mixed implementation may store fields in 64-bit arithmetic while evaluating reconstruction weights, fluxes, or local source terms in 32 bits. Sensitive global reductions, root solves, time accumulation, and diagnostics may remain high precision. The record must name the format of every field and operation, fused operations, compiler contraction, denormal policy, reduction tree, and fallback threshold.

The relevant error is not machine epsilon alone. Ill-conditioned primitive recovery, nearly cancelling waveform tails, accumulated phase, and constraints formed from large derivative terms can amplify roundoff. Compare all-high-precision and mixed runs at identical resolution, CFL factor, physics, and stopping tolerances. Field et al. 2023, §3.1.3 and Figures 5–6 computes only the WENO weights in binary64 while the rest of that solver uses quadruple precision. It reports a factor-3.33.3 speedup and, at τ=2000\tau=2000, relative solution differences below 10−410^{-4} near the horizon but appreciably larger differences in the middle of the domain. That localized result does not validate broad demotion of evolution variables.

For a simple cancellation example, suppose an observable is q=A−Bq=A-B with AA and BB of order one but qq of order 10−810^{-8}. Binary32 unit roundoff is 2−24≃6×10−82^{-24}\simeq6\times10^{-8}, so storing the inputs in binary32 can erase the observable before subtraction. Casting those rounded inputs to binary64 afterward cannot recover the missing information. Preserve high precision in the sensitive inputs and operations, not only in the final accumulator. The cold magnetized recovery example gives the same issue in a physical variable.

The evidence cutoff for this page is 2026-08-18. Results remain architecture- and workload-specific.

Evidence dateSystem and comparisonScientific checkScope
2020 submission, 2023 publicationGPU mixed-precision WENO versus full quadruple-precision controlNear-horizon extremal-Kerr scalar solution differs by less than 10−410^{-4} at τ=2000\tau=2000; mid-domain error is largerWENO weights in binary64 and remaining solver in quadruple precision; reported factor-3.33.3 speedup is workload specific
2024AthenaK on AMD and NVIDIA acceleratorsStandard relativity tests and convergent binary waveformPerformance portability with a particular Z4c implementation
2025 revisionAsterX on FrontierGRMHD benchmarks plus scalingBlock-AMR GRMHD and named software stack
July 2026 preprintSACRA-K versus SACRA-MPIBlack-hole and neutron-star waveforms, symmetry, convergenceEarly preprint evidence on selected accelerator systems

Zhu et al. 2024, §§3–5 connects scaling to standard relativity tests. Kalinani et al. 2025, §§4–5 and Fig. 13 separates the AsterX test suite from its Frontier scaling measurements. Han, Kiuchi, and Shibata 2026, §3, Figures 2–6 and §4, Table 1 reports a recent cross-implementation port comparison; its preprint status and July 2026 date should remain visible.

Evolve the smooth periodic advection problem

∂tu+∂xu=0,uex(t,x)=sin⁡ ⁣[2π(x−t)]\partial_tu+\partial_xu=0, \qquad u_{\rm ex}(t,x)=\sin\!\bigl[2\pi(x-t)\bigr]

on [0,1]3[0,1]^3 with periodic faces and u(0,x)=sin⁡(2πx)u(0,x)=\sin(2\pi x). Use fifth-order WENO reconstruction, RK4, CFL 0.20.2, and N3N^3 grids with N=64,128,256N=64,128,256 to t=1t=1. The control stores and computes every operation in binary64. The mixed variant retains state storage, time accumulation, Fourier diagnostics, reductions, and WENO normalization in binary64, but computes smoothness indicators, unnormalized WENO weights, reconstructed face states, and local fluxes in binary32 before casting the flux to binary64. Compiler contraction and denormal handling must be pinned identically except where the arithmetic map explicitly differs.

Compare each run with the analytic solution using volume-weighted relative L2L_2 error E2E_2 and fundamental-mode phase error Δϕ\Delta\phi, and compare mixed with control using D2=∥umix−u64∥2/∥u64∥2D_2=\|u_{\rm mix}-u_{64}\|_2/\|u_{64}\|_2. Accept the mixed 2563256^3 run only if both variants have E2≤10−5E_2\leq10^{-5} and ∣Δϕ∣≤10−5 rad|\Delta\phi|\leq10^{-5}\,\mathrm{rad}, if D2≤10−6D_2\leq10^{-6}, and if their last two refinement ratios agree within 20%20\%.

For strong scaling, hold the 2563256^3 wave fixed on 1,2,4,81,2,4,8 identical accelerators. For weak scaling, tile 1,2,4,81,2,4,8 unit cubes along xx, retain 1283128^3 cells per accelerator and the same analytic wave in every tile, and hold transfers and output fixed. Run one warm-up and seven measured repetitions for both precision maps; report median time, interquartile range, energy if available, and peak memory. A timing enters either scaling curve only if the run meets the same E2E_2, Δϕ\Delta\phi, and D2D_2 limits.

Observed discrepancy: not available—specification only.

One credible position is that mixed precision is safe and valuable when restricted to operations whose perturbations are demonstrably below discretization error, guarded by high-precision residuals and fallbacks. Another is that long relativistic evolutions, constraint cancellation, chaotic matter flows, and architecture-dependent reductions make broad demotion too risky unless each production regime is revalidated. These positions are not settled by throughput alone; they imply different burdens of evidence.

The decisive benchmark compares all-high and mixed precision on the same analytic wave, stationary black hole, and production-representative case. Use at least three resolutions. Track constraints, horizon mass and spin, waveform phase and amplitude, tail exponent where relevant, conserved matter quantities, nonlinear iterations, fallbacks, wall time, energy or resource use, and memory. Repeat on more than one accelerator architecture when portability is claimed.

A counterexample must be retained: choose a cancellation-sensitive tail or highly magnetized primitive-recovery set where indiscriminate 32-bit arithmetic exceeds tolerance. Showing that the guard detects and routes the case to higher precision is stronger than omitting it. Agreement only after loosening the physical tolerance is failure.

Reproducing the calculation and testing its robustness

Section titled “Reproducing the calculation and testing its robustness”

Pin code revision, compiler and flags, accelerator model and firmware, runtime and math libraries, precision map, reduction policy, deterministic settings, workload, input checksum, resolution sequence, error target, and timing protocol. A clean interface could be precision-compare --config black-hole-wave.toml --output run/, emitting high- and mixed-precision observables, differences, constraints, fallback logs, timings, resource measures, and environment metadata. This is a rerun specification, not a claim that a program is supplied here.

Reject a speedup when the baseline is unmatched, convergence changes, phase or tail errors exceed tolerance, constraints worsen beyond the error budget, or a result depends on nondocumented compiler contraction. A review is triggered by a new arithmetic format, compiler or accelerator architecture, changed reduction or reconstruction kernel, materially longer evolution, new matter regime, or independent counterexample that violates the declared tolerance. Reassess the evidence after any such change rather than carrying forward a performance claim.

A mixed run is three times faster and matches horizon mass, but its late-time waveform tail differs by twenty percent while both runs pass the same coarse absolute norm. Is the mixed algorithm accepted?

Solution

No. The norm is insensitive to the small tail, an explicitly relevant observable. Use a tail-scaled metric, increase resolution and reference precision, identify the sensitive operations, and retain them at higher precision or add a validated fallback. Speed beyond the declared physical tolerance is not useful performance.

  • Field, S. E., Gottlieb, S., Grant, Z. J., Isherwood, L. F., and Khanna, G. (2023). “A GPU-accelerated mixed-precision WENO method for extremal black hole and gravitational wave physics computations.” Communications on Applied Mathematics and Computation 5, 97–115. DOI.
  • Han, M.-Z., Kiuchi, K., and Shibata, M. (2026). “SACRA-K: A performance-portable numerical relativity code with Kokkos.” arXiv:2607.08743. arXiv.
  • Kalinani, J. V., Ji, L., Ennoggi, L., et al. (2025). “AsterX: A new open-source GPU-accelerated GRMHD code for dynamical spacetimes.” Classical and Quantum Gravity 42, 015010. DOI.
  • Zhu, H., Fields, J., Zappa, F., et al. (2024). “Performance-portable numerical relativity with AthenaK.” arXiv:2409.10383. arXiv.