We just released Mosaic (github.com/pasteurlabs/mosaic), a benchmark for differentiable physics solvers. Each solver runs in a container behind a uniform apply / vjp interface, so one harness compares gradient accuracy and cost across JAX, PyTorch, Julia, and C++-adjoint codes on shared tasks.
XLB is one of the benchmarked solvers on the ns-grid and ns-3d-grid domains (results if you're interested).
We did our best to do it justice, but we don't know your code as well as you do and have surely made suboptimal calls. For example, we run BGK by default on the JAX backend (falling back to KBC for obstacles or low viscosity) and recover velocity from the lattice-Boltzmann populations the naive way. If a different collision operator such as MRT, a different relaxation time, or another macroscopic-conversion convention is the right choice for differentiable runs, we'd love to know.
The setup is self-contained under mosaic/tesseracts/navier-stokes-grid/xlb/. If something looks odd, corrections or a PR are very welcome, here on GitHub or on the Tesseract Forum.
Mostly we wanted you to know your work is represented, and to get it right.
Cheers,
Dion on behalf of the Mosaic authors
We just released Mosaic (github.com/pasteurlabs/mosaic), a benchmark for differentiable physics solvers. Each solver runs in a container behind a uniform
apply/vjpinterface, so one harness compares gradient accuracy and cost across JAX, PyTorch, Julia, and C++-adjoint codes on shared tasks.XLB is one of the benchmarked solvers on the ns-grid and ns-3d-grid domains (results if you're interested).
We did our best to do it justice, but we don't know your code as well as you do and have surely made suboptimal calls. For example, we run BGK by default on the JAX backend (falling back to KBC for obstacles or low viscosity) and recover velocity from the lattice-Boltzmann populations the naive way. If a different collision operator such as MRT, a different relaxation time, or another macroscopic-conversion convention is the right choice for differentiable runs, we'd love to know.
The setup is self-contained under
mosaic/tesseracts/navier-stokes-grid/xlb/. If something looks odd, corrections or a PR are very welcome, here on GitHub or on the Tesseract Forum.Mostly we wanted you to know your work is represented, and to get it right.
Cheers,
Dion on behalf of the Mosaic authors