From 2d0c694811b0d1f1a28b006d59836876cf613739 Mon Sep 17 00:00:00 2001 From: HongyuJia Date: Thu, 18 May 2023 12:17:50 +0800 Subject: [PATCH] [CustomOp Unittest] Fix XPU unittest, discard static backward (#53899) --- test/custom_op/test_custom_relu_op_xpu_setup.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/custom_op/test_custom_relu_op_xpu_setup.py b/test/custom_op/test_custom_relu_op_xpu_setup.py index db8d56c7429..967b976533e 100644 --- a/test/custom_op/test_custom_relu_op_xpu_setup.py +++ b/test/custom_op/test_custom_relu_op_xpu_setup.py @@ -46,9 +46,7 @@ def custom_relu_static( with static.scope_guard(static.Scope()): with static.program_guard(static.Program()): x = static.data(name='X', shape=[None, 8], dtype=dtype) - x.stop_gradient = False out = func(x) if use_func else paddle.nn.functional.relu(x) - static.append_backward(out) exe = static.Executor() exe.run(static.default_startup_program()) -- GitLab