diff --git a/paddle/fluid/lite/core/mir/fusion/conv_elementwise_add_relu_fuser.cc b/paddle/fluid/lite/core/mir/fusion/conv_elementwise_add_relu_fuser.cc index 497c8f4f0d3c6ee08112794b04937bb4ec1cf0cd..421c920e6214756a823622b4f24dfb651d63951b 100644 --- a/paddle/fluid/lite/core/mir/fusion/conv_elementwise_add_relu_fuser.cc +++ b/paddle/fluid/lite/core/mir/fusion/conv_elementwise_add_relu_fuser.cc @@ -87,7 +87,6 @@ cpp::OpDesc ConvElementwiseAddReLUFuser::GenOpDesc(const key2nodes_t& matched) { op_desc.SetOutput("Output", {matched.at("output")->arg()->name}); // Other inputs. See operators/conv_op.h std::vector input_arg_names = desc->InputArgumentNames(); - for (auto name : input_arg_names) LOG(INFO) << name; if (std::find(input_arg_names.begin(), input_arg_names.end(), "ResidualData") != input_arg_names.end()) { diff --git a/paddle/fluid/lite/core/mir/generate_program_pass.cc b/paddle/fluid/lite/core/mir/generate_program_pass.cc index 3751b6f1f84a19e5ce7753e086e76f289e707e5d..e74c71b778b4faa53d82beac66dba46d7f3668a5 100644 --- a/paddle/fluid/lite/core/mir/generate_program_pass.cc +++ b/paddle/fluid/lite/core/mir/generate_program_pass.cc @@ -28,7 +28,7 @@ void GenerateProgramPass::Apply(const std::unique_ptr& graph) { for (auto& item : graph->StmtTopologicalOrder()) { if (item->IsStmt()) { auto& stmt = item->AsStmt(); - LOG(INFO) << stmt; + VLOG(4) << stmt; insts_.emplace_back(stmt.op, std::move(stmt.valid_kernels.front())); } } diff --git a/paddle/fluid/lite/core/mir/passes.h b/paddle/fluid/lite/core/mir/passes.h index b2ee259d5c673689201d933a6248b77dd704e20e..a6abb16e3eaabe6a0f12b75248f3db1f7cfeeb81 100644 --- a/paddle/fluid/lite/core/mir/passes.h +++ b/paddle/fluid/lite/core/mir/passes.h @@ -23,8 +23,6 @@ namespace mir {} // namespace mir #ifndef LITE_WITH_LIGHT_WEIGHT_FRAMEWORK USE_MIR_PASS(demo); -USE_MIR_PASS(lite_fc_fuse_pass); -USE_MIR_PASS(lite_conv_elementwise_add_act_fuse_pass); USE_MIR_PASS(static_kernel_pick_pass); USE_MIR_PASS(variable_place_inference_pass); USE_MIR_PASS(type_target_transform_pass); @@ -35,3 +33,5 @@ USE_MIR_PASS(argument_type_display_pass); USE_MIR_PASS(runtime_context_assign_pass); USE_MIR_PASS(lite_conv_bn_fuse_pass); USE_MIR_PASS(graph_visualze); +USE_MIR_PASS(lite_fc_fuse_pass); +USE_MIR_PASS(lite_conv_elementwise_add_act_fuse_pass); diff --git a/paddle/fluid/lite/core/mir/pattern_matcher_high_api.cc b/paddle/fluid/lite/core/mir/pattern_matcher_high_api.cc index 5dc929cda5ee296623ba12a0a2d355c2f71ae7c8..57bba3aad140b4c8f8e1a2c6db27792773c018cd 100644 --- a/paddle/fluid/lite/core/mir/pattern_matcher_high_api.cc +++ b/paddle/fluid/lite/core/mir/pattern_matcher_high_api.cc @@ -20,7 +20,7 @@ namespace lite { namespace mir { void FuseBase::PerformPatternMatcher(SSAGraph *graph) { - LOG(INFO) << "\n" << matcher_.pattern().DotString(); + VLOG(4) << "\n" << matcher_.pattern().DotString(); // Get subgraphs and record the mir::Node pointers for each PMNode. auto handler = [&](const PatternMatcher::subgraph_t &subgraph, SSAGraph *g) { // get all the reigistered nodes. @@ -41,17 +41,14 @@ void FuseBase::DeleteInterNodes(SSAGraph *graph) { } } - LOG(INFO) << "keys.size " << keys.size(); - std::unordered_set nodes2rm; for (auto &matched : key2nodes_) { - LOG(INFO) << "get matched " << matched.size(); for (const auto &key : keys) { nodes2rm.insert(matched.at(key)); } } - LOG(INFO) << "clean nodes " << nodes2rm.size(); + VLOG(3) << "clean nodes " << nodes2rm.size(); GraphSafeRemoveNodes(graph, nodes2rm); } diff --git a/paddle/fluid/lite/core/op_lite.h b/paddle/fluid/lite/core/op_lite.h index 922aa2304e43a95dd59e273ac09c365c65f12ef3..41aa3bb0f6da1d3002ef3d8d6274244c19687fdb 100644 --- a/paddle/fluid/lite/core/op_lite.h +++ b/paddle/fluid/lite/core/op_lite.h @@ -59,7 +59,7 @@ class OpLite : public Registry { } void SetValidPlaces(const std::vector &places) { - LOG(INFO) << "valid places " << valid_places_.size(); + VLOG(3) << "valid places " << valid_places_.size(); valid_places_ = places; } const std::vector &valid_places() const { return valid_places_; } diff --git a/paddle/fluid/lite/core/program.h b/paddle/fluid/lite/core/program.h index 4f2f65d3fa714d961f7bbfd4b7215975bf65c16e..2f3e078462a7a5ff61217aa6c10b6e3973a29143 100644 --- a/paddle/fluid/lite/core/program.h +++ b/paddle/fluid/lite/core/program.h @@ -140,7 +140,7 @@ class RuntimeProgram { void Run() { for (auto& inst : instructions_) { - LOG(INFO) << ">> Running kernel: " << inst; + VLOG(4) << ">> Running kernel: " << inst; inst.Run(); } } diff --git a/paddle/fluid/lite/model_parser/model_parser.cc b/paddle/fluid/lite/model_parser/model_parser.cc index c829259ee424b0b16a3a43e73ce8f5c61a2c91eb..1b30ca772f872de6fec2b427eee1ad2e96d24576 100644 --- a/paddle/fluid/lite/model_parser/model_parser.cc +++ b/paddle/fluid/lite/model_parser/model_parser.cc @@ -91,7 +91,7 @@ void LoadLoDTensor(std::istream &is, Variable *var) { auto *tensor = var->GetMutable(); uint32_t version{}; is.read(reinterpret_cast(&version), sizeof(version)); - LOG(INFO) << "model version " << version; + VLOG(3) << "model version " << version; // Load LoD information uint64_t lod_level{}; @@ -154,7 +154,7 @@ void LoadModel(const std::string &model_dir, Scope *scope, continue; std::string file_path = model_dir + "/" + var.name(); - LOG(INFO) << "reading weight " << var.name(); + VLOG(4) << "reading weight " << var.name(); std::ifstream file(file_path); switch (var.type().type()) {