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

Auto-batching Nonlinear Solvers and Beyond #287

Closed
wants to merge 1 commit into from

Conversation

avik-pal
Copy link
Member

Playing around with a new package to generalize the solvers to BatchedArrays. Collecting all the patches here needed to make that work.

  • Package for auto-batching -- https://github.com/LuxDL/BatchedArrays.jl (currently private)
    • Think of this as a generalization for SimpleGMRES (batched) and the batched SimpleNonlinearSolve solvers.
  • Generalize __init_identity_jacobian and __init_low_rank_jacobian

Example Usage

using NonlinearSolve, BatchedArrays

f(u, p) = u .^ 2 .- p

probB = NonlinearProblem(f, BatchedArray(rand(16, 32), 2.0)  # Solve 32 nonlinear problems simultaneously

solve(probB, NewtonRaphson())

Copy link

codecov bot commented Nov 19, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (0026bc1) 48.24% compared to head (ce3d7aa) 93.94%.

Additional details and impacted files
@@             Coverage Diff             @@
##           master     #287       +/-   ##
===========================================
+ Coverage   48.24%   93.94%   +45.69%     
===========================================
  Files          19       19               
  Lines        1824     1832        +8     
===========================================
+ Hits          880     1721      +841     
+ Misses        944      111      -833     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@avik-pal
Copy link
Member Author

avik-pal commented Dec 5, 2023

Pulled into other PRs

@avik-pal avik-pal closed this Dec 5, 2023
@avik-pal avik-pal deleted the ap/minor_generalizations branch December 5, 2023 17:37
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.

1 participant