From 240a29b648fc4523d8ff931b109d428b7484de88 Mon Sep 17 00:00:00 2001 From: Yong He Date: Tue, 28 Mar 2023 16:33:50 -0700 Subject: Update a1-02-slangpy.md --- docs/user-guide/a1-02-slangpy.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'docs') diff --git a/docs/user-guide/a1-02-slangpy.md b/docs/user-guide/a1-02-slangpy.md index 625f97ee3..f6f122241 100644 --- a/docs/user-guide/a1-02-slangpy.md +++ b/docs/user-guide/a1-02-slangpy.md @@ -145,10 +145,10 @@ void square_bwd_kernel(TensorView input, TensorView grad_out, Tens Note that the function follows the same structure of `square_fwd_kernel`, with the only difference being that instead of calling into `square` to compute the forward value for each tensor element, we are calling `__bwd_diff(square)` -that represents the automatically generated backward propagation function of `squre`. -`__bwd_diff(squre)` will have the following signature: +that represents the automatically generated backward propagation function of `square`. +`__bwd_diff(square)` will have the following signature: ```csharp -void __bwd_diff_squre(inout DifferentialPair dpInput, float dOut); +void __bwd_diff_square(inout DifferentialPair dpInput, float dOut); ``` Where the first parameter, `dpInput` represents a pair of original and derivative value for `input`, and the second parameter, @@ -162,7 +162,7 @@ __bwd_diff(square)(dp, 1.0); // dp.d is now 6.0 ``` -Similarly to `squre_fwd`, we can define the host side function `square_bwd` as: +Similarly to `square_fwd`, we can define the host side function `square_bwd` as: ```csharp [TorchEntryPoint] -- cgit v1.2.3