From 1aa056bc2909a2d2e445309e3031fc9e44e45f7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=98=A5=E4=B9=94?= <83450930+Liyulingyue@users.noreply.github.com> Date: Mon, 3 Jul 2023 03:38:56 +0800 Subject: [PATCH] [CodeStyle][CINN] fix cinn cpplint codestyle `[whitespace/semicolon]` (#55046) * whitespace * empty commit, re-trigger all ci * empty commit, re-trigger all ci * empty commit, re-trigger all ci * empty commit, re-trigger all ci * empty commit, re-trigger all ci * empty commit, re-trigger all ci * empty commit, re-trigger all ci * empty commit, re-trigger all ci * empty commit, re-trigger all ci --------- Co-authored-by: SigureMo --- paddle/cinn/frontend/net_builder.cc | 2 -- paddle/cinn/frontend/op_mappers/paddle/concat.cc | 2 +- paddle/cinn/optim/ir_simplify.cc | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/paddle/cinn/frontend/net_builder.cc b/paddle/cinn/frontend/net_builder.cc index 6a059f8acec..a661c4c745b 100644 --- a/paddle/cinn/frontend/net_builder.cc +++ b/paddle/cinn/frontend/net_builder.cc @@ -995,7 +995,6 @@ Variable NetBuilder::DropoutInfer(const Variable& a, Variable NetBuilder::Sum(const std::vector& inputs) { return CustomInstr("sum", inputs, {}).front(); - ; } Variable NetBuilder::Arange(const float start, @@ -1030,7 +1029,6 @@ Variable NetBuilder::Matmul(const Variable& x, {x, y}, {{"trans_a", trans_x}, {"trans_b", trans_y}, {"alpha", alpha}}) .front(); - ; } Variable NetBuilder::GaussianRandom(const std::vector& shape, diff --git a/paddle/cinn/frontend/op_mappers/paddle/concat.cc b/paddle/cinn/frontend/op_mappers/paddle/concat.cc index 48518898e7c..d3512176887 100644 --- a/paddle/cinn/frontend/op_mappers/paddle/concat.cc +++ b/paddle/cinn/frontend/op_mappers/paddle/concat.cc @@ -122,7 +122,7 @@ void SplitOpMapper(const paddle::cpp::OpDesc& op_desc, const OpMapperContext& ctx) { CHECK_EQ(op_desc.Input("X").size(), 1UL); auto x_name = op_desc.Input("X").front(); - ; + CHECK_GE(op_desc.Output("Out").size(), 1UL); auto out_names = op_desc.Output("Out"); diff --git a/paddle/cinn/optim/ir_simplify.cc b/paddle/cinn/optim/ir_simplify.cc index cabe7ad0b01..a101482b64f 100644 --- a/paddle/cinn/optim/ir_simplify.cc +++ b/paddle/cinn/optim/ir_simplify.cc @@ -213,7 +213,7 @@ struct SimplifyRampMutator : public ir::IRMutator { << node->base << "is not a pure math!"; CHECK(common::IsPureMath(node->stride)) << node->stride << "is not a pure math!"; - ; + Simplify(&node->base); Simplify(&node->stride); } -- GitLab