From 368ec3116ea0f10f44acbf76b5dc9e34d6ff3d32 Mon Sep 17 00:00:00 2001 From: Edward Liu Date: Mon, 14 Nov 2022 12:08:01 -0800 Subject: 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 --- source/slang/slang-ast-expr.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source/slang/slang-ast-expr.h') diff --git a/source/slang/slang-ast-expr.h b/source/slang/slang-ast-expr.h index ef6a05c71..86b72e05a 100644 --- a/source/slang/slang-ast-expr.h +++ b/source/slang/slang-ast-expr.h @@ -451,6 +451,14 @@ class ForwardDifferentiateExpr: public HigherOrderInvokeExpr SLANG_AST_CLASS(ForwardDifferentiateExpr) }; + /// An expression of the form `__bwd_diff(fn)` to access the + /// forward-mode derivative version of the function `fn` + /// +class BackwardDifferentiateExpr: public HigherOrderInvokeExpr +{ + SLANG_AST_CLASS(BackwardDifferentiateExpr) +}; + /// A type expression of the form `__TaggedUnion(A, ...)`. /// /// An expression of this form will resolve to a `TaggedUnionType` -- cgit v1.2.3