From aaf3f5e97aaa3a256f4ca938251d011c125b9491 Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 28 Aug 2024 23:52:04 -0700 Subject: Make sure `NullDifferential` and its witness are removed after autodiff. (#4958) * Make sure `NullDifferential` and its witness are removed after autodiff. * Fix. * Add a test. --- source/slang/diff.meta.slang | 1 + 1 file changed, 1 insertion(+) (limited to 'source/slang/diff.meta.slang') diff --git a/source/slang/diff.meta.slang b/source/slang/diff.meta.slang index 80aca230a..b9cc0b103 100644 --- a/source/slang/diff.meta.slang +++ b/source/slang/diff.meta.slang @@ -26,6 +26,7 @@ __attributeTarget(FunctionDeclBase) attribute_syntax [NoDiffThis] : NoDiffThisAttribute; // A 'none-type' that acts as a run-time sentinel for zero differentials. +[__AutoDiffBuiltin] export struct NullDifferential : IDifferentiable { // for now, we'll use at least one field to make sure the type is non-empty -- cgit v1.2.3