Skip to content

AMJax

AMJax converts algebraic multigrid hierarchies built by PyAMG into JAX-compatible solvers and preconditioners. PyAMG remains responsible for hierarchy construction; AMJax focuses on repeated solves that can run under jax.jit, jax.vmap, GPU execution, and automatic differentiation.

Installation

uv add amjax

Where to start

  • Use the quickstart for the PyAMG-to-AMJax solve pattern.
  • Use benchmarks for the current recommendation and the latest generated benchmark summary.
  • Use the API reference for AMJax's small public surface.

PyAMG Boundary

Use PyAMG documentation for AMG theory, hierarchy builders, and setup options:

After MultilevelSolver.from_pyamg(...), AMJax converts the hierarchy into JAX arrays and sparse BCOO matrices. Hierarchy setup still happens in Python, and cycle, smoother, and coarse-solver choices should be treated as static JAX configuration.