Skip to content

Commit

Permalink
[CPU][DEBUG_CAPS] Do not include all the nodes to executable ones
Browse files Browse the repository at this point in the history
There is a case, when a node is a static one and it has 0 dim in
one of the input shapes.
In this case we must not execute this node, but performing
addition isExecutable() check in runtime for all the static nodes
would be to expensive
  • Loading branch information
EgorDuplensky committed Nov 18, 2024
1 parent 0376890 commit 8e66553
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/plugins/intel_cpu/src/graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,13 +277,8 @@ static std::tuple<std::vector<NodePtr>, std::vector<size_t>> ExtractExecutableNo
std::vector<NodePtr> executableGraphNodes;
for (size_t i = 0; i < graphNodes.size(); i++) {
const auto& graphNode = graphNodes[i];
if ((!graphNode->isConstant() && CPU_DEBUG_CAPS_ALWAYS_TRUE(graphNode->isExecutable())) || // non-constant executable or
if (!graphNode->isConstant() || // non-constant executable or
(graphNode->isDynamicNode() && !one_of(graphNode->getType(), Type::Input, Type::Output))) { // dynamic, except inputs / outputs
/* @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
*/
graphIdToExecutableId[i] = executableGraphNodes.size();
executableGraphNodes.emplace_back(graphNode);
}
Expand Down

0 comments on commit 8e66553

Please sign in to comment.