From 0602eaaba32bdbaf3f99ab8987e97419cba395aa Mon Sep 17 00:00:00 2001 From: Sai Praveen Bangaru <31557731+saipraveenb25@users.noreply.github.com> Date: Fri, 5 May 2023 14:11:13 -0400 Subject: Fix checkpoint hints for higher-order autodiff (#2869) --- source/slang/slang-ir-autodiff-rev.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/slang/slang-ir-autodiff-rev.cpp') 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. -- cgit v1.2.3