From f12d422dd035aaf51fa3d8f6e31302c037aa180f Mon Sep 17 00:00:00 2001 From: Yong He Date: Mon, 6 Feb 2023 15:56:48 -0800 Subject: Fix documentation (#2630) Co-authored-by: Yong He --- docs/user-guide/07-autodiff.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/user-guide/07-autodiff.md b/docs/user-guide/07-autodiff.md index 05011a53e..48eb84cdf 100644 --- a/docs/user-guide/07-autodiff.md +++ b/docs/user-guide/07-autodiff.md @@ -464,7 +464,7 @@ float fwd_derivative(float a, DifferentialPair x); void back_prop(float a, inout DifferentialPair x, float d_y); ``` -## Calling Non-Differentiable Function from a Differentiable Function +## Calling Non-Differentiable Functions from a Differentiable Function Calling non-differentiable function from a differentiable function is allowed. However, derivatives will not be propagated through the call. The user is required to clarify the intention by prefixing the call with the `no_diff` keyword. An unclarified call to non-differnetiable function will result in a compile-time error. @@ -517,7 +517,7 @@ An interface method requirement can be marked as `[ForwardDifferentiable]` or `[ ## Restrictions of Automatic Differentiation -The compiler can generate forward derivative and backward propagation implementations for most uses of array and struct types, including arbitrary read and write access at dynamic array indices, and supports uses of generics and interfaces. This covers the set of operations that is sufficient for a lot of functions. However, the user need to be aware of the following restrictions when using automatic differentiation: +The compiler can generate forward derivative and backward propagation implementations for most uses of array and struct types, including arbitrary read and write access at dynamic array indices, and supports uses of all types of control flows, mutable parameters, generics and interfaces. This covers the set of operations that is sufficient for a lot of functions. However, the user needs to be aware of the following restrictions when using automatic differentiation: - No access to global variables or shader parameters within a differentiable function. - All operations to global resources, including texture reads or atomic writes, are treating as a non-differentiable operation. -- cgit v1.2.3