-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[WIP] Alternative attempt at compile-on-demand layer integration #44886
Conversation
12f6bc2
to
8aa06ba
Compare
Deadlock on non-debug builds aside, this is about 5% faster on TTFP than master on my tests. Same thing for time to first solve. |
Conclusions so far: the ccall test failure should be fixed by #44967 when it is merged into master, InteractiveUtils failure is a failure of code_native which probably relates to compile-on-demand, and I need to investigate the deadlocks and windows misc test failures. |
From what I've seen the deadlock happens because |
That is a problem, that was unfortunately not resolved by the partition function fix. I'll see if we can simply ignore the context of that assert and if libunwind has improved its support in the last 6 years. |
5a796f2
to
61a065f
Compare
It works for me, time to first solve is about 12% better and TTFP is about 6% better so 🚀 |
What's "time to first solve" now? 😅 |
How long it takes for a solve to happen in OrdinaryDiffEq. using OrdinaryDiffEq
f(u,p,t) = 1.01*u
u0=1/2
tspan = (0.0,1.0)
prob = ODEProblem(f,u0,tspan)
sol = solve(prob,Tsit5(),reltol=1e-8,abstol=1e-8) I can take other ideas for Time to First * |
dbce521
to
ee35c40
Compare
641f6ca
to
ffd7c1a
Compare
Interactive utils failure happens because this check fails Line 1167 in 6f8662b
std::cout << "fitobj: " << (fit != objmap.end()) << " fptr: " << fptr << " fitfir :" << fit->first << " sec: " << fit->second.SectionSize<< std::endl; this pr: julia> function linear_foo()
return 5
end
linear_foo (generic function with 1 method)
julia> @code_native dump_module=false linear_foo()
fitobj: 1 fptr: 140663119466160 fitfir :140660438813392 sec: 3593
WARNING: Unable to find function pointer master: @code_native dump_module=false linear_foo()
fitobj: 1 fptr: 139721520063056 fitfir :139721520063056 sec: 49
fitobj: 0 fptr: 5 fitfir :23 sec: 0
fitobj: 0 fptr: 0 fitfir :23 sec: 0
fitobj: 0 fptr: 1 fitfir :23 sec: 0
.text
; ┌ @ REPL[1]:1 within `linear_foo`
movl $5, %eax
retq
nopw %cs:(%rax,%rax)
; └ The section size seems suspiciously large |
So I think the root cause of the code_native failures is somewhat different.
I will patch up the PR to ignore our disassembly implementation, but there will likely be no discernible change in number of tests passing. |
e34727f
to
300d7c2
Compare
Compile-on-demand summary statistics during sysimg buildCore.Compiler
sys.ji
sys-o.a (various points)
Total
|
This PR is an alternative to #44575. As opposed to that PR, this version worksTM on LLVM 13 and with our current memory manager, by not splitting up modules (thus avoiding a recursive memory manager allocation). Where JITLink is available, we will split up modules more aggressively, although the performance impact from this is unknown as we emit modules with fairly fine granularity anyways.
Known failures include something in the ccall testset and in InteractiveUtils.
Depends on #44605 for increased parallelism gains from multiple contexts.Depends on #44926 for various thread safety improvements.