This repository was archived by the owner on Jun 18, 2025. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 69
Basic reverse-mode AD implementation [in progress] #226
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## master #226 +/- ##
==========================================
- Coverage 84.22% 83.92% -0.31%
==========================================
Files 81 82 +1
Lines 8393 8628 +235
Branches 453 475 +22
==========================================
+ Hits 7069 7241 +172
- Misses 871 914 +43
- Partials 453 473 +20
Continue to review full report at Codecov.
|
807277a
to
e50fb57
Compare
Another thing we might want to look into is implementing checkpointing. The motivation here is that a lot of physical computations end up as differential equations, and checkpointing can be quite useful there. I think we could use the particle example in #385 to compare the checkpointed-vs-vanilla implementations. |
afa6dd7
to
c33ef42
Compare
6 tasks
Moved to Emmy. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is modeled after the approach described in the dysvunctional language docs. This works now for
R^n => R
functions! It needs some work to handle nesting and all of that...@littleredcomputer , I also took a try at an approach to share the derivatives between the
tape
anddifferential
namespaces without actually making alift
implementation that lifts BOTH. The derivatives should certainly live somewhere, so we don't have to inline them.Making progress!
TODO
pullback
?extract-tangent
, or do I have to redo everything?delay
to wrap some of the partials that take a bit of work. Look at the julia docs to see how they build this in. Would we have to extend the generic arithmetic to delays?NOTES:
differential?
is incoming; that is obviously going to fail for reverse mode.with-active-tag
, so let GJS know that we do that too.