-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
package loading time regression #128
Comments
Can you check v1.9-beta3 and test a full TTFX example? |
With 1.9-beta3, the TTFX does not appear to be affected much by including or not including the @time begin
prob = NonlinearProblem{false}((u, p) -> u .* u .- p, 0.1, 2)
solve(prob, TrustRegion(), abstol = 1e-2)
end With the
and the total using time (after precompile with a fresh start of julia) is
Without the
and the total using time
(The one-time precompile time is actually fine, it's the One side effect is that it also impacts packages that depends on NonlinearSolve such as
compared w/
Only glanced through the OrdinaryDiffEq.jl a long time ago, but iiuc for simple stepping/non-stiff odes the NonlinearSolve is not actually used there? |
Hmm I wonder why that one in particular seems to have a huge effect. That's pointing to some kind of type instability we should probably handle.
DAE initialization |
I can try to find the type instability. |
Thanks! Not sure if it will help with the debugging, but looks like the using time is fine if one only precompiles for the Float64 u, but bad if Float32 is included NonlinearSolve.jl/src/NonlinearSolve.jl Line 39 in c62e922
|
@CCsimon123 I had some time to do a bit digging, with the help of JET.jl, the type instability with Float32 types can be tracked with
You can see that with NonlinearSolve.jl/src/trustRegion.jl Line 242 in c62e922
of the function NonlinearSolve.jl/src/trustRegion.jl Line 207 in c62e922
Looks like with Float32 or Vector{Float32} uType, the NonlinearSolve.jl/src/trustRegion.jl Lines 232 to 238 in c62e922
Not sure how best to tackle this though... |
Looks like it's due to #121 and #127
With version 1.1.1
gives
while with the 1.2.0 version, this shot up to ~13 seconds,
Tested w/
By reverting the changes in #127, the long
using NonlinearSolve
time is fixed. So maybe it would be better to revert #127 until it can be figured out where it went wrong?Thanks!
The text was updated successfully, but these errors were encountered: