-
Notifications
You must be signed in to change notification settings - Fork 219
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
Test with Tapir #2289
Test with Tapir #2289
Conversation
65de3dc
to
596457a
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2289 +/- ##
==========================================
+ Coverage 86.79% 86.86% +0.07%
==========================================
Files 24 24
Lines 1598 1599 +1
==========================================
+ Hits 1387 1389 +2
+ Misses 211 210 -1 ☔ View full report in Codecov by Sentry. |
@willtebbutt, could you please take a look at the logs of the failing CI runs and comment on whether these are likely to be Tapir issues, or something we need to address? In one case |
Pull Request Test Coverage Report for Build 10679664210Details
💛 - Coveralls |
Co-authored-by: Hong Ge <3279477+yebai@users.noreply.github.com>
@willtebbutt can you help take a look at the |
Assuming that we're not considering the (this is in addition to the recursion issue -- taking a look at that now) |
@sunxd3 can this be replaced with the new |
Aye the |
Sorry for letting this go under my radar. From the look of it, I don't think ( Happy to make this modification, should I directly commit to this PR @yebai? It should end up in DynamicPPL, but may not be a good idea to experiment here. |
@willtebbutt @mhauru I think the |
Thanks @sunxd3. In addition to the infinite recursion one, there's also this: MethodError: no method matching translate(::Val{Core.Intrinsics.atomic_pointerset})
Closest candidates are:
translate(::Val{Core.Intrinsics.copysign_float})
@ Tapir ~/.julia/packages/Tapir/vvmqf/src/rrules/builtins.jl:55
translate(::Val{Core.Intrinsics.slt_int})
@ Tapir ~/.julia/packages/Tapir/vvmqf/src/rrules/builtins.jl:64
translate(::Val{Core.Intrinsics.sdiv_int})
@ Tapir ~/.julia/packages/Tapir/vvmqf/src/rrules/builtins.jl:64
...
Stacktrace:
[1] lift_intrinsic(::Core.IntrinsicFunction, ::Core.SSAValue, ::GlobalRef, ::Vararg{Any})
@ Tapir ~/.julia/packages/Tapir/vvmqf/src/interpreter/ir_normalisation.jl:147
[2] intrinsic_to_function
@ ~/.julia/packages/Tapir/vvmqf/src/interpreter/ir_normalisation.jl:136 [inlined]
[3] normalise!(ir::Core.Compiler.IRCode, spnames::Vector{Symbol})
@ Tapir ~/.julia/packages/Tapir/vvmqf/src/interpreter/ir_normalisation.jl:27
[4] build_rrule(interp::Tapir.TapirInterpreter{Tapir.DefaultCtx}, sig_or_mi::Core.MethodInstance; safety_on::Bool, silence_safety_messages::Bool)
@ Tapir ~/.julia/packages/Tapir/vvmqf/src/interpreter/s2s_reverse_mode_ad.jl:769
[5] build_rrule
@ ~/.julia/packages/Tapir/vvmqf/src/interpreter/s2s_reverse_mode_ad.jl:747 [inlined]
[6] (::Tapir.LazyDerivedRule{Tapir.TapirInterpreter{Tapir.DefaultCtx}, Tapir.DerivedRule{MistyClosures.MistyClosure{Core.OpaqueClosure{Tuple{Tapir.CoDual{typeof(Base._unsafe_copyto!), Tapir.NoFData}, Tapir.CoDual{Matrix{Real}, Matrix{Any}}, Tapir.CoDual{Int64, Tapir.NoFData}, Tapir.CoDual{Matrix{Float64}, Matrix{Float64}}, Tapir.CoDual{Int64, Tapir.NoFData}, Tapir.CoDual{Int64, Tapir.NoFData}}, Tapir.CoDual{Matrix{Real}, Matrix{Any}}}}, MistyClosures.MistyClosure{Core.OpaqueClosure{Tuple{Tapir.NoRData}, NTuple{6, Tapir.NoRData}}}, Val{false}, Val{6}}})(::Tapir.CoDual{typeof(Base._unsafe_copyto!), Tapir.NoFData}, ::Tapir.CoDual{Matrix{Real}, Matrix{Any}}, ::Tapir.CoDual{Int64, Tapir.NoFData}, ::Tapir.CoDual{Matrix{Float64}, Matrix{Float64}}, ::Tapir.CoDual{Int64, Tapir.NoFData}, ::Tapir.CoDual{Int64, Tapir.NoFData})
@ Tapir ~/.julia/packages/Tapir/vvmqf/src/interpreter/s2s_reverse_mode_ad.jl:1252
[7] RRuleZeroWrapper
@ ~/.julia/packages/Tapir/vvmqf/src/interpreter/s2s_reverse_mode_ad.jl:244 [inlined] which you can see in the |
Yes, this is definitely a Tapir.jl limitation -- we're missing a rule for |
Getting there! Many more of the tests now appear to pass. Will be debugging the remaining ones tomorrow. |
Having spent some time digging in to the remaining time-out issue, it looks to be the same problem as we've seen before with there being a discrepancy between the type inference results obtained by The other issues look quite tractable, and I'm hoping they're fairly straightforward to fix. |
Why a type inference discrepancy would cause such a significant slowdown? Also, feel free to disable respective tests in this PR so we can merge it—this is not really a Tapir issue. |
It causes a lot of downstream type instabilities in low-level functions, which causes a 100x-1000x slowdown (very approximately).
Good idea. I'll open proper issues in Tapir / Cthulhu and, once I've done this, disable some of these tests. |
Co-authored-by: Will Tebbutt <wct23@cam.ac.uk>
@mhauru, there seem to be some merge conflicts which prevent CI from running. Can you help resolve that?
@willtebbutt I am slightly surprised about the amount of issues arising here. How much more time do you think it will take? |
Merge conflicts sorted. |
Sadly it looks like the most recent PR has produced something which Tapir.jl doesn't like. Doesn't look like it should be too nasty. |
Update: the problems look to be straightforward to resolve. Version 0.2.44 of Tapir will work, and should be available in the next hour or two. |
For reasons unclear to me, 0.2.44 isn't getting installed in CI yet. Probably it'll be resolved by the morning, so I'll take a look then . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had one question about a change I didn't fully understand. Otherwise, I'm happy once tests pass and @willtebbutt is happy.
I'm happy. |
Thanks @willtebbutt, @mhauru and @sunxd3. Perfect to see this merged. |
Closes #2247