Performance comparison of AMJax against PyAMG on 2D Poisson problems of increasing size (n = 50, 100, 200, 500).

Experimental setup

ParameterValue
Problem2D Poisson on an n×n grid
Tolerance10⁻⁸
Max solver iterations500
Max cycle iterations250 (per solver call)
Grid sizesn = 50, 100, 200, 500
AMG hierarchiesRuge-Stüben, Smoothed Aggregation, Root Node, Pairwise
Cycle typesV, F, W
Precisionf32, f64
DevicesAMJax on GPU, PyAMG on CPU
Modessingle (1 RHS), vmap (k RHS batched)
Batch size (k)32, 64
MethodsAMJax, AMJax + PCG, PyAMG, PyAMG + PCG
Timingafter JIT warm-up (first call excluded)
Residual metric||b − Ax|| / ||b||

Speedup ratios


Residuals: f32 vs f64