-
Notifications
You must be signed in to change notification settings - Fork 18
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
Choose which functions to include in precompilation #220
Comments
SnoopCompile: look at the times. Pick the largest. Then try and come up with some systematic way to choose which functions. So not very helpful... e.g., FrankWolfe.jl/src/precompile.jl Lines 61 to 63 in dfba2f6
for T in [Float64, Base.MPFR.BigFloat]
precompile(Tuple{typeof(Base.:(+)), Array{Float64, 1}, FrankWolfe.ScaledHotVector{T}})
precompile(Tuple{typeof(Base.:(*)), Array{Float64, 2}, FrankWolfe.ScaledHotVector{T}})
end Some of these you may be better of FrankWolfe.jl/src/precompile.jl Lines 22 to 59 in dfba2f6
Or make a single struct. These suggest type instabilities somewhere: FrankWolfe.jl/src/precompile.jl Lines 1 to 17 in dfba2f6
|
Here is a list of functions called in FrankWolfe.jl/examples/. I used @snoopi_deep to collect the data and created flamegraphs of functions that the compiler is compiling. The functions highlighted in gray are not precompilable and correspond to the red flames in the graph. approximate_caratheodory
away_step_cgInferenceTimingNode: 7.708753/11.124768 on Core.Compiler.Timings.ROOT() with 25 direct children
birkhoff_polytopeFrankWolfe.blended_conditional_gradient(...)
blended_cgFrankWolfe.blended_conditional_gradient(...)
lazy_away_step_cg-sparsityInferenceTimingNode: 5.231079/6.858725 on Core.Compiler.Timings.ROOT() with 19 direct children
lazy_away_step_cgFrankWolfe.away_frank_wolfe(...)
lcg_cache_sizeFrankWolfe.lazified_conditional_gradient(...)
lcg_expensive_LMOInferenceTimingNode: 989.028872/992.284185 on Core.Compiler.Timings.ROOT() with 31 direct children
linear_regressionFrankWolfe.compute_gradient(..) root node has no children lowerbound
moi_optimizerInferenceTimingNode: 2.410960/3.811841 on Core.Compiler.Timings.ROOT() with 18 direct children
movielensInferenceTimingNode: 109.150781/112.783031 on Core.Compiler.Timings.ROOT() with 29 direct children
nonconvex_lasso
nuclear_norm
polynomials
trajectory_comparisonInferenceTimingNode: 63.832704/65.261917 on Core.Compiler.Timings.ROOT() with 16 direct children
|
The precompilation might be a bit heavy to do systematically.
@odow what criteria did you pick to choose what to precompile and what not on MOI?
The text was updated successfully, but these errors were encountered: