From 9d048351d283f8df2a68aca52b3573dcbb8cdb9b Mon Sep 17 00:00:00 2001 From: Sai Praveen Bangaru <31557731+saipraveenb25@users.noreply.github.com> Date: Mon, 12 Dec 2022 17:33:44 -0500 Subject: Added support for nested calls (#2562) * Added initial support for nested calls * removed comments Co-authored-by: Yong He --- tests/autodiff/reverse-struct-types.slang | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) (limited to 'tests/autodiff/reverse-struct-types.slang') diff --git a/tests/autodiff/reverse-struct-types.slang b/tests/autodiff/reverse-struct-types.slang index 699e50480..d2b52a008 100644 --- a/tests/autodiff/reverse-struct-types.slang +++ b/tests/autodiff/reverse-struct-types.slang @@ -9,27 +9,6 @@ struct A : IDifferentiable { float x; float y; - - [__unsafeForceInlineEarly] - static Differential dzero() - { - Differential b = {0.0, float.dzero()}; - return b; - } - - [__unsafeForceInlineEarly] - static Differential dadd(Differential a, Differential b) - { - Differential o = {a.x + b.x, 0.0}; - return o; - } - - [__unsafeForceInlineEarly] - static Differential dmul(This a, Differential b) - { - Differential o = {a.x * b.x, 0.0}; - return o; - } }; typedef DifferentialPair dpA; @@ -56,7 +35,7 @@ void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) A.Differential dout = {1.0, 1.0}; __bwd_diff(f)(dpa, dout); - outputBuffer[0] = dpa.d.x; // Expect: 10 + outputBuffer[0] = dpa.d.x; // Expect: 7 outputBuffer[1] = dpa.d.y; // Expect: 0 } } -- cgit v1.2.3