JAX-GalSim
JAX-GalSim copied to clipboard
use codspeed to benchmark performance and look for regressions
We can use this free service to write benchmark tests for CPUs: https://docs.codspeed.io/benchmarks/python
We won't be able to test on GPUs, but it will be a good start.
I think you implemented this already in #100 so we can close this issue?
I'd like to implement other bits of the code.
Have you done any runtime tests on interpolated images? I have done some testing on scarlet2, where we implement the same Bernstein&Gruen method, and see massive costs even if the interpolation call is jitted. It would be good to compare. Maybe we're doing something stupid..
You can see how we do things here: https://github.com/GalSim-developers/JAX-GalSim/blob/main/jax_galsim/interpolatedimage.py#L980
Avoid any calls to jax.lax.scan, fori_loops, while_loops, and similar. Instead, we unroll everything into memory and do one giant sum.
Thanks! Benjamin did check the code here. My question is: do you have runtime numbers for an Fourier resampling method?
I do not. The algorithms here follow galsim exactly by construction.