Add caching and friendly tangents in forward mode#980
Add caching and friendly tangents in forward mode#980Technici4n merged 5 commits intochalk-lab:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
| cache.rule(fx...) # TODO: handle friendly tangents for the output here? | ||
|
|
||
| """ | ||
| value_and_derivative!!(cache::ForwardCache, (f, df), (x, dx), ...) |
There was a problem hiding this comment.
Remember to update the docs as well (interface.md I believe?)
There was a problem hiding this comment.
The reason I didn't is because if we want to avoid breaking changes until Mooncake 0.6, the existing API with Dual inputs has to keep working, and keep being part of the public docs. That's why I didn't specialize the signature (but we could add a deprecation warning after all)
Technici4n
left a comment
There was a problem hiding this comment.
This seems good to go, can you just update the signatures at the end of docs/src/interface.md?
|
Oops I didn't wait for the tests to pass it seems. But it should be fine and will unblock DI. |
|
@Technici4n let's still wait to see if the ambiguity issue was resolved and if code coverage was 100% before releasing Mooncake v0.5.1? |
|
Indeed, formatting failed. I see a segfault for basic-lts as well, not sure if it's related or not. Let me know if I should try to fix some of these! |
|
Feel free to open a PR to fix the formatting. As for the segfault, do you have the permissions for relaunching the CI job? Sometimes they randomly fail |
|
Took care of the formatting in #983 |
Fixes #917
Inspired and triggered by @Technici4n's DI contribution in JuliaDiff/DifferentiationInterface.jl#957, might as well make it available in Mooncake instead of using (even more) internals.
Remaining questions:
ruletocachein the existingvalue_and_derivative!!API