From 5e74ba330264762836adb28e1eb1eebeb0f4b952 Mon Sep 17 00:00:00 2001 From: WangZhen <23097963+0x45f@users.noreply.github.com> Date: Thu, 4 Aug 2022 19:06:27 +0800 Subject: [PATCH] Set ALL_BACKEND for shape cpu kernel (#44884) --- paddle/phi/kernels/shape_kernel.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/paddle/phi/kernels/shape_kernel.cc b/paddle/phi/kernels/shape_kernel.cc index ea48ea6171..f35b7e5444 100644 --- a/paddle/phi/kernels/shape_kernel.cc +++ b/paddle/phi/kernels/shape_kernel.cc @@ -48,7 +48,9 @@ PD_REGISTER_KERNEL(shape, float, double, phi::dtype::complex, - phi::dtype::complex) {} + phi::dtype::complex) { + kernel->InputAt(0).SetBackend(phi::Backend::ALL_BACKEND); +} #if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) PD_REGISTER_KERNEL(shape, -- GitLab