From 61d0b381f520eb0457d8bc98365a0590c68135f5 Mon Sep 17 00:00:00 2001 From: Xiaoxu Chen Date: Fri, 3 Mar 2023 14:16:52 +0800 Subject: [PATCH] [prim] change reshape primitive api to reshape2 (#51077) --- paddle/fluid/prim/api/manual_prim/static_prim_api.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/paddle/fluid/prim/api/manual_prim/static_prim_api.cc b/paddle/fluid/prim/api/manual_prim/static_prim_api.cc index 3d151f6edb6..8ff34d91adb 100644 --- a/paddle/fluid/prim/api/manual_prim/static_prim_api.cc +++ b/paddle/fluid/prim/api/manual_prim/static_prim_api.cc @@ -41,11 +41,10 @@ template <> Tensor reshape(const Tensor& x, const IntArray& shape) { framework::BlockDesc* block = StaticCompositeContext::Instance().GetBlock(); framework::OpDesc* op = block->AppendOp(); - // TODO(cxxly): Fix test_resnet_prim_cinn error when SetType("reshape2") - op->SetType("reshape"); + // TODO(cxxly): move to auto generate dir. + op->SetType("reshape2"); op->SetInput("X", {std::static_pointer_cast(x.impl())->Name()}); - // Tensor out = empty({}, x.dtype(), paddle::Place()); auto out = empty({}, x.dtype(), paddle::Place()); op->SetOutput( "Out", {std::static_pointer_cast(out.impl())->Name()}); -- GitLab