From 12e8ce5c548f4658ef2989f368ec9d93e50d9b08 Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 27 Sep 2023 22:35:58 -0700 Subject: Fix regression on no_diff type transcription. (#3245) Co-authored-by: Yong He --- source/slang/slang-ir-autodiff.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/slang/slang-ir-autodiff.cpp') diff --git a/source/slang/slang-ir-autodiff.cpp b/source/slang/slang-ir-autodiff.cpp index a6437e3e4..e4f3f3f94 100644 --- a/source/slang/slang-ir-autodiff.cpp +++ b/source/slang/slang-ir-autodiff.cpp @@ -813,6 +813,9 @@ IRType* DifferentiableTypeConformanceContext::differentiateType(IRBuilder* build IRInst* DifferentiableTypeConformanceContext::tryGetDifferentiableWitness(IRBuilder* builder, IRInst* primalType) { + if (isNoDiffType((IRType*)primalType)) + return nullptr; + IRInst* witness = lookUpConformanceForType((IRType*)primalType); if (witness) { -- cgit v1.2.3