Add verbose log

This commit is contained in:
Li, Tingqian
2022-05-26 02:46:15 -04:00
parent 8b7f7d6391
commit a1ccf115df
3 changed files with 10 additions and 0 deletions

View File

@@ -788,6 +788,7 @@ 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());
node->createPrimitive();
}
}

View File

@@ -56,6 +56,7 @@
#include <ie_ngraph_utils.hpp>
#include "utils/general_utils.h"
#include "utils/cpu_utils.hpp"
#include "utils/verbose.h"
#include "nodes/common/cpu_convert.h"
#include "memory_desc/cpu_memory_desc_utils.h"
#include "memory_desc/dnnl_blocked_memory_desc.h"
@@ -514,6 +515,7 @@ void Node::execute(dnnl::stream strm) {
}
void Node::executeDynamic(dnnl::stream strm) {
VERBOSE_LOG("#", getExecIndex(), " ", getName());
if (needShapeInfer()) {
redefineOutputMemory(shapeInfer());
}

View File

@@ -44,8 +44,15 @@ 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 << __func__ << ":" << __LINE__ << " " << ss___.str() << std::endl; \
} while (0)
} // namespace intel_cpu
} // namespace ov
#else
#define VERBOSE(...)
#define VERBOSE_LOG(...)
#endif // CPU_DEBUG_CAPS