Skip to content
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

Add support for autodiff #6281

Open
nilsvu opened this issue Sep 9, 2024 · 2 comments
Open

Add support for autodiff #6281

nilsvu opened this issue Sep 9, 2024 · 2 comments

Comments

@nilsvu
Copy link
Member

nilsvu commented Sep 9, 2024

Automatic differentiation would be useful so we don't have to implement linearizations or Jacobians of complicated analytic functions. Examples where autodiff would help:

  • Jacobians and Hessians of coordinate maps
  • Second metric derivatives. Currently we compute Ricci quantities numerically on the grid because they are so painful to compute analytically for Kerr-Schild. Autodiff might help.
  • Linearization of elliptic equations. These are needed for the Newton-Raphson algorithm, but often painful to derive and implement, in particular for complicated equations (XCTS, beyond GR, BNS ID, ...).
@nilsdeppe
Copy link
Member

I have played with the library https://github.com/autodiff/autodiff a bit in a toy repo. This seems like it could be useful so we don't have to implement things ourselves. However, I think doing only forward mode autodiff is okay-ish if we have to do it ourselves. I believe we can quite easily extend autodiff to support the blaze SIMD types would should allow autodiff to work.

@nilsvu
Copy link
Member Author

nilsvu commented Sep 9, 2024

Looks like this library has support for Eigen, so we could model support for Blaze vectors on that.

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

No branches or pull requests

2 participants