Skip to content

Use NoCache to improve set_to_zero!! performance with Mooncake #975

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

sunxd3
Copy link
Member

@sunxd3 sunxd3 commented Jul 8, 2025

Copy link
Contributor

github-actions bot commented Jul 8, 2025

Benchmark Report for Commit 5c79686

Computer Information

Julia Version 1.11.5
Commit 760b2e5b739 (2025-04-14 06:53 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 | Dimension |  AD Backend |      VarInfo Type | Linked | Eval Time / Ref Time | AD Time / Eval Time |
|-----------------------|-----------|-------------|-------------------|--------|----------------------|---------------------|
| Simple assume observe |         1 | forwarddiff |             typed |  false |                  9.3 |                 1.6 |
|           Smorgasbord |       201 | forwarddiff |             typed |  false |                751.4 |                38.0 |
|           Smorgasbord |       201 | forwarddiff | simple_namedtuple |   true |                306.9 |                69.5 |
|           Smorgasbord |       201 | forwarddiff |           untyped |   true |               1265.2 |                28.1 |
|           Smorgasbord |       201 | forwarddiff |       simple_dict |   true |               3825.0 |                21.8 |
|           Smorgasbord |       201 | reversediff |             typed |   true |               1491.4 |                29.0 |
|           Smorgasbord |       201 |    mooncake |             typed |   true |                964.6 |                 5.2 |
|    Loop univariate 1k |      1000 |    mooncake |             typed |   true |               5924.6 |                 3.8 |
|       Multivariate 1k |      1000 |    mooncake |             typed |   true |               1053.0 |                 8.7 |
|   Loop univariate 10k |     10000 |    mooncake |             typed |   true |              62427.3 |                 4.0 |
|      Multivariate 10k |     10000 |    mooncake |             typed |   true |               9483.5 |                 9.3 |
|               Dynamic |        10 |    mooncake |             typed |   true |                140.2 |                11.5 |
|              Submodel |         1 |    mooncake |             typed |   true |                 13.4 |                 3.9 |
|                   LDA |        12 | reversediff |             typed |   true |                479.4 |                 5.2 |

Copy link

codecov bot commented Jul 8, 2025

Codecov Report

Attention: Patch coverage is 0% with 36 lines in your changes missing coverage. Please review.

Project coverage is 80.24%. Comparing base (acac44d) to head (5c79686).

Files with missing lines Patch % Lines
ext/DynamicPPLMooncakeExt.jl 0.00% 36 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #975      +/-   ##
==========================================
- Coverage   83.00%   80.24%   -2.77%     
==========================================
  Files          36       36              
  Lines        3965     3988      +23     
==========================================
- Hits         3291     3200      -91     
- Misses        674      788     +114     

☔ 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.

@coveralls
Copy link

coveralls commented Jul 8, 2025

Pull Request Test Coverage Report for Build 16162016138

Details

  • 0 of 36 (0.0%) changed or added relevant lines in 1 file are covered.
  • 76 unchanged lines in 10 files lost coverage.
  • Overall coverage decreased (-2.9%) to 80.241%

Changes Missing Coverage Covered Lines Changed/Added Lines %
ext/DynamicPPLMooncakeExt.jl 0 36 0.0%
Files with Coverage Reduction New Missed Lines %
ext/DynamicPPLForwardDiffExt.jl 1 63.64%
src/simple_varinfo.jl 1 78.03%
src/contexts.jl 2 74.79%
src/model.jl 2 84.17%
src/experimental.jl 3 0.0%
src/compiler.jl 4 85.25%
src/varinfo.jl 4 84.79%
ext/DynamicPPLJETExt.jl 16 0.0%
src/test_utils/ad.jl 21 0.0%
src/logdensityfunction.jl 22 50.0%
Totals Coverage Status
Change from base Build 16115950849: -2.9%
Covered Lines: 3200
Relevant Lines: 3988

💛 - Coveralls

Copy link
Contributor

github-actions bot commented Jul 9, 2025

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

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