Skip to content

Conversation

@penelopeysm
Copy link
Member

This has no real impact on DynamicPPL, but using this in Turing should lead to some nice speedups because this:

  1. is faster to evaluate than regular unflatten + evaluate!!;
  2. avoids deepcopying VarInfo.

Closes #1119.

@penelopeysm penelopeysm changed the base branch from main to py/fastldf November 8, 2025 17:50
@github-actions
Copy link
Contributor

github-actions bot commented Nov 8, 2025

Benchmark Report for Commit c475f96

Computer Information

Julia Version 1.11.7
Commit f2b3dbda30a (2025-09-08 12:10 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 4 × AMD EPYC 7763 64-Core Processor
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, znver3)
Threads: 1 default, 0 interactive, 1 GC (on 4 virtual cores)

Benchmark Results

┌───────────────────────┬───────┬─────────────┬───────────────────┬────────┬────────────────┬─────────────────┐
│                 Model │   Dim │  AD Backend │           VarInfo │ Linked │ t(eval)/t(ref) │ t(grad)/t(eval) │
├───────────────────────┼───────┼─────────────┼───────────────────┼────────┼────────────────┼─────────────────┤
│ Simple assume observe │     1 │ forwarddiff │             typed │  false │            5.8 │             1.8 │
│           Smorgasbord │   201 │ forwarddiff │             typed │  false │          632.4 │            43.6 │
│           Smorgasbord │   201 │ forwarddiff │ simple_namedtuple │   true │          368.7 │            53.9 │
│           Smorgasbord │   201 │ forwarddiff │           untyped │   true │          706.2 │            35.4 │
│           Smorgasbord │   201 │ forwarddiff │       simple_dict │   true │         6210.6 │            24.3 │
│           Smorgasbord │   201 │ forwarddiff │      typed_vector │   true │          670.4 │            41.2 │
│           Smorgasbord │   201 │ forwarddiff │    untyped_vector │   true │          697.2 │            40.9 │
│           Smorgasbord │   201 │ reversediff │             typed │   true │          795.9 │            45.5 │
│           Smorgasbord │   201 │    mooncake │             typed │   true │          637.8 │             6.0 │
│           Smorgasbord │   201 │      enzyme │             typed │   true │          797.8 │             3.8 │
│    Loop univariate 1k │  1000 │    mooncake │             typed │   true │         3443.9 │             5.6 │
│       Multivariate 1k │  1000 │    mooncake │             typed │   true │          879.5 │             8.9 │
│   Loop univariate 10k │ 10000 │    mooncake │             typed │   true │        39292.5 │             5.2 │
│      Multivariate 10k │ 10000 │    mooncake │             typed │   true │         7654.6 │             9.8 │
│               Dynamic │    10 │    mooncake │             typed │   true │          106.0 │            11.7 │
│              Submodel │     1 │    mooncake │             typed │   true │            7.6 │             6.6 │
│                   LDA │    12 │ reversediff │             typed │   true │          886.4 │             2.0 │
└───────────────────────┴───────┴─────────────┴───────────────────┴────────┴────────────────┴─────────────────┘

@penelopeysm penelopeysm mentioned this pull request Nov 8, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 8, 2025

DynamicPPL.jl documentation for PR #1129 is available at:
https://TuringLang.github.io/DynamicPPL.jl/previews/PR1129/

@codecov
Copy link

codecov bot commented Nov 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.94%. Comparing base (4ec0c72) to head (c475f96).

Additional details and impacted files
@@              Coverage Diff               @@
##           py/fastldf    #1129      +/-   ##
==============================================
+ Coverage       81.86%   81.94%   +0.08%     
==============================================
  Files              41       41              
  Lines            3949     3961      +12     
==============================================
+ Hits             3233     3246      +13     
+ Misses            716      715       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

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.

Implement ParamsWithStats(::FastLDF, ::AbstractVector{<:Real})

2 participants