Two-moment AMR radiation hydrodynamics (with self-gravity, particles, chemistry, and magnetic fields) on CPUs/GPUs for astrophysics