diff options
| author | Sai Praveen Bangaru <31557731+saipraveenb25@users.noreply.github.com> | 2023-05-05 14:11:13 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-05 11:11:13 -0700 |
| commit | 0602eaaba32bdbaf3f99ab8987e97419cba395aa (patch) | |
| tree | a876e0eb0b3729f67a85a4f6eec1305feac2621d /source/slang/slang-ir-autodiff-rev.cpp | |
| parent | e69c23e596baf082d928bd18dc364ea6f846c457 (diff) | |
Fix checkpoint hints for higher-order autodiff (#2869)
Diffstat (limited to 'source/slang/slang-ir-autodiff-rev.cpp')
| -rw-r--r-- | source/slang/slang-ir-autodiff-rev.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/slang/slang-ir-autodiff-rev.cpp b/source/slang/slang-ir-autodiff-rev.cpp index ecc36d6ba..70c43cdcb 100644 --- a/source/slang/slang-ir-autodiff-rev.cpp +++ b/source/slang/slang-ir-autodiff-rev.cpp @@ -340,6 +340,9 @@ namespace Slang builder.addNameHintDecoration(diffFunc, newNameSb.getUnownedSlice()); } + // Transfer checkpoint hint decorations + copyCheckpointHints(&builder, origFunc, diffFunc); + // Mark the generated derivative function itself as differentiable. builder.addBackwardDifferentiableDecoration(diffFunc); // Find and clone `DifferentiableTypeDictionaryDecoration` to the new diffFunc. |
