From e291f60c6b083eaa74aed5307a6e9461274c1642 Mon Sep 17 00:00:00 2001 From: Yong He Date: Tue, 14 Mar 2023 09:31:51 -0700 Subject: Support `fwd_diff(bwd_diff(f))`. (#2697) * Support `fwd_diff(bwd_diff(f))`. * Fix. --------- Co-authored-by: Yong He --- source/slang/slang-ir-validate.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/slang/slang-ir-validate.cpp') diff --git a/source/slang/slang-ir-validate.cpp b/source/slang/slang-ir-validate.cpp index d5c0aa432..55e0f0168 100644 --- a/source/slang/slang-ir-validate.cpp +++ b/source/slang/slang-ir-validate.cpp @@ -208,6 +208,12 @@ namespace Slang if (allInGlobalScope) return; + // Allow exceptions. + switch (inst->getOp()) + { + case kIROp_DifferentiableTypeDictionaryItem: + return; + } // // We failed to find `operandParent` while walking the ancestors of `inst`, // so something had gone wrong. -- cgit v1.2.3