Skip to content

Conversation

@ravioli1369
Copy link
Member

Use torch for most scipy/healpy functions

This version is much slower (~10 times) than the scipy/healpy equivalent.

Copy link
Collaborator

@deepchatterjeeligo deepchatterjeeligo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few thoughts.

  • Let's make the auxiliary functions compatible with both numpy and torch depending on the input. This will ensure that the current features are maintained.
  • Define a new module (maybe solver.py) for the torch newton solver which will import the functions from above.
  • And another .py file called healpix_utils.py that contain the torch based healpux functions.
  • Add some testing for the core solver using simple polynomials or anything else you see fit. If you can add a test for the ansatz using the auxiliary functions in addition its even better.

@ravioli1369 ravioli1369 marked this pull request as ready for review February 3, 2025 06:28
@ravioli1369
Copy link
Member Author

ML4GW/ml4gw#193 should be merged before this

@EthanMarx
Copy link
Collaborator

If this is 10 times slower, why are we merging it in?

@deepchatterjeeligo
Copy link
Collaborator

If this is 10 times slower, why are we merging it in?

I want to keep the feature, though not use it rightaway until the issue with the speed is resolved. My hope is that we will be able to improve on the speed once someone can take a closer look.

@EthanMarx
Copy link
Collaborator

Okay thats makes sense. I suggest we keep it as a draft PR then until someone has the chance to take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants