[CPU] [DEBUG_CAPS] Execute all the nodes to have debug info available (#7809)

Otherwise Reshape / Output / etc nodes are missed in verbose log
And blobs from Output nodes are node dumped
This commit is contained in:
Egor Duplensky 2021-10-06 11:58:46 +03:00 committed by GitHub
parent 17dc82a00a
commit faeeedf141
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 5 deletions

View File

@ -75,7 +75,7 @@ void MKLDNNGraph::CreateGraph(NET &net, const MKLDNNExtensionManager::Ptr& extMg
status = Ready;
ENABLE_CPU_DEBUG_CAP(serialize(*this));
CPU_DEBUG_CAP_ENABLE(serialize(*this));
}
template void MKLDNNGraph::CreateGraph(const std::shared_ptr<const ngraph::Function>&,
@ -320,7 +320,7 @@ void MKLDNNGraph::Replicate(const CNNNetwork &network, const MKLDNNExtensionMana
void MKLDNNGraph::InitGraph() {
MKLDNNGraphOptimizer optimizer;
ENABLE_CPU_DEBUG_CAP(initNodeDumper(config.debugCaps));
CPU_DEBUG_CAP_ENABLE(initNodeDumper(config.debugCaps));
SortTopologically();
InitNodes();
@ -397,7 +397,12 @@ void MKLDNNGraph::ExtractConstantAndExecutableNodes() {
for (const auto& graphNode : graphNodes) {
if (graphNode->isConstant())
constantGraphNodes.emplace_back(graphNode);
else if (graphNode->isExecutable())
else if (CPU_DEBUG_CAPS_ALWAYS_TRUE(graphNode->isExecutable()))
/* @todo
* Revise implementation.
* With current way it is possible that with debug_caps enabled
* we execute a node, which is not ready to be executed
*/
executableGraphNodes.emplace_back(graphNode);
}
}

View File

@ -9,7 +9,9 @@
#include <string>
#include <vector>
#define ENABLE_CPU_DEBUG_CAP(_x) _x;
#define CPU_DEBUG_CAP_ENABLE(_x) _x;
#define CPU_DEBUG_CAPS_ALWAYS_TRUE(x) true
namespace MKLDNNPlugin {
namespace DebugCaps {
@ -47,5 +49,7 @@ private:
} // namespace MKLDNNPlugin
#else // !CPU_DEBUG_CAPS
#define ENABLE_CPU_DEBUG_CAP(_x)
#define CPU_DEBUG_CAP_ENABLE(_x)
#define CPU_DEBUG_CAPS_ALWAYS_TRUE(x) x
#endif // CPU_DEBUG_CAPS