-
Notifications
You must be signed in to change notification settings - Fork 13
add jax frontend support for c/c++ sht libraries #195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #195 +/- ##
==========================================
+ Coverage 92.49% 92.63% +0.14%
==========================================
Files 27 28 +1
Lines 2971 3109 +138
==========================================
+ Hits 2748 2880 +132
- Misses 223 229 +6 ☔ View full report in Codecov by Sentry. |
…om/astro-informatics/s2fft into feature/JAX_frontend_for_C++_codes
…c transform example
This PR adds frontend JAX support for existing python wrapped C/C++ spherical harmonic transform libraries; specifically ssht and healpy, though in principle any spherical harmonic transform may be straightforwardly included.
The JAX frontend we provide provides automatic reverse mode differentiation, so existing packages may be integrated as transforms within differentiable programming pipelines.
This PR includes:
Important
Our JAX wrappers are limited by the hardware on which these C/C++ libraries are designed to run. So currently these transforms run only on CPU, however they are highly optimised and consequently very fast. For applications with a large memory overhead (e.g. sampling methods on the sphere), computing everything on CPU may be more useful to avoid throttling due to I/O.
Tip
Users should notice that this functionality for HEALPix sampling avoids the compile time issues we are still investigating in the core GPU transforms. So this may be a useful stop-gap until this issue is resolve.