-
-
Notifications
You must be signed in to change notification settings - Fork 36
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
Handle Slow Precompilation + Reduce Runtime Dispatches #150
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
avik-pal
force-pushed
the
ap/patch
branch
2 times, most recently
from
December 19, 2023 18:05
51a2183
to
872056c
Compare
Benchmark Results
Benchmark PlotsA plot of the benchmark results have been uploaded as an artifact to the workflow run for this PR. |
avik-pal
changed the title
Fixes invalid bandind
Handle Slow Precompilation + Reduce Runtime Dispatches
Dec 21, 2023
I might end up splitting this PR into multiple smaller ones for easier review but for now I am aggregating all the fixes that need to go in |
using SnoopCompile, JET
using BoundaryValueDiffEq, LinearAlgebra, LinearSolve, OrdinaryDiffEq, Test
tspan = (0.0, 100.0)
u0 = [0.0, 1.0]
# Inplace
function f1!(du, u, p, t)
du[1] = u[2]
du[2] = -u[1]
return nothing
end
function bc1!(resid, sol, p, t)
t₀, t₁ = first(t), last(t)
resid[1] = sol(t₀)[1]
resid[2] = sol(t₁)[1] - 1
return nothing
end
bvp1 = BVProblem(BVPFunction{true}(f1!, bc1!), u0, tspan)
sol = solve(bvp1, Shooting(Tsit5()); abstol = 1e-13, reltol = 1e-13,
odesolve_kwargs = (; abstol = 1e-6, reltol = 1e-3))
tinf = let bvp = bvp1
solve(bvp, Shooting(Tsit5()); abstol = 1e-13, reltol = 1e-13,
odesolve_kwargs = (; abstol = 1e-6, reltol = 1e-3))
@snoopi_deep solve(bvp, Shooting(Tsit5()); abstol = 1e-13, reltol = 1e-13,
odesolve_kwargs = (; abstol = 1e-6, reltol = 1e-3))
end
# InferenceTimingNode: 0.065630/0.065630 on Core.Compiler.Timings.ROOT() with 0 direct children <-- This PR
# InferenceTimingNode: 0.126995/0.126995 on Core.Compiler.Timings.ROOT() with 0 direct children <-- Current Release |
avik-pal
added a commit
that referenced
this pull request
Dec 25, 2023
avik-pal
added a commit
that referenced
this pull request
Feb 1, 2024
avik-pal
added a commit
that referenced
this pull request
Mar 20, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #148