-
Notifications
You must be signed in to change notification settings - Fork 36
Tupek/gretl refactor #1432
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
base: develop
Are you sure you want to change the base?
Tupek/gretl refactor #1432
Conversation
src/serac/gretl/CMakeLists.txt
Outdated
| @@ -0,0 +1,42 @@ | |||
|
|
|||
| set(smith_gretl_sources | |||
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.
should this be "serac"?
954952c to
9a67661
Compare
btalamini
left a comment
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.
Nice!
src/serac/gretl/checkpoint.hpp
Outdated
| }; | ||
|
|
||
| /// @brief interface to run forward with a linear graph, checkpoint, then automatically backpropagate the sensitivities | ||
| /// given the reverse_callback jvp. |
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.
| /// given the reverse_callback jvp. | |
| /// given the reverse_callback vjp. |
src/serac/gretl/checkpoint.hpp
Outdated
|
|
||
| namespace gretl { | ||
|
|
||
| struct Unit {}; |
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.
What is this for?
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.
nothing deleted.
| @@ -0,0 +1,10 @@ | |||
| set(gretl_test_depends serac_gretl gtest) | |||
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.
| set(gretl_test_depends serac_gretl gtest) | |
| # Copyright (c) Lawrence Livermore National Security, LLC and | |
| # other Serac Project Developers. See the top-level LICENSE file for | |
| # details. | |
| # | |
| # SPDX-License-Identifier: (BSD-3-Clause) | |
| set(gretl_test_depends serac_gretl gtest) |
| @@ -0,0 +1,42 @@ | |||
|
|
|||
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.
| # Copyright (c) Lawrence Livermore National Security, LLC and | |
| # other Serac Project Developers. See the top-level LICENSE file for | |
| # details. | |
| # | |
| # SPDX-License-Identifier: (BSD-3-Clause) | |
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.
yep!
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #1432 +/- ##
===========================================
+ Coverage 92.03% 92.11% +0.07%
===========================================
Files 199 213 +14
Lines 25200 26142 +942
===========================================
+ Hits 23193 24080 +887
- Misses 2007 2062 +55
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This is an initial implementation of an automatically generated computational graph, based on recording the evaluation, storage, and dependencies between arbitrary types. Compared to other differentiable graph libraries, this one executes during runtime, and can branch dynamically. In addition, it is constructed such that it can be reversed (in the sense of adjoints or back-propagation), to compute the derivative of some final double qoi (quantity of interest) with respect to any input to the graph. Finally, these adjoints require storing (in general) the entire history of the graph. To avoid this, the graph automatically uses 'dynamic-checkpointing' (Minimal Repetition Dynamic Checkpointing Algorithm for Unsteady Adjoint Calculation, Wang, et. al. 2009) to store a near minimal number of states and automatically recomputes states in a near optimal way when back-propagating.