-
Notifications
You must be signed in to change notification settings - Fork 16
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
Mooncake Upgrades #645
Mooncake Upgrades #645
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #645 +/- ##
==========================================
- Coverage 97.53% 97.52% -0.01%
==========================================
Files 111 111
Lines 5550 5536 -14
==========================================
- Hits 5413 5399 -14
Misses 137 137
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
(failures because the right version of Mooncake is not yet available, because I messed up doing releases) |
(codecov is lying -- the line it says is uncovered is definitely covered) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! This new cache thingy isn't documented anywhere in Mooncake.jl, is it the new name for rules? Is it an internal or part of the API?
DifferentiationInterface/ext/DifferentiationInterfaceMooncakeExt/onearg.jl
Outdated
Show resolved
Hide resolved
DifferentiationInterface/ext/DifferentiationInterfaceMooncakeExt/twoarg.jl
Outdated
Show resolved
Hide resolved
y_copy = copy(y) | ||
dx_righttype = zero_tangent(x) | ||
dy_righttype = zero_tangent(y) | ||
target_function = function (f!, y, x, contexts...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will this new closure slow things down?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe so -- Mooncake generally has no problems with closures.
Co-authored-by: Guillaume Dalle <[email protected]>
It's a wrapper around a rule, and all of the various tangents that you need in order to avoid allocations. Unlike
It's internal for now. I plan to make it available publicly in short order, but want to make sure it's doing everything as I intend it before telling users about it. |
In response to a couple of things, I've decided to add much better tools for caching various things in Mooncake. As a result, we can substantially simplify Mooncake's implementation in DifferentiationInterface.
I've tested this locally, so I'm hoping it still works...