-
Notifications
You must be signed in to change notification settings - Fork 37
Closed
Labels
Description
We have used Numba to accelerate CPU computations in sgkit for a long time - and to great effect. We have previously discussed trying JAX as an alternative to see how it compares.
I created a notebook to compare basic allele counting (count_call_alleles
) using Numba with a JAX equivalent here: https://github.com/tomwhite/sgkit/blob/134f15c18558458f6b04607cca9915e5ca90acf6/benchmark-numba-vs-jax.ipynb
The JAX code I wrote is significantly slower than Numba in this case. It could be because I've used JAX's bincount
function, rather than writing code that operates directly on the arrays - like Numba does - but I'm not sure how to do that with JAX.
hammer