未验证 提交 aba3c806 编写于 作者: L Leo Guo 提交者: GitHub

Fix bug of abs_double_grad in eager mode for kunlun, test=kunlun (#47722)

上级 4061b1b8
......@@ -7,8 +7,6 @@
param : [x]
kernel :
func : abs_double_grad
data_transform:
skip_transform : grad_x_grad
- backward_op : abs_grad
forward : abs (Tensor x) -> Tensor(out)
......
......@@ -41,4 +41,6 @@ PD_REGISTER_KERNEL(abs_double_grad,
int,
int64_t,
complex<float>,
complex<double>) {}
complex<double>) {
kernel->InputAt(1).SetDataType(phi::dtype::ToReal(kernel_key.dtype()));
}
......@@ -45,4 +45,6 @@ PD_REGISTER_KERNEL(abs_double_grad,
int64_t,
phi::dtype::float16,
complex<float>,
complex<double>) {}
complex<double>) {
kernel->InputAt(1).SetDataType(phi::dtype::ToReal(kernel_key.dtype()));
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册