Skip to content
This repository has been archived by the owner on Oct 26, 2024. It is now read-only.

Explore GPU optimization and 32 bit arithmetic #10

Closed
3 of 5 tasks
tbenthompson opened this issue May 26, 2022 · 2 comments
Closed
3 of 5 tasks

Explore GPU optimization and 32 bit arithmetic #10

tbenthompson opened this issue May 26, 2022 · 2 comments

Comments

@tbenthompson
Copy link
Member

tbenthompson commented May 26, 2022

A good place to start would be to substantially beat the current CPU JAX INLA implementation.

Things to do here:

  • Get a CUDA GPU cloud instance or local machine and set up a smooth dev environment on the machine. I think we should be willing to invest substantial time here. Good profiling and remote dev tools will be valuable.
  • Try running the existing JAX implementation on the cuda backend. What's the performance like? What improvements could be made? Are there operations that are poorly suited to the cuda backend?
  • Try running the pytorch code here (An attempt at a pytorch fast_inla implementation. imprint#97) on cuda.
  • Explore how best to have a 32 bit inla implementation that has good performance and no numerical problems in the linear algebra operations.
  • Raw CUDA Berry INLA implementation #16
  • Explore other JIT tools that might fit our use case. Does Numba work well? CuPy? ArrayFire?
@constinit
Copy link

constinit commented May 27, 2022

Thoughts on float32 stability:

  • I think if we find the hessian to be poorly conditioned, we could probably bail out to a first-order optimization method? Could plug in any of the standard NN optimizers or see here for fancier ones (I'd start with Adam). Jax also has a BFGS solver, which I haven't tried.
  • I also wonder if there's an analytic solution as sigma -> 0.
  • If you want to do something really fun, it's probably possible to regularize the newton steps. See e.g. this for a new newton algorithm that claims global convergence.

@tbenthompson
Copy link
Member Author

Alex's excellent work here checks off one of the more important boxes above: Confirm-Solutions/imprint#106

@tbenthompson tbenthompson transferred this issue from Confirm-Solutions/imprint Jul 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants