summaryrefslogtreecommitdiff
path: root/source/slang/slang-ast-modifier.h
diff options
context:
space:
mode:
authorEdward Liu <shiqiu1105@gmail.com>2022-11-14 12:08:01 -0800
committerGitHub <noreply@github.com>2022-11-14 12:08:01 -0800
commit368ec3116ea0f10f44acbf76b5dc9e34d6ff3d32 (patch)
tree3d9def111db278affb8413bddb5aab9ce3cf73a6 /source/slang/slang-ast-modifier.h
parent623f5c36e0dc8190753aa5fa2e89f1010c367c67 (diff)
Minimum binary arithmetic reverse autodiff working. (#2514)
* Initial plumbing of backward autodiff in the frontend. * More plumbing. * Initial reverse autodiff working. * Bug fixes. * Misc. * Remove redundant code. * More clean up. * Misc. * Rebase and add backward diff test. * Disable test. * Clean up. * Minor fix. Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-ast-modifier.h')
-rw-r--r--source/slang/slang-ast-modifier.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/slang/slang-ast-modifier.h b/source/slang/slang-ast-modifier.h
index d6a961328..8419facce 100644
--- a/source/slang/slang-ast-modifier.h
+++ b/source/slang/slang-ast-modifier.h
@@ -1045,6 +1045,12 @@ class ForwardDerivativeOfAttribute : public Attribute
Expr* backDeclRef; // DeclRef to this derivative function when initiated from primalFunction.
};
+ /// The `[BackwardDifferentiable]` attribute indicates that a function can be backward-differentiated.
+class BackwardDifferentiableAttribute : public DifferentiableAttribute
+{
+ SLANG_AST_CLASS(BackwardDifferentiableAttribute)
+};
+
/// Indicates that the modified declaration is one of the "magic" declarations
/// that NVAPI uses to communicate extended operations. When NVAPI is being included
/// via the prelude for downstream compilation, declarations with this modifier