Skip to content
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

compiler: set up CallInfo interface type #46961

Merged
merged 1 commit into from
Oct 7, 2022
Merged

compiler: set up CallInfo interface type #46961

merged 1 commit into from
Oct 7, 2022

Conversation

aviatesk
Copy link
Member

This commit defines new CallInfo abstract type that is supposed to be interfaced by all callinfos like MethodMatchInfo. Actual interface features will be added in follow commits.

@aviatesk
Copy link
Member Author

@nanosoldier runbenchmarks("inference", vs=":master")

@aviatesk aviatesk requested review from Keno and vtjnash September 29, 2022 02:48
@nanosoldier
Copy link
Collaborator

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here.

Copy link
Member

@Keno Keno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable to me.

@aviatesk aviatesk force-pushed the avi/callinfo branch 2 times, most recently from 6796108 to fb34f00 Compare September 29, 2022 07:19
@aviatesk
Copy link
Member Author

@nanosoldier runbenchmarks("inference", vs=":master")

@nanosoldier
Copy link
Collaborator

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here.

@aviatesk aviatesk force-pushed the avi/callinfo branch 4 times, most recently from 4d2f51e to c26c2fa Compare October 1, 2022 01:11
@aviatesk
Copy link
Member Author

aviatesk commented Oct 1, 2022

@nanosoldier runbenchmarks("inference", vs=":master")

@aviatesk
Copy link
Member Author

aviatesk commented Oct 1, 2022

@nanosoldier runbenchmarks("inference", vs=":master")

@nanosoldier
Copy link
Collaborator

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here.

@nanosoldier
Copy link
Collaborator

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here.

@aviatesk aviatesk changed the title compiler: setup CallInfo interface type compiler: set up CallInfo interface type Oct 3, 2022
@aviatesk aviatesk force-pushed the avi/callinfo branch 3 times, most recently from 8b8175b to e15304a Compare October 4, 2022 02:42
This commit defines new `CallInfo` abstract type that is supposed to be
interfaced by all callinfos like `MethodMatchInfo`.
Actual interface features will be added in follow commits.
@aviatesk aviatesk merged commit aad2454 into master Oct 7, 2022
@aviatesk aviatesk deleted the avi/callinfo branch October 7, 2022 00:44
@maleadt
Copy link
Member

maleadt commented Oct 8, 2022

This has caused significant regressions in PkgEval: https://s3.amazonaws.com/julialang-reports/nanosoldier/pkgeval/by_date/2022-10/07/report.html

The source seems to be IRTools/Zygote, which obviously is used by a significant part of the ecosystem:

MethodError: Cannot `convert` an object of type Nothing to an object of type Core.Compiler.CallInfo
  
  Closest candidates are:
    convert(::Type{T}, !Matched::T) where T
     @ Base Base.jl:64
  
  Stacktrace:
    [1] setindex!(A::Vector{Core.Compiler.CallInfo}, x::Nothing, i1::Int64)
      @ Base ./array.jl:969
    [2] _unsafe_copyto!(dest::Vector{Core.Compiler.CallInfo}, doffs::Int64, src::Vector{Any}, soffs::Int64, n::Int64)
      @ Base ./array.jl:250
    [3] unsafe_copyto!
      @ ./array.jl:304 [inlined]
    [4] _copyto_impl!
      @ ./array.jl:327 [inlined]
    [5] copyto!
      @ ./array.jl:314 [inlined]
    [6] copyto!
      @ ./array.jl:339 [inlined]
    [7] copyto_axcheck!
      @ ./abstractarray.jl:1172 [inlined]
    [8] Vector{Core.Compiler.CallInfo}(x::Vector{Any})
      @ Base ./array.jl:621
    [9] convert
      @ ./array.jl:613 [inlined]
   [10] InstructionStream
      @ ./compiler/ssair/ir.jl:189 [inlined]
   [11] Core.Compiler.IRCode(ir::IRTools.Inner.IR)
      @ IRTools.Inner.Wrap ~/.julia/packages/IRTools/017wp/src/ir/wrap.jl:62
   [12] update!(ci::Core.CodeInfo, ir::IRTools.Inner.IR)
      @ IRTools.Inner ~/.julia/packages/IRTools/017wp/src/reflection/utils.jl:155
   [13] #s78#1068
      @ ~/.julia/packages/Zygote/dABKa/src/compiler/interface2.jl:40 [inlined]
   [14] var"#s78#1068"(::Any, ctx::Any, f::Any, args::Any)
      @ Zygote ./none:0
   [15] (::Core.GeneratedFunctionStub)(::Any, ::Vararg{Any})
      @ Core ./boot.jl:597
   [16] pullback(f::Function, ps::Params{Zygote.Buffer{Any, Vector{Any}}})
      @ Zygote ~/.julia/packages/Zygote/dABKa/src/compiler/interface.jl:373
   [17] gradient(f::Function, args::Params{Zygote.Buffer{Any, Vector{Any}}})
      @ Zygote ~/.julia/packages/Zygote/dABKa/src/compiler/interface.jl:96

aviatesk added a commit to aviatesk/IRTools.jl that referenced this pull request Oct 8, 2022
@aviatesk
Copy link
Member Author

aviatesk commented Oct 8, 2022

Should be fixed by FluxML/IRTools.jl#101.

aviatesk added a commit to aviatesk/IRTools.jl that referenced this pull request Oct 10, 2022
MikeInnes added a commit to FluxML/IRTools.jl that referenced this pull request Oct 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants