summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2023-02-04 20:07:14 -0800
committerGitHub <noreply@github.com>2023-02-04 20:07:14 -0800
commita12c5511a9003efb23b265a7f2f613cf49aa9f07 (patch)
treeb23bab09ae99df1516a89ac60f9779cf979ff2ef /tests
parent228e71dab7dfa18ece979f4099ec0c7d1e37e5ff (diff)
Patch transcription of `inout` non differentiable params. (#2623)
Diffstat (limited to 'tests')
-rw-r--r--tests/autodiff/reverse-inout-param-2.slang3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/autodiff/reverse-inout-param-2.slang b/tests/autodiff/reverse-inout-param-2.slang
index 1fa64751b..18eb825e6 100644
--- a/tests/autodiff/reverse-inout-param-2.slang
+++ b/tests/autodiff/reverse-inout-param-2.slang
@@ -56,14 +56,13 @@ void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
p.m = 1.0;
p.n = 2.0;
- ND v2 = { 1.0 };
+ let v2 : ND = { 1.0 };
var x = diffPair(5.0);
float yDiffOut = 1.0;
__bwd_diff(f)(p, v2, x, yDiffOut);
- // (3+((3+x)*x))*((3+x)*x) = (3+3x+x^2)*(3x+x^2)
outputBuffer[0] = x.p; // should be 5, since bwd_diff does not write back new primal val.
outputBuffer[1] = x.d; // 14
outputBuffer[2] = p.m; // 1.0