-
-
Notifications
You must be signed in to change notification settings - Fork 398
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
Address invalidations to speed up compile time #2273
Comments
Here's some shiny new tools on this front: JuliaLang/www.julialang.org#1093 |
On Julia 1.6-RC1 and current JuMP master: julia> length(invalidations)
2102
julia> trees[end-4]
inserting collect_to_with_first!(dest::Union{JuMP.Containers.DenseAxisArray, JuMP.Containers.SparseAxisArray}, first_value, iterator, state) in JuMP.Containers at /Users/oscar/.julia/packages/JuMP/W6eqk/src/Containers/Containers.jl:37 invalidated:
backedges: 1: superseding collect_to_with_first!(dest, v1, itr, st) in Base at array.jl:705 with MethodInstance for collect_to_with_first!(::Any, ::Any, ::Base.Generator{_A, Test.var"#24#25"{Int64}} where _A, ::Any) (24 children)
julia> trees[end-7]
inserting println(io::IO, card::MathOptInterface.FileFormats.MPS.Card) in MathOptInterface.FileFormats.MPS at /Users/oscar/.julia/packages/MathOptInterface/ZJFKw/src/FileFormats/MPS/MPS.jl:115 invalidated:
backedges: 1: superseding println(xs...) in Base at coreio.jl:4 with MethodInstance for println(::Any, ::Any) (1 children)
2: superseding println(io::IO, xs...) in Base at strings/io.jl:73 with MethodInstance for println(::Base.TTY, ::Any) (2 children)
3: superseding println(io::IO, xs...) in Base at strings/io.jl:73 with MethodInstance for println(::IO, ::Any) (7 children)
julia> trees[end-9]
inserting instantiate(bc::Base.Broadcast.Broadcasted{var"#s141", Axes, F, Args} where {var"#s141"<:JuMP.Containers.BroadcastStyle, Axes, F, Args<:Tuple}) in JuMP.Containers at /Users/oscar/.julia/packages/JuMP/W6eqk/src/Containers/SparseAxisArray.jl:194 invalidated:
backedges: 1: superseding instantiate(bc::Base.Broadcast.Broadcasted{var"#s829", Axes, F, Args} where {var"#s829"<:Base.Broadcast.AbstractArrayStyle{0}, Axes, F, Args<:Tuple}) in Base.Broadcast at broadcast.jl:273 with MethodInstance for instantiate(::Base.Broadcast.Broadcasted{Style, Nothing, typeof(Base.wrap_string), Args} where {Style<:Base.Broadcast.AbstractArrayStyle{0}, Args<:Tuple}) (1 children)
2: superseding instantiate(bc::Base.Broadcast.Broadcasted{Style, Axes, F, Args} where {Axes, F, Args<:Tuple}) where Style in Base.Broadcast at broadcast.jl:264 with MethodInstance for instantiate(::Base.Broadcast.Broadcasted{Style, Nothing, typeof(Base.wrap_string), Args} where {Style<:Union{Nothing, Base.Broadcast.BroadcastStyle}, Args<:Tuple}) (1 children)
3: superseding instantiate(bc::Base.Broadcast.Broadcasted{Style, Axes, F, Args} where {Axes, F, Args<:Tuple}) where Style in Base.Broadcast at broadcast.jl:264 with MethodInstance for instantiate(::Base.Broadcast.Broadcasted{Style, Nothing, typeof(eachindex), Args} where {Style<:Union{Nothing, Base.Broadcast.BroadcastStyle}, Args<:Tuple}) (1 children)
4: superseding instantiate(bc::Base.Broadcast.Broadcasted{var"#s829", Axes, F, Args} where {var"#s829"<:Base.Broadcast.AbstractArrayStyle{0}, Axes, F, Args<:Tuple}) in Base.Broadcast at broadcast.jl:273 with MethodInstance for instantiate(::Base.Broadcast.Broadcasted{Style, Nothing, typeof(eachindex), Args} where {Style<:Base.Broadcast.AbstractArrayStyle{0}, Args<:Tuple}) (4 children)
4 mt_cache
julia> trees[end-12]
inserting *(z::MutableArithmetics.Zero, ::Any) in MutableArithmetics at /Users/oscar/.julia/packages/MutableArithmetics/bPWR4/src/rewrite.jl:49 invalidated:
mt_backedges: 1: signature Tuple{typeof(*), Any, String} triggered MethodInstance for var"#precompile#195"(::Bool, ::Bool, ::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, ::typeof(Pkg.API.precompile), ::Pkg.Types.Context) (0 children)
2: signature Tuple{typeof(*), Any, String} triggered MethodInstance for promptf() (0 children)
3: signature Tuple{typeof(*), Any, String} triggered MethodInstance for handle_error(::FileIO.NotInstalledError, ::Any) (0 children)
4: signature Tuple{typeof(*), Any, Char} triggered MethodInstance for _show(::IOBuffer, ::SnoopCompileCore.InferenceTiming) (1 children)
5: signature Tuple{typeof(*), Any, String} triggered MethodInstance for (::Pkg.API.var"#206#231"{Int64, Pkg.MiniProgressBars.MiniProgressBar, Vector{String}, String, String, Pkg.API.var"#ansi_moveup#226", Pkg.API.var"#color_string#225", Base.Event, Vector{Base.PkgId}, Dict{Base.PkgId, String}, Vector{Base.PkgId}, Dict{Base.PkgId, Bool}, Dict{Base.PkgId, Bool}, Vector{Base.PkgId}, Base.TTY})() (2 children)
julia> trees[end-13]
inserting eachindex(A::JuMP.Containers.DenseAxisArray) in JuMP.Containers at /Users/oscar/.julia/packages/JuMP/W6eqk/src/Containers/DenseAxisArray.jl:142 invalidated:
backedges: 1: superseding eachindex(A::AbstractVector{T} where T) in Base at abstractarray.jl:256 with MethodInstance for eachindex(::AbstractVector{T} where T) (1 children)
7 mt_cache
julia> trees[end-18]
inserting *(::Any, z::MutableArithmetics.Zero) in MutableArithmetics at /Users/oscar/.julia/packages/MutableArithmetics/bPWR4/src/rewrite.jl:50 invalidated:
mt_backedges: 1: signature Tuple{typeof(*), Union{Regex, String}, Any} triggered MethodInstance for _show(::IOBuffer, ::SnoopCompileCore.InferenceTiming) (0 children) |
We've had some success with the MOI compile time here: jump-dev/MathOptInterface.jl#1313 The MPS.Card issue was fixed by jump-dev/MathOptInterface.jl#1328 |
Removing JSONSchema is a big source: jump-dev/MathOptInterface.jl#1333 And this inference issue in Base is also the cause of another 200: JuliaLang/julia#40785 |
JuliaLang/julia#40785 is merged and being back ported to Julia 1.6.2. |
Closing in favor of #2735 |
JuliaLang/www.julialang.org#794
JuMP is mentioned as a package that's affected by this issue.
The text was updated successfully, but these errors were encountered: