-
Notifications
You must be signed in to change notification settings - Fork 32
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
try enable Mooncake
for the LDA model
#841
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## mhauru/dot-tilde-tests-from-turing #841 +/- ##
===================================================================
Coverage 84.56% 84.56%
===================================================================
Files 34 34
Lines 3830 3830
===================================================================
Hits 3239 3239
Misses 591 591 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Benchmark Report for Commit
|
@willtebbutt @mhauru, please note the relatively poor performance of |
What's the evidence that the lack of linearisation causes this performance problem? Mine and @mhauru 's experience has been that, whenever Mooncake is substantially slower than ReverseDiff, it's because the original code is type unstable. |
Yeah, a cursory look at this example suggests that it's super type-unstable -- there's edit: recall that while Mooncake will run on type-unstable code, we make no performance promises. |
I overlooked the type instability issue. |
Ahh cool. Looks like the timings make more sense now? |
Thanks for picking this up, I noted this as well and meant to come back to it. |
The variables
z
in the LDA model are discrete and treated as model parameters,DynamicPPL.jl/benchmarks/src/Models.jl
Line 150 in 5c89efc
In principle, differentiating w.r.t discrete parameters
z
won't work. However,ReverseDiff
seems to work fine, thus motivating tryingMooncake
in this PR.