From 33f598aee37b60e6e60aa1e8c5372c37ad9230bf Mon Sep 17 00:00:00 2001 From: Michel Schanen Date: Thu, 15 Sep 2022 08:58:59 -0500 Subject: [PATCH 1/3] Update README.md --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 79d5516..25970ef 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ The schemes are agnostic to the ADTool being used and can be easily interfaced w 1. Revolve/Binomial checkpointing [1] 2. Periodic checkpointing +3. Online r=2 checkpointing for while loops with a priori unknown number of iterations [2] ## Installation @@ -89,11 +90,12 @@ The following features are planned for development: * Composition of checkpointing schemes * Multi-level checkpointing schemes -[1] Andreas Griewank and Andrea Walther. 2000. Algorithm 799: revolve: an implementation of checkpointing for the reverse or adjoint mode of computational differentiation. ACM Trans. Math. Softw. 26, 1 (March 2000), 19–45. DOI:https://doi.org/10.1145/347837.347846 +[1] Andreas Griewank and Andrea Walther, Algorithm 799: Revolve: An Implementation of Checkpointing for the Reverse or Adjoint Mode of Computational Differentiation. ACM Trans. Math. Softw. 26, 1 (March 2000), 19–45. DOI: [10.1145/347837.347846](https://doi.org/10.1145/347837.347846) +[2] Philipp Stumm and Andrea Walther, New Algorithms for Optimal Online Checkpointing, 2010, DOI: (10.1137/080742439)[(https://doi.org/10.1137/080742439) ## Funding -This work is supported by the NSF Cyberinfrastructure for Sustained Scientific Innovation (CSSI) program project (DJ4Earth)[https://dj4earth.github.io/] +This work is supported by the NSF Cyberinfrastructure for Sustained Scientific Innovation (CSSI) program project [DJ4Earth](https://dj4earth.github.io/) [docs-stable-img]: https://img.shields.io/badge/docs-stable-blue.svg [docs-stable-url]: https://Argonne-National-Laboratory.github.io/Checkpointing.jl/ From d7d855a9f301630136329cabf6e7cecbef02d959 Mon Sep 17 00:00:00 2001 From: Michel Schanen Date: Thu, 15 Sep 2022 09:08:39 -0500 Subject: [PATCH 2/3] Test against Julia 1.8 --- .github/workflows/action.yml | 2 +- README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index 5a87098..3da6c52 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -18,7 +18,7 @@ jobs: strategy: matrix: os: [ubuntu-20.04] - julia-version: ['1.7'] + julia-version: ['1.7', '1.8'] julia-arch: [x64] steps: diff --git a/README.md b/README.md index 25970ef..d492908 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ This package provides checkpointing schemes for adjoint computations using automatic differentiation (AD) of time stepping loops. Currently, we support the macro `@checkpoint_struct`, which differentiates and checkpoints a struct used in the loop. Each loop iteration is differentiated using [Enzyme.jl](https://github.com/EnzymeAD/Enzyme.jl). We rely on [ChainRulesCore.jl](https://github.com/JuliaDiff/ChainRulesCore.jl) to integrate with AD tools applied to the code outside of the loop. -The schemes are agnostic to the ADTool being used and can be easily interfaced with any Julia AD tool. Currently the package provides the following checkpointing schemes: +The schemes are agnostic to the AD tool being used and can be easily interfaced with any Julia AD tool. Currently, the package provides the following checkpointing schemes: 1. Revolve/Binomial checkpointing [1] 2. Periodic checkpointing @@ -17,7 +17,7 @@ add Checkpointing ## Usage: Example 1D heat equation -We present an example code where Zygote is used to differentiate the implementation of the explicit 1D heat equation. The macro `@checkpointing_struct` covers the transformation of `for` loops with `1:tsteps` ranges where `tsteps=500` is the number of timesteps. As a checkpointing scheme we use Revolve and use a maximum of only 4 snapshots. This implies that instead of requiring to save all 500 temperature fields for the gradient computation, we now only need 4. As a trade-off, recomputation is used to recompute intermediate temperature fields. +We present an example code where Zygote is used to differentiate the implementation of the explicit 1D heat equation. The macro `@checkpointing_struct` covers the transformation of `for` loops with `1:tsteps` ranges where `tsteps=500` is the number of timesteps. As a checkpointing scheme, we use Revolve and use a maximum of only 4 snapshots. This implies that instead of requiring to save all 500 temperature fields for the gradient computation, we now only need 4. As a trade-off, recomputation is used to recompute intermediate temperature fields. ```julia # Explicit 1D heat equation From 9fbcdc36a305156945da36beb74a71ca52119c68 Mon Sep 17 00:00:00 2001 From: Michel Schanen Date: Thu, 15 Sep 2022 09:11:27 -0500 Subject: [PATCH 3/3] Bump version and dependencies --- Project.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index 91295f0..4919839 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "Checkpointing" uuid = "eb46d486-4f9c-4c3d-b445-a617f2a2f1ca" authors = ["Michel Schanen ", "Sri Hari Krishna Narayanan "] -version = "0.5.0" +version = "0.6.0" [deps] ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" @@ -12,7 +12,7 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b" [compat] -ChainRulesCore = "1.0" +ChainRulesCore = "1" DataStructures = "0.18" Enzyme = "0.10" HDF5 = "0.16"