Skip to content

Conversation

@gdalle
Copy link
Member

@gdalle gdalle commented Nov 13, 2025

  • Add a mathematical model of DI's context arguments
  • Pre-allocate tangent memory in Mooncake's forward mode (justified by that model

Fixes #833, fixes #854, does part of #861 but not all

@codecov
Copy link

codecov bot commented Nov 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.11%. Comparing base (6b6ca3f) to head (d811fad).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #915   +/-   ##
=======================================
  Coverage   98.11%   98.11%           
=======================================
  Files         132      133    +1     
  Lines        7959     7965    +6     
=======================================
+ Hits         7809     7815    +6     
  Misses        150      150           
Flag Coverage Δ
DI 98.85% <100.00%> (+<0.01%) ⬆️
DIT 96.19% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@gdalle
Copy link
Member Author

gdalle commented Nov 13, 2025

@penelopeysm do you have any Turing workflows involving Mooncake in forward mode? If so, this should provide a sizeable speedup

@gdalle gdalle marked this pull request as ready for review November 13, 2025 11:45
@penelopeysm
Copy link
Contributor

TuringLang/ADTests#60 is still building (it will take something like 20 minutes more), but looking at the CI logs it looks to be ~ 2.5x faster!

@penelopeysm
Copy link
Contributor

current DI main: https://turinglang.org/ADTests/
with this PR: https://turinglang.org/ADTests/pr60/

Most of them are a lot faster (although there are a couple of exceptions like observe_bernoulli and dppl_naive_bayes; I don't know what's the link between them).

@gdalle gdalle added the skipci Don't run CI tests and docs label Nov 13, 2025
@gdalle gdalle merged commit b7adfb6 into main Nov 13, 2025
66 of 67 checks passed
@gdalle gdalle deleted the gd/mooncake_dual_init branch November 13, 2025 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skipci Don't run CI tests and docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

slow forward differentiation with Mooncake Pre-allocate Cache and other contexts for Mooncake

3 participants