change VERBOSE_LOG to DEBUG_LOG

This commit is contained in:
Li, Tingqian
2022-05-26 22:31:41 +08:00
parent ff38537aea
commit bb429a855a
5 changed files with 15 additions and 9 deletions

View File

@@ -3,6 +3,9 @@ Use the following cmake option to enable debug capabilities:
`-DENABLE_DEBUG_CAPS=ON`
Debug logs starting with `[ DEBUG ]` will be shown after this option is set to ON.
* [Verbose mode](verbose.md)
* [Blob dumping](blob_dumping.md)
* [Graph serialization](graph_serialization.md)
* Performance summary: set `OV_CPU_SUMMARY_PERF` environment variable to display performance summary at the model destruction time.

View File

@@ -792,7 +792,8 @@ void Graph::CreatePrimitives() {
OV_ITT_SCOPED_TASK(itt::domains::intel_cpu, "Graph::CreatePrimitives");
for (auto& node : graphNodes) {
OV_ITT_SCOPE(FIRST_INFERENCE, itt::domains::intel_cpu_LT, node->profiling.createPrimitive);
VERBOSE_LOG("#", node->getExecIndex(), " ", node->getName(), " ", node->getOriginalLayers());
DEBUG_LOG("#", node->getExecIndex(), " ", node->getTypeStr(), " ", algToString(node->getAlgorithm()),
" ", node->getName(), " ", node->getOriginalLayers());
node->createPrimitive();
}
}

View File

@@ -515,7 +515,7 @@ void Node::execute(dnnl::stream strm) {
}
void Node::executeDynamic(dnnl::stream strm) {
VERBOSE_LOG("#", getExecIndex(), " ", getName());
DEBUG_LOG("#", getExecIndex(), " ", getName());
if (needShapeInfer()) {
redefineOutputMemory(shapeInfer());
}

View File

@@ -8,9 +8,18 @@
#define CPU_DEBUG_CAP_ENABLE(_x) _x;
#define CPU_DEBUG_CAPS_ALWAYS_TRUE(x) true
#define DEBUG_LOG(...) \
do { \
::std::stringstream ss___; \
::ov::write_all_to_stream(ss___, "[ DEBUG ] ", __func__, ":", __LINE__, " ", __VA_ARGS__); \
std::cout << ss___.str() << std::endl; \
} while (0)
#else // !CPU_DEBUG_CAPS
#define CPU_DEBUG_CAP_ENABLE(_x)
#define CPU_DEBUG_CAPS_ALWAYS_TRUE(x) x
#define DEBUG_LOG(...)
#endif // CPU_DEBUG_CAPS

View File

@@ -44,15 +44,8 @@ private:
// use heap allocation instead of stack to align with PERF macro (to have proper destruction order)
#define VERBOSE(...) const auto verbose = std::unique_ptr<Verbose>(new Verbose(__VA_ARGS__));
#define VERBOSE_LOG(...) \
do { \
::std::stringstream ss___; \
::ov::write_all_to_stream(ss___, __VA_ARGS__); \
std::cout << "[ VERBOSE ] " << __func__ << ":" << __LINE__ << " " << ss___.str() << std::endl; \
} while (0)
} // namespace intel_cpu
} // namespace ov
#else
#define VERBOSE(...)
#define VERBOSE_LOG(...)
#endif // CPU_DEBUG_CAPS