From d58e08f8237a1888ceaad53402d534679ea83b1a Mon Sep 17 00:00:00 2001 From: Yong He Date: Fri, 18 Nov 2022 12:37:27 -0800 Subject: Data flow validation pass for diagnosing derivative loss. (#2523) --- tests/diagnostics/autodiff.slang.expected | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/diagnostics/autodiff.slang.expected (limited to 'tests/diagnostics/autodiff.slang.expected') diff --git a/tests/diagnostics/autodiff.slang.expected b/tests/diagnostics/autodiff.slang.expected new file mode 100644 index 000000000..cd97bce76 --- /dev/null +++ b/tests/diagnostics/autodiff.slang.expected @@ -0,0 +1,14 @@ +result code = -1 +standard error = { +tests/diagnostics/autodiff.slang(20): error 38031: 'no_diff' can only be used to decorate a call. + float x1 = no_diff x; // invalid use of no_diff here. + ^~~~~~~ +tests/diagnostics/autodiff.slang(21): error 38032: use 'no_diff' on a call to a differentiable function has no meaning. + return no_diff f(x); // no_diff on a differentiable call has no meaning. + ^~~~~~~ +tests/diagnostics/autodiff.slang(26): error 38033: cannot use 'no_diff' in a non-differentiable function. + return no_diff nonDiff(x); // no_diff in a non-differentiable function + ^~~~~~~ +} +standard output = { +} -- cgit v1.2.3