提交 d2542306 编写于 作者: N nhzlx

3. change LOG(INFO) to VLOG(n)

test=develop
上级 11a2a2a1
...@@ -87,7 +87,6 @@ cpp::OpDesc ConvElementwiseAddReLUFuser::GenOpDesc(const key2nodes_t& matched) { ...@@ -87,7 +87,6 @@ cpp::OpDesc ConvElementwiseAddReLUFuser::GenOpDesc(const key2nodes_t& matched) {
op_desc.SetOutput("Output", {matched.at("output")->arg()->name}); op_desc.SetOutput("Output", {matched.at("output")->arg()->name});
// Other inputs. See operators/conv_op.h // Other inputs. See operators/conv_op.h
std::vector<std::string> input_arg_names = desc->InputArgumentNames(); std::vector<std::string> 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(), if (std::find(input_arg_names.begin(), input_arg_names.end(),
"ResidualData") != input_arg_names.end()) { "ResidualData") != input_arg_names.end()) {
......
...@@ -28,7 +28,7 @@ void GenerateProgramPass::Apply(const std::unique_ptr<SSAGraph>& graph) { ...@@ -28,7 +28,7 @@ void GenerateProgramPass::Apply(const std::unique_ptr<SSAGraph>& graph) {
for (auto& item : graph->StmtTopologicalOrder()) { for (auto& item : graph->StmtTopologicalOrder()) {
if (item->IsStmt()) { if (item->IsStmt()) {
auto& stmt = item->AsStmt(); auto& stmt = item->AsStmt();
LOG(INFO) << stmt; VLOG(4) << stmt;
insts_.emplace_back(stmt.op, std::move(stmt.valid_kernels.front())); insts_.emplace_back(stmt.op, std::move(stmt.valid_kernels.front()));
} }
} }
......
...@@ -23,8 +23,6 @@ namespace mir {} // namespace mir ...@@ -23,8 +23,6 @@ namespace mir {} // namespace mir
#ifndef LITE_WITH_LIGHT_WEIGHT_FRAMEWORK #ifndef LITE_WITH_LIGHT_WEIGHT_FRAMEWORK
USE_MIR_PASS(demo); 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(static_kernel_pick_pass);
USE_MIR_PASS(variable_place_inference_pass); USE_MIR_PASS(variable_place_inference_pass);
USE_MIR_PASS(type_target_transform_pass); USE_MIR_PASS(type_target_transform_pass);
...@@ -35,3 +33,5 @@ USE_MIR_PASS(argument_type_display_pass); ...@@ -35,3 +33,5 @@ USE_MIR_PASS(argument_type_display_pass);
USE_MIR_PASS(runtime_context_assign_pass); USE_MIR_PASS(runtime_context_assign_pass);
USE_MIR_PASS(lite_conv_bn_fuse_pass); USE_MIR_PASS(lite_conv_bn_fuse_pass);
USE_MIR_PASS(graph_visualze); USE_MIR_PASS(graph_visualze);
USE_MIR_PASS(lite_fc_fuse_pass);
USE_MIR_PASS(lite_conv_elementwise_add_act_fuse_pass);
...@@ -20,7 +20,7 @@ namespace lite { ...@@ -20,7 +20,7 @@ namespace lite {
namespace mir { namespace mir {
void FuseBase::PerformPatternMatcher(SSAGraph *graph) { 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. // Get subgraphs and record the mir::Node pointers for each PMNode.
auto handler = [&](const PatternMatcher::subgraph_t &subgraph, SSAGraph *g) { auto handler = [&](const PatternMatcher::subgraph_t &subgraph, SSAGraph *g) {
// get all the reigistered nodes. // get all the reigistered nodes.
...@@ -41,17 +41,14 @@ void FuseBase::DeleteInterNodes(SSAGraph *graph) { ...@@ -41,17 +41,14 @@ void FuseBase::DeleteInterNodes(SSAGraph *graph) {
} }
} }
LOG(INFO) << "keys.size " << keys.size();
std::unordered_set<const Node *> nodes2rm; std::unordered_set<const Node *> nodes2rm;
for (auto &matched : key2nodes_) { for (auto &matched : key2nodes_) {
LOG(INFO) << "get matched " << matched.size();
for (const auto &key : keys) { for (const auto &key : keys) {
nodes2rm.insert(matched.at(key)); nodes2rm.insert(matched.at(key));
} }
} }
LOG(INFO) << "clean nodes " << nodes2rm.size(); VLOG(3) << "clean nodes " << nodes2rm.size();
GraphSafeRemoveNodes(graph, nodes2rm); GraphSafeRemoveNodes(graph, nodes2rm);
} }
......
...@@ -59,7 +59,7 @@ class OpLite : public Registry { ...@@ -59,7 +59,7 @@ class OpLite : public Registry {
} }
void SetValidPlaces(const std::vector<Place> &places) { void SetValidPlaces(const std::vector<Place> &places) {
LOG(INFO) << "valid places " << valid_places_.size(); VLOG(3) << "valid places " << valid_places_.size();
valid_places_ = places; valid_places_ = places;
} }
const std::vector<Place> &valid_places() const { return valid_places_; } const std::vector<Place> &valid_places() const { return valid_places_; }
......
...@@ -140,7 +140,7 @@ class RuntimeProgram { ...@@ -140,7 +140,7 @@ class RuntimeProgram {
void Run() { void Run() {
for (auto& inst : instructions_) { for (auto& inst : instructions_) {
LOG(INFO) << ">> Running kernel: " << inst; VLOG(4) << ">> Running kernel: " << inst;
inst.Run(); inst.Run();
} }
} }
......
...@@ -91,7 +91,7 @@ void LoadLoDTensor(std::istream &is, Variable *var) { ...@@ -91,7 +91,7 @@ void LoadLoDTensor(std::istream &is, Variable *var) {
auto *tensor = var->GetMutable<lite::Tensor>(); auto *tensor = var->GetMutable<lite::Tensor>();
uint32_t version{}; uint32_t version{};
is.read(reinterpret_cast<char *>(&version), sizeof(version)); is.read(reinterpret_cast<char *>(&version), sizeof(version));
LOG(INFO) << "model version " << version; VLOG(3) << "model version " << version;
// Load LoD information // Load LoD information
uint64_t lod_level{}; uint64_t lod_level{};
...@@ -154,7 +154,7 @@ void LoadModel(const std::string &model_dir, Scope *scope, ...@@ -154,7 +154,7 @@ void LoadModel(const std::string &model_dir, Scope *scope,
continue; continue;
std::string file_path = model_dir + "/" + var.name(); 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); std::ifstream file(file_path);
switch (var.type().type()) { switch (var.type().type()) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册