Skip to content

test: close three AD coverage gaps (#100) - #151

Merged
seabbs merged 3 commits into
mainfrom
test/ad-coverage-100
Aug 12, 2026
Merged

seabbs merged 3 commits into
mainfrom
test/ad-coverage-100

Conversation

@seabbs-bot

Copy link
Copy Markdown
Collaborator

Summary

Closes the three AD coverage gaps from #100 (items 1-3 only) by adding
three scenarios to the test/ADFixtures registry, so they run under the
existing 6-backend matrix (ForwardDiff, ReverseDiff, Mooncake
forward/reverse, Enzyme forward/reverse) instead of being untested or
ForwardDiff-only ad hoc checks:

  1. Discrete per-bin reporting-hazard path — modify(dist, effects; link=:logit) on a discrete base. New scenario "Modified discrete logit-link per-bin logpdf", gradient wrt the per-bin effect vector.
  2. QuadGK numeric-quadrature path — the callable/general-link modify
    path through quadgk (ModifiedDistributionsQuadGKExt). New scenario
    "Modified numeric quadrature clamped additive LogNormal logpdf", a
    clamped negative additive effect so the gradient genuinely exercises
    _scan_crossings' clamp-knot bisection as well as the quadrature.
  3. series_transform — the generic forward-op escape hatch. New
    scenario "Transformed series_transform LogNormal logpdf", mirroring
    the existing thin/cumulative scenarios.

QuadGK is added as a test/ADFixtures dependency so using QuadGK
activates ModifiedDistributionsQuadGKExt inside the registry.

Files touched: test/ADFixtures/Project.toml, test/ADFixtures/src/ADFixtures.jl
only, per this lane's scope. test/QuadGKExt.jl and test/ad/ were left
alone — see below.

Results by backend

Backend Scenarios (of 14) Notes
ForwardDiff 14/14 pass
ReverseDiff (tape) 14/14 pass
Mooncake forward 14/14 pass
Enzyme forward 14/14 pass
Mooncake reverse 13 pass, 1 broken QuadGK scenario only
Enzyme reverse 13 pass, 1 broken QuadGK scenario only

294/294 assertions pass on the four working backends (task test-ad,
run via EpiAwarePackageTools.test_working_backend in a warm REPL
against the real test/ad environment — the same functions the
test/ad/scenarios.jl test items call). The discrete logit-link and
series_transform scenarios pass cleanly on all six backends with no
exceptions.

The QuadGK scenario fails on both reverse-mode backends

The numeric-quadrature scenario (item 2) is the one gap that stays open,
and deliberately so — it's a genuine per-backend limitation, not
something papered over.

Mooncake reverse — QuadGK.cachedrule (a QuadGK-internal function,
~/.julia/packages/QuadGK/5mgi5/src/gausskronrod.jl:633) uses a
try/catch, which Mooncake.jl's reverse mode does not support at all:

Mooncake failed to differentiate the following method:
│ cachedrule(::Union{Type{ComplexF64}, Type{Float64}}, n::Integer)
│
│ Caused by:
│ try/catch/finally blocks are not supported by Mooncake.jl in reverse mode.
│ The code being differentiated contains a try/catch or try/finally construct.
│ Strategies for resolving this error include re-writing code to avoid
│ try/catch blocks (e.g. by replacing them with explicit conditional checks),
│ or providing a custom rrule!! for the relevant function. See the known
│ limitations documentation for more context.
│
│ MooncakeRuleCompilationError: an error occurred while Mooncake was compiling a
│ rule to differentiate something. ...
└ @ QuadGK ~/.julia/packages/QuadGK/5mgi5/src/gausskronrod.jl:633

This is a documented, blanket Mooncake reverse-mode limitation
(try/catch is unsupported full stop) sitting inside QuadGK's own code,
not code this package controls. It is very likely to trip on any use
of quadgk under Mooncake reverse, not just this scenario's clamped
case.

Enzyme reverse — a MethodError, because Enzyme's activity analysis
classifies our integrand closure as MixedDuplicated rather than
Const/Active:

MethodError: no method matching reverse(::EnzymeCore.EnzymeRules.RevConfigWidth{1, true, false, (false, true, false, false, false), true, false}, ::Const{typeof(QuadGK.quadgk)}, ::Active{Tuple{Float64, Float64}}, ::Tuple{Vector{QuadGK.Segment{Float64, Float64, Float64}}, Nothing}, ::MixedDuplicated{ModifiedDistributionsQuadGKExt.var"#_cumhazard##0#_cumhazard##1"{ModifiedDistributions.Modified{Distributions.LogNormal{Float64}, ADFixtures.var"#57#58"{Vector{Float64}}, ModifiedDistributions.HazardLink{typeof(identity), typeof(identity)}, Distributions.Continuous}}}, ::Active{Float64}, ::Active{Float64}, ::Active{Float64})
The function `reverse` exists, but no method is defined for this combination of argument types.

Closest candidates are:
  reverse(::EnzymeCore.EnzymeRules.RevConfig, !Matched::Const{typeof(hypot)}, ::Any, ::Any, ::Annotation, ::Annotation, ::Annotation, ::Annotation...) where N
   @ Enzyme ~/.julia/packages/Enzyme/OvStQ/src/internal_rules/math.jl:84
  reverse(::Any, ::Const{typeof(QuadGK.quadgk)}, ::Active, ::Any, !Matched::Union{Active, Const}, ::Annotation{T}...; kws...) where T
   @ QuadGKEnzymeExt ~/.julia/packages/QuadGK/5mgi5/ext/QuadGKEnzymeExt.jl:87
  ...

I read QuadGKEnzymeExt's custom reverse rule
(~/.julia/packages/QuadGK/5mgi5/ext/QuadGKEnzymeExt.jl:87-106): it does
handle a variadic knot list correctly (segs::Annotation{T}...,
ntuple(i -> nothing, Val(length(segs)-2)) for interior knots), so the
clamp-knot subdivision itself is not the problem. The rule only declares
methods for f::Union{Const, Active} though, and our integrand closes
over a Modified that mixes a non-differentiated base distribution
(LogNormal(1.5, 0.5), a fixed literal) with the differentiated effect —
Enzyme's activity analysis concludes that closure is mixed
(MixedDuplicated), which the extension's rule has no method for. My
read is this is most likely a gap in QuadGKEnzymeExt (it doesn't cover
mixed-activity integrands), not a bug in this package, but I have not
confirmed that a differently-shaped closure (e.g. one where the base
params are also active, avoiding the const/active split) would succeed —
flagging that as unconfirmed rather than asserting it.

How the failure is marked (and why it stays visible)

ADFixtures.backend_broken_scenarios() now maps "Mooncake reverse" and
"Enzyme reverse" to this scenario's name. Per the shared
EpiAwarePackageTools AD harness contract, a scenario listed there is
routed through check_broken (@test_broken on failure) instead of the
hard DifferentiationInterfaceTest.test_differentiation sweep, for
that scenario, on those two backends only — every other scenario, and
this same scenario on the other four backends, still runs the full hard
check.

This is not the harness's silent-skip mechanism
(backend_skip_scenarios(), for a backend too unstable to run at all —
not needed here since the exception is caught cleanly). @test_broken
shows up explicitly in the test summary (Pass 273, Broken 1, Total 274 for each of the two reverse backends) and, importantly, if a future
QuadGK/Mooncake/Enzyme release fixes this, @test_broken flips to an
unexpected pass CI failure until the declaration is removed — so the
gap cannot silently stay "fixed-but-still-declared-broken" or
"still-broken-but-looks-closed" in either direction.

Follow-ups filed separately (not fixed in this PR, out of file scope)

  • A pre-existing Vector{Float64}/Dual type-stability bug in
    _scan_crossings (src/Modified.jl), found while designing the QuadGK
    scenario: differentiating a base distribution parameter (not just
    the effect) through a genuinely clamped numeric-path law throws a
    MethodError pushing a Dual into a Vector{Float64} knot buffer,
    even under plain ForwardDiff. Worked around here by keeping the base
    fixed in the new scenario (matching the precedent already set by the
    existing ad hoc test at test/Modified.jl, which also only
    differentiates the effect for this clamped case) rather than editing
    src/Modified.jl, which is out of this lane's file scope.
  • The two reverse-mode QuadGK failures documented above — tracked as a
    standalone package limitation issue, referencing this PR and AD coverage + test-depth gaps found extrapolating CD#223/#225 #100.

This was opened by a bot. Please ping @seabbs for any questions.

Registers three ADFixtures scenarios previously outside the 6-backend
AD matrix: the discrete per-bin reporting-hazard modify path (logit
link), the QuadGK numeric cumulative-hazard quadrature path (clamped
additive effect), and the generic series_transform escape hatch.
QuadGK is added as an ADFixtures dependency to activate the extension.

The QuadGK scenario differentiates only the effect, not the base
distribution params: differentiating a base param through a genuinely
clamped numeric law hits a pre-existing type-stability bug in
_scan_crossings (src/Modified.jl, out of this PR's file scope) where
a Dual value can be pushed into a Vector{Float64} knot buffer. Tracked
as a follow-up rather than fixed here.

ForwardDiff: all 14 scenarios (294 assertions) pass.
Mooncake reverse and Enzyme reverse both genuinely cannot differentiate
the QuadGK numeric-quadrature path here, for different reasons:

- Mooncake reverse: QuadGK.cachedrule uses a try/catch, unsupported by
  Mooncake.jl's reverse mode (a documented Mooncake limitation).
- Enzyme reverse: QuadGKEnzymeExt's custom quadgk reverse rule does not
  match the call signature reached through the clamp-knot subdivision
  path (a runtime-length knot splat), so Enzyme falls through to plain
  source differentiation and hits an unsupported reverse method.

Both forward variants of the same two backends, ForwardDiff, and
ReverseDiff all differentiate this scenario correctly, confirming the
gap is backend-specific rather than a package bug. Declaring it in
backend_broken_scenarios() routes it through check_broken (soft,
@test_broken) instead of the hard test_differentiation sweep.

Full sweeps: ForwardDiff 294/294, ReverseDiff 294/294, Mooncake
forward 294/294, Enzyme forward 294/294, Mooncake reverse 273 pass +
1 broken, Enzyme reverse 273 pass + 1 broken.
@seabbs-bot

Copy link
Copy Markdown
Collaborator Author

Follow-up issue for the reverse-mode QuadGK limitation: #152

This was opened by a bot. Please ping @seabbs for any questions.

@github-actions

Copy link
Copy Markdown
Contributor

Try this Pull Request!

Option 1: Julia Package Manager

Open Julia and type:

import Pkg
Pkg.activate(temp=true)
Pkg.add(url="https://github.com/EpiAware/ModifiedDistributions.jl", rev="test/ad-coverage-100")
using ModifiedDistributions

Option 2: Local Checkout

If you have the repo locally:

git checkout test/ad-coverage-100
julia --project=. -e "using Pkg; Pkg.instantiate()"

@codecov

codecov Bot commented Aug 10, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Flag Coverage Δ
ad-enzyme-forward 40.80% <ø> (+13.66%) ⬆️
ad-enzyme-reverse 40.80% <ø> (+13.66%) ⬆️
ad-forwarddiff 34.74% <ø> (+18.57%) ⬆️
ad-mooncake-forward 34.74% <ø> (+18.57%) ⬆️
ad-mooncake-reverse 34.74% <ø> (+18.57%) ⬆️
ad-reversediff 34.74% <ø> (+18.57%) ⬆️
unit 97.42% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

Copy link
Copy Markdown
Contributor

📖 Documentation preview is ready!

View the docs for this PR at: https://EpiAware.github.io/ModifiedDistributions.jl/previews/PR151/

This preview will be updated automatically when you push new commits.

@github-actions

Copy link
Copy Markdown
Contributor

Benchmark comparison vs base

Minimum time per call. Buckets are PR time as a % of base, so lower is faster (🟢 faster, ⚪ within 5%, 🔴 slower). Counts of benchmarks per bucket:

Group 🟢 <50% 🟢 50–75% 🟢 75–95% ⚪ 95–105% 🔴 105–125% 🔴 125–150% 🔴 >150%
Evaluation · 1 12 16 11 · ·
ForwardDiff · · 2 8 1 · ·
ReverseDiff (tape) · · · 11 · · ·
Mooncake reverse · · · 8 3 · ·
Mooncake forward · · 2 9 · · ·
Enzyme reverse · · · 10 1 · ·
Enzyme forward · · · 4 7 · ·
Evaluation — 40 benchmarks (by time change)
Benchmark base PR time memory
Baseline / LogNormal / construction 30.0 ns 20.0 ns 🟢 0.67× —
Baseline / LogNormal / pdf 3.34 μs 2.94 μs 🟢 0.88× ⚪ 1.0×
Modified / IdentityLink / ccdf 8.49 μs 7.5 μs 🟢 0.88× ⚪ 1.0×
Modified / IdentityLink / pdf 14.3 μs 12.66 μs 🟢 0.89× ⚪ 1.0×
Modified / IdentityLink / rand 613.77 μs 543.52 μs 🟢 0.89× ⚪ 1.0×
Modified / IdentityLink / cdf 8.07 μs 7.17 μs 🟢 0.89× ⚪ 1.0×
Affine / LogNormal / pdf 4.22 μs 3.76 μs 🟢 0.89× ⚪ 1.0×
Modified / IdentityLink / logpdf 11.63 μs 10.41 μs 🟢 0.9× ⚪ 1.0×
Affine / LogNormal / quantile 400.0 ns 440.0 ns 🔴 1.1× ⚪ 1.0×
Weighted / Product / logpdf 1.72 μs 1.88 μs 🔴 1.09× ⚪ 1.0×
Affine / LogNormal / rand 811.0 ns 881.0 ns 🔴 1.09× ⚪ 1.0×
Modified / LogLink / cdf 6.66 μs 6.11 μs 🟢 0.92× ⚪ 1.0×
Baseline / LogNormal / quantile 380.0 ns 410.0 ns 🔴 1.08× ⚪ 1.0×
Modified / LogLink / quantile 811.0 ns 871.0 ns 🔴 1.07× ⚪ 1.0×
Affine / LogNormal / ccdf 3.5 μs 3.26 μs 🟢 0.93× ⚪ 1.0×
Baseline / LogNormal / logpdf 1.52 μs 1.62 μs 🔴 1.07× ⚪ 1.0×
Transformed / cumulative / logpdf 1.52 μs 1.62 μs 🔴 1.07× ⚪ 1.0×
Transformed / thin / logpdf 1.52 μs 1.62 μs 🔴 1.07× ⚪ 1.0×
Modified / IdentityLink / quantile 117.62 μs 109.94 μs 🟢 0.93× ⚪ 1.0×
Modified / LogLink / ccdf 6.13 μs 5.74 μs 🟢 0.94× ⚪ 1.0×
Weighted / scalar / logpdf 1.61 μs 1.71 μs 🔴 1.06× ⚪ 1.0×
Affine / LogNormal / cdf 3.54 μs 3.33 μs 🟢 0.94× ⚪ 1.0×
Weighted / Product / construction 170.0 ns 180.0 ns 🔴 1.06× ⚪ 1.0×
Modified / LogLink / pdf 8.86 μs 9.32 μs 🔴 1.05× ⚪ 1.0×
Affine / LogNormal / construction 30.0 ns 29.0 ns ⚪ 0.97× —
Modified / IdentityLink / construction 30.0 ns 29.0 ns ⚪ 0.97× —
Modified / LogLink / construction 30.0 ns 29.0 ns ⚪ 0.97× —
Transformed / cumulative / construction 30.0 ns 29.0 ns ⚪ 0.97× —
Transformed / thin / construction 30.0 ns 29.0 ns ⚪ 0.97× —
Weighted / scalar / construction 30.0 ns 29.0 ns ⚪ 0.97× —
Modified / LogLink / logpdf 7.75 μs 8.0 μs ⚪ 1.03× ⚪ 1.0×
Transformed / cumulative / cdf 2.7 μs 2.62 μs ⚪ 0.97× ⚪ 1.0×
Transformed / thin / cdf 2.7 μs 2.62 μs ⚪ 0.97× ⚪ 1.0×
Baseline / LogNormal / cdf 2.7 μs 2.62 μs ⚪ 0.97× ⚪ 1.0×
Baseline / LogNormal / ccdf 2.7 μs 2.63 μs ⚪ 0.97× ⚪ 1.0×
Modified / LogLink / rand 4.52 μs 4.45 μs ⚪ 0.98× ⚪ 1.0×
Transformed / cumulative / rand 620.0 ns 611.0 ns ⚪ 0.99× ⚪ 1.0×
Affine / LogNormal / logpdf 2.62 μs 2.6 μs ⚪ 0.99× ⚪ 1.0×
Baseline / LogNormal / rand 620.0 ns 621.0 ns ⚪ 1.0× ⚪ 1.0×
Transformed / thin / rand 620.0 ns 621.0 ns ⚪ 1.0× ⚪ 1.0×
AD gradients — 82 benchmarks (by time change)
Benchmark base PR time memory
AD gradients / Modified discrete logit-link per-bin logpdf / Enzyme forward (new) — 12.41 μs — —
AD gradients / Modified discrete logit-link per-bin logpdf / Enzyme reverse (new) — 12.98 μs — —
AD gradients / Modified discrete logit-link per-bin logpdf / ForwardDiff (new) — 2.02 μs — —
AD gradients / Modified discrete logit-link per-bin logpdf / Mooncake forward (new) — 22.03 μs — —
AD gradients / Modified discrete logit-link per-bin logpdf / Mooncake reverse (new) — 85.79 μs — —
AD gradients / Modified discrete logit-link per-bin logpdf / ReverseDiff (tape) (new) — 44.67 μs — —
AD gradients / Modified numeric quadrature clamped additive LogNormal logpdf / Enzyme forward (new) — 150.6 μs — —
AD gradients / Modified numeric quadrature clamped additive LogNormal logpdf / ForwardDiff (new) — 119.52 μs — —
AD gradients / Modified numeric quadrature clamped additive LogNormal logpdf / Mooncake forward (new) — 476.51 μs — —
AD gradients / Modified numeric quadrature clamped additive LogNormal logpdf / ReverseDiff (tape) (new) — 605.72 μs — —
AD gradients / Transformed series_transform LogNormal logpdf / Enzyme forward (new) — 7.84 μs — —
AD gradients / Transformed series_transform LogNormal logpdf / Enzyme reverse (new) — 1.93 μs — —
AD gradients / Transformed series_transform LogNormal logpdf / ForwardDiff (new) — 480.0 ns — —
AD gradients / Transformed series_transform LogNormal logpdf / Mooncake forward (new) — 5.19 μs — —
AD gradients / Transformed series_transform LogNormal logpdf / Mooncake reverse (new) — 16.01 μs — —
AD gradients / Transformed series_transform LogNormal logpdf / ReverseDiff (tape) (new) — 14.13 μs — —
AD gradients / Product{Weighted} LogNormal vector logpdf / Mooncake reverse 23.66 μs 25.65 μs 🔴 1.08× ⚪ 1.0×
AD gradients / Weighted Sequential observed-total logpdf / Enzyme reverse 300.73 μs 324.56 μs 🔴 1.08× ⚪ 1.0×
AD gradients / Weighted Sequential observed-total logpdf / ForwardDiff 85.38 μs 91.11 μs 🔴 1.07× ⚪ 1.0×
AD gradients / Weighted Affine LogNormal nested logpdf / Mooncake forward 7.42 μs 6.94 μs 🟢 0.94× ⚪ 1.0×
AD gradients / Weighted Sequential observed-total logpdf / Mooncake reverse 1.13 ms 1.2 ms 🔴 1.06× ⚪ 1.0×
AD gradients / Weighted Affine LogNormal nested logpdf / ForwardDiff 671.0 ns 631.0 ns 🟢 0.94× ⚪ 1.0×
AD gradients / Transformed cumulative LogNormal logpdf / Enzyme forward 7.47 μs 7.9 μs 🔴 1.06× ⚪ 1.0×
AD gradients / Modified LogNormal log-link logpdf / ForwardDiff 871.0 ns 821.0 ns 🟢 0.94× ⚪ 1.0×
AD gradients / Weighted Affine LogNormal nested logpdf / Enzyme forward 7.6 μs 8.02 μs 🔴 1.05× ⚪ 1.0×
AD gradients / Weighted Affine LogNormal nested logpdf / Mooncake reverse 17.26 μs 18.16 μs 🔴 1.05× ⚪ 1.0×
AD gradients / Transformed thin LogNormal logpdf / Enzyme forward 7.49 μs 7.88 μs 🔴 1.05× ⚪ 1.0×
AD gradients / Weighted LogNormal observation-time weight logpdf / Enzyme forward 7.37 μs 7.76 μs 🔴 1.05× ⚪ 1.0×
AD gradients / Product{Weighted} LogNormal vector logpdf / Enzyme forward 7.62 μs 8.02 μs 🔴 1.05× ⚪ 1.0×
AD gradients / Modified LogNormal identity-link logpdf / Mooncake forward 8.47 μs 8.04 μs 🟢 0.95× ⚪ 1.0×
AD gradients / Modified LogNormal identity-link logpdf / Enzyme forward 8.1 μs 8.52 μs 🔴 1.05× ⚪ 1.0×
AD gradients / Weighted LogNormal scalar logpdf / Enzyme forward 7.4 μs 7.78 μs 🔴 1.05× ⚪ 1.0×
AD gradients / Modified LogNormal log-link logpdf / Enzyme forward 7.94 μs 8.34 μs ⚪ 1.05× ⚪ 1.0×
AD gradients / Modified LogNormal log-link logpdf / Mooncake forward 7.66 μs 7.28 μs ⚪ 0.95× ⚪ 1.0×
AD gradients / Affine LogNormal scale+shift logpdf / Enzyme forward 7.86 μs 8.24 μs ⚪ 1.05× ⚪ 1.0×
AD gradients / Affine LogNormal scale+shift logpdf / Mooncake forward 6.88 μs 6.56 μs ⚪ 0.95× ⚪ 1.0×
AD gradients / Thinned convolved series sum / Enzyme forward 9.98 μs 10.44 μs ⚪ 1.05× ⚪ 1.0×
AD gradients / Transformed thin LogNormal logpdf / Mooncake forward 5.45 μs 5.22 μs ⚪ 0.96× ⚪ 1.0×
AD gradients / Weighted LogNormal scalar logpdf / Mooncake forward 5.97 μs 5.73 μs ⚪ 0.96× ⚪ 1.0×
AD gradients / Weighted LogNormal observation-time weight logpdf / ReverseDiff (tape) 15.64 μs 16.24 μs ⚪ 1.04× ⚪ 1.0×
AD gradients / Weighted LogNormal observation-time weight logpdf / ForwardDiff 540.0 ns 520.0 ns ⚪ 0.96× ⚪ 1.0×
AD gradients / Weighted LogNormal observation-time weight logpdf / Mooncake forward 5.92 μs 5.7 μs ⚪ 0.96× ⚪ 1.0×
AD gradients / Product{Weighted} LogNormal vector logpdf / Mooncake forward 6.6 μs 6.36 μs ⚪ 0.96× ⚪ 1.0×
AD gradients / Thinned convolved series sum / Mooncake forward 12.25 μs 11.81 μs ⚪ 0.96× ⚪ 1.0×
AD gradients / Weighted LogNormal scalar logpdf / Enzyme reverse 1.18 μs 1.22 μs ⚪ 1.03× ⚪ 1.0×
AD gradients / Weighted LogNormal observation-time weight logpdf / Enzyme reverse 1.19 μs 1.23 μs ⚪ 1.03× ⚪ 1.0×
AD gradients / Weighted LogNormal scalar logpdf / Mooncake reverse 19.17 μs 19.82 μs ⚪ 1.03× ⚪ 1.0×
AD gradients / Affine LogNormal scale+shift logpdf / ForwardDiff 631.0 ns 610.0 ns ⚪ 0.97× ⚪ 1.0×
AD gradients / Thinned convolved series sum / Enzyme reverse 14.36 μs 13.92 μs ⚪ 0.97× ⚪ 1.0×
AD gradients / Transformed thin LogNormal logpdf / Mooncake reverse 15.95 μs 15.47 μs ⚪ 0.97× ⚪ 1.0×
AD gradients / Weighted LogNormal scalar logpdf / ReverseDiff (tape) 15.77 μs 16.25 μs ⚪ 1.03× ⚪ 1.0×
AD gradients / Product{Weighted} LogNormal vector logpdf / ReverseDiff (tape) 15.3 μs 15.75 μs ⚪ 1.03× ⚪ 1.0×
AD gradients / Affine LogNormal scale+shift logpdf / ReverseDiff (tape) 15.18 μs 15.62 μs ⚪ 1.03× ⚪ 1.0×
AD gradients / Thinned convolved series sum / ReverseDiff (tape) 34.17 μs 35.13 μs ⚪ 1.03× ⚪ 1.0×
AD gradients / Weighted LogNormal observation-time weight logpdf / Mooncake reverse 17.85 μs 18.3 μs ⚪ 1.03× ⚪ 1.0×
AD gradients / Transformed cumulative LogNormal logpdf / Mooncake forward 5.39 μs 5.25 μs ⚪ 0.97× ⚪ 1.0×
AD gradients / Weighted Affine LogNormal nested logpdf / Enzyme reverse 791.0 ns 811.0 ns ⚪ 1.03× ⚪ 1.0×
AD gradients / Affine LogNormal scale+shift logpdf / Enzyme reverse 2.86 μs 2.94 μs ⚪ 1.03× ⚪ 1.0×
AD gradients / Transformed cumulative LogNormal logpdf / ReverseDiff (tape) 13.8 μs 14.13 μs ⚪ 1.02× ⚪ 1.0×
AD gradients / Thinned convolved series sum / Mooncake reverse 25.74 μs 26.34 μs ⚪ 1.02× ⚪ 1.0×
AD gradients / Transformed thin LogNormal logpdf / ReverseDiff (tape) 13.76 μs 14.08 μs ⚪ 1.02× ⚪ 1.0×
AD gradients / Modified LogNormal identity-link logpdf / ReverseDiff (tape) 29.86 μs 30.49 μs ⚪ 1.02× ⚪ 1.0×
AD gradients / Transformed cumulative LogNormal logpdf / ForwardDiff 490.0 ns 480.0 ns ⚪ 0.98× ⚪ 1.0×
AD gradients / Transformed thin LogNormal logpdf / ForwardDiff 490.0 ns 480.0 ns ⚪ 0.98× ⚪ 1.0×
AD gradients / Modified LogNormal log-link logpdf / ReverseDiff (tape) 25.23 μs 25.74 μs ⚪ 1.02× ⚪ 1.0×
AD gradients / Weighted LogNormal scalar logpdf / ForwardDiff 540.0 ns 530.0 ns ⚪ 0.98× ⚪ 1.0×
AD gradients / Modified LogNormal identity-link logpdf / Enzyme reverse 4.8 μs 4.71 μs ⚪ 0.98× ⚪ 1.0×
AD gradients / Modified LogNormal identity-link logpdf / Mooncake reverse 30.16 μs 29.6 μs ⚪ 0.98× ⚪ 1.0×
AD gradients / Thinned convolved series sum / ForwardDiff 3.28 μs 3.23 μs ⚪ 0.98× ⚪ 1.0×
AD gradients / Weighted Affine LogNormal nested logpdf / ReverseDiff (tape) 17.08 μs 17.34 μs ⚪ 1.02× ⚪ 1.0×
AD gradients / Weighted Sequential observed-total logpdf / Mooncake forward 398.02 μs 392.66 μs ⚪ 0.99× ⚪ 1.0×
AD gradients / Weighted Sequential observed-total logpdf / ReverseDiff (tape) 2.14 ms 2.17 ms ⚪ 1.01× ⚪ 1.0×
AD gradients / Modified LogNormal log-link logpdf / Mooncake reverse 27.87 μs 28.21 μs ⚪ 1.01× ⚪ 1.0×
AD gradients / Transformed cumulative LogNormal logpdf / Enzyme reverse 1.92 μs 1.94 μs ⚪ 1.01× ⚪ 1.0×
AD gradients / Transformed thin LogNormal logpdf / Enzyme reverse 1.94 μs 1.96 μs ⚪ 1.01× ⚪ 1.0×
AD gradients / Modified LogNormal log-link logpdf / Enzyme reverse 3.42 μs 3.45 μs ⚪ 1.01× ⚪ 1.0×
AD gradients / Transformed cumulative LogNormal logpdf / Mooncake reverse 15.94 μs 15.82 μs ⚪ 0.99× ⚪ 1.0×
AD gradients / Weighted Sequential observed-total logpdf / Enzyme forward 111.54 μs 112.09 μs ⚪ 1.0× ⚪ 1.0×
AD gradients / Product{Weighted} LogNormal vector logpdf / ForwardDiff 580.0 ns 581.0 ns ⚪ 1.0× ⚪ 1.0×
AD gradients / Affine LogNormal scale+shift logpdf / Mooncake reverse 16.44 μs 16.46 μs ⚪ 1.0× ⚪ 1.0×
AD gradients / Modified LogNormal identity-link logpdf / ForwardDiff 991.0 ns 991.0 ns ⚪ 1.0× ⚪ 1.0×
AD gradients / Product{Weighted} LogNormal vector logpdf / Enzyme reverse 731.0 ns 731.0 ns ⚪ 1.0× ⚪ 1.0×

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.

2 participants