未验证 提交 61d0b381 编写于 作者: X Xiaoxu Chen 提交者: GitHub

[prim] change reshape primitive api to reshape2 (#51077)

上级 dff4ff42
......@@ -41,11 +41,10 @@ template <>
Tensor reshape<DescTensor>(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<prim::DescTensor>(x.impl())->Name()});
// Tensor out = empty<DescTensor>({}, x.dtype(), paddle::Place());
auto out = empty<DescTensor>({}, x.dtype(), paddle::Place());
op->SetOutput(
"Out", {std::static_pointer_cast<prim::DescTensor>(out.impl())->Name()});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册