Commit 90ca8c5c authored by Yixing Lao's avatar Yixing Lao

rename logging macros

parent 0c76eb87
...@@ -26,7 +26,7 @@ void destroy_ngraph_object(NGraph* pObj) ...@@ -26,7 +26,7 @@ void destroy_ngraph_object(NGraph* pObj)
void NGraph::add_params(const std::vector<std::string>& paramList) void NGraph::add_params(const std::vector<std::string>& paramList)
{ {
INFO << "Adding parameters"; NGRAPH_INFO << "Adding parameters";
m_params.insert(m_params.end(), paramList.begin(), paramList.end()); m_params.insert(m_params.end(), paramList.begin(), paramList.end());
} }
......
...@@ -88,19 +88,19 @@ namespace nervana ...@@ -88,19 +88,19 @@ namespace nervana
static std::deque<std::string> queue; static std::deque<std::string> queue;
}; };
#define ERR \ #define NGRAPH_ERR \
nervana::log_helper(nervana::LOG_TYPE::_LOG_TYPE_ERROR, \ nervana::log_helper(nervana::LOG_TYPE::_LOG_TYPE_ERROR, \
nervana::get_file_name(__FILE__), \ nervana::get_file_name(__FILE__), \
__LINE__, \ __LINE__, \
__PRETTY_FUNCTION__) \ __PRETTY_FUNCTION__) \
.stream() .stream()
#define WARN \ #define NGRAPH_WARN \
nervana::log_helper(nervana::LOG_TYPE::_LOG_TYPE_WARNING, \ nervana::log_helper(nervana::LOG_TYPE::_LOG_TYPE_WARNING, \
nervana::get_file_name(__FILE__), \ nervana::get_file_name(__FILE__), \
__LINE__, \ __LINE__, \
__PRETTY_FUNCTION__) \ __PRETTY_FUNCTION__) \
.stream() .stream()
#define INFO \ #define NGRAPH_INFO \
nervana::log_helper(nervana::LOG_TYPE::_LOG_TYPE_INFO, \ nervana::log_helper(nervana::LOG_TYPE::_LOG_TYPE_INFO, \
nervana::get_file_name(__FILE__), \ nervana::get_file_name(__FILE__), \
__LINE__, \ __LINE__, \
......
...@@ -48,9 +48,9 @@ TEST(NGraph, loadTest) ...@@ -48,9 +48,9 @@ TEST(NGraph, loadTest)
NGraph* nGraphObj = createPfn(); NGraph* nGraphObj = createPfn();
INFO << "Call a method on the Object"; NGRAPH_INFO << "Call a method on the Object";
ASSERT_EQ("NGraph Implementation Object", nGraphObj->get_name()); ASSERT_EQ("NGraph Implementation Object", nGraphObj->get_name());
INFO << "Object Name: " << nGraphObj->get_name(); NGRAPH_INFO << "Object Name: " << nGraphObj->get_name();
// Add some parameters // Add some parameters
const vector<string> TEST_PARAMS = {"param-1", "param-2", "param-3"}; const vector<string> TEST_PARAMS = {"param-1", "param-2", "param-3"};
...@@ -65,7 +65,7 @@ TEST(NGraph, loadTest) ...@@ -65,7 +65,7 @@ TEST(NGraph, loadTest)
EXPECT_EQ(TEST_PARAMS[i], storedParams[i]); EXPECT_EQ(TEST_PARAMS[i], storedParams[i]);
} }
INFO << "Destroy the NGraph Object"; NGRAPH_INFO << "Destroy the NGraph Object";
destroyPfn(nGraphObj); destroyPfn(nGraphObj);
dlclose(ngraphImplLib); dlclose(ngraphImplLib);
......
...@@ -62,10 +62,10 @@ TEST(pass, liveness) ...@@ -62,10 +62,10 @@ TEST(pass, liveness)
// for (const Node* node : sorted) // for (const Node* node : sorted)
// { // {
// INFO << *node; // NGRAPH_INFO << *node;
// for (const descriptor::Tensor* tensor : node->liveness_live_list) // for (const descriptor::Tensor* tensor : node->liveness_live_list)
// { // {
// INFO << " " << *tensor; // NGRAPH_INFO << " " << *tensor;
// } // }
// } // }
......
...@@ -112,17 +112,17 @@ TEST(benchmark, topological_sort) ...@@ -112,17 +112,17 @@ TEST(benchmark, topological_sort)
ts.run_on_tree(result); ts.run_on_tree(result);
auto sorted_list = ts.get_call_graph(); auto sorted_list = ts.get_call_graph();
timer.stop(); timer.stop();
INFO << "topological sort took " << timer.get_milliseconds() << "ms"; NGRAPH_INFO << "topological sort took " << timer.get_milliseconds() << "ms";
size_t node_count = 0; size_t node_count = 0;
traverse_nodes(result, [&](const Node* node) { traverse_nodes(result, [&](const Node* node) {
node_count++; node_count++;
}); });
INFO << "node count " << node_count; NGRAPH_INFO << "node count " << node_count;
timer.start(); timer.start();
ngraph::free_nodes(result); ngraph::free_nodes(result);
timer.stop(); timer.stop();
INFO << "delete nodes took " << timer.get_milliseconds() << "ms"; NGRAPH_INFO << "delete nodes took " << timer.get_milliseconds() << "ms";
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment