summaryrefslogtreecommitdiff
path: root/source/slang/slang-ir-autodiff-rev.cpp
diff options
context:
space:
mode:
authorSai Praveen Bangaru <31557731+saipraveenb25@users.noreply.github.com>2023-05-05 14:11:13 -0400
committerGitHub <noreply@github.com>2023-05-05 11:11:13 -0700
commit0602eaaba32bdbaf3f99ab8987e97419cba395aa (patch)
treea876e0eb0b3729f67a85a4f6eec1305feac2621d /source/slang/slang-ir-autodiff-rev.cpp
parente69c23e596baf082d928bd18dc364ea6f846c457 (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.cpp3
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.