summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/autodiff/differential-method-synthesis.slang4
-rw-r--r--tests/autodiff/differential-method-synthesis.slang.expected.txt4
2 files changed, 5 insertions, 3 deletions
diff --git a/tests/autodiff/differential-method-synthesis.slang b/tests/autodiff/differential-method-synthesis.slang
index 73afc4411..53957fd91 100644
--- a/tests/autodiff/differential-method-synthesis.slang
+++ b/tests/autodiff/differential-method-synthesis.slang
@@ -40,6 +40,8 @@ void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
A a = {1.0, 2.0};
A.Differential b = {0.2};
dpA dpa = dpA(a, b);
- outputBuffer[0] = __jvp(f)(dpa).d().b.x; // Expect: 0
+ outputBuffer[0] = __jvp(f)(dpa).d().b.x; // Expect: 0
+ outputBuffer[1] = A.dadd(b, b).b.x; // Expect: 0.4
+ outputBuffer[2] = A.dmul(a, b).b.x; // Expect: 0.2
}
}
diff --git a/tests/autodiff/differential-method-synthesis.slang.expected.txt b/tests/autodiff/differential-method-synthesis.slang.expected.txt
index e070cf84d..5fbff9752 100644
--- a/tests/autodiff/differential-method-synthesis.slang.expected.txt
+++ b/tests/autodiff/differential-method-synthesis.slang.expected.txt
@@ -1,6 +1,6 @@
type: float
0.000000
-0.000000
-0.000000
+0.400000
+0.200000
0.000000
0.000000