From e6fdcd9067e28e870507036349198f2fcf391ac0 Mon Sep 17 00:00:00 2001 From: james Date: Fri, 9 Dec 2022 14:25:51 +0800 Subject: [PATCH] xpu support inplace flatten (#48909) This is a PR to catch up with latest xpu white list strategy (https://github.com/PaddlePaddle/Paddle/pull/48606) , since original list only include 'fluid' fashion names, but new list must include 'phi' fashion as well. Refer to paddle/phi/core/kernel_factory.cc for more details. --- paddle/phi/backends/xpu/xpu2_op_list.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/paddle/phi/backends/xpu/xpu2_op_list.cc b/paddle/phi/backends/xpu/xpu2_op_list.cc index cd68540017..bd63aedd3a 100644 --- a/paddle/phi/backends/xpu/xpu2_op_list.cc +++ b/paddle/phi/backends/xpu/xpu2_op_list.cc @@ -227,6 +227,12 @@ XPUOpMap& get_kl2_ops() { phi::DataType::INT8, phi::DataType::FLOAT16, phi::DataType::FLOAT32})}, + {"flatten_with_xshape", + XPUKernelSet({phi::DataType::INT64, + phi::DataType::INT32, + phi::DataType::INT8, + phi::DataType::FLOAT16, + phi::DataType::FLOAT32})}, {"flatten_grad", XPUKernelSet({phi::DataType::INT64, phi::DataType::INT32, -- GitLab