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

AutoSpecialize for NonlinearProblem #862

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

oscardssmith
Copy link
Contributor

@oscardssmith oscardssmith commented Nov 14, 2024

since NonlinearProblem doesn't have a t field, most of the time, we can just use Void for all of the functions of inplace ones without a performance penalty. This still needs to be benchmarked to make sure it doesn't have a performance impact.

@oscardssmith
Copy link
Contributor Author

oscardssmith commented Nov 14, 2024

interestingly, even with this, NonlinearSolve is still 99% compilation time...

@ChrisRackauckas
Copy link
Member

@avik-pal test it a bit?

@avik-pal
Copy link
Member

interestingly, even with this, NonlinearSolve is still 99% compilation time...

Do you mean the current precompile workload? I think it manually sets the specialization so it has no effect.

Also we would need the corresponding DiffEqBase update for this to work I think

@oscardssmith
Copy link
Contributor Author

I changed the workload to make p=nothing and AutoSpecialize (since it is going to be hard to precompile meaningfully for non-null parameters). What DiffEqBase changes would be needed?

@avik-pal
Copy link
Member

@oscardssmith
Copy link
Contributor Author

That very specifically shouldn't be needed. The key observation of this PR is that you don't actually need to FunctionWrap in place functions since you can just do a dynamic dispatch instead.

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