Skip to content

Commit

Permalink
Code style
Browse files Browse the repository at this point in the history
  • Loading branch information
maxnick committed Dec 13, 2024
1 parent 4080c1a commit 83a643d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/plugins/intel_cpu/src/graph.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class Graph {
NodePtr getInputNodeByIndex(std::size_t index) {
auto input = inputNodesMap.find(index);
if (input == inputNodesMap.end())
return nullptr;
return nullptr;
return input->second;
}

Expand Down Expand Up @@ -119,7 +119,7 @@ class Graph {
size_t inputsNumber() const {
return inputNodesMap.size();
}

size_t outputsNumber() const {
return outputNodesMap.size();
}
Expand Down
10 changes: 3 additions & 7 deletions src/plugins/intel_cpu/src/infer_request.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void SyncInferRequest::create_infer_request() {
void SyncInferRequest::redefine_memory_for_input_nodes(Graph& graph) {
for (const auto& input_port : m_input_ports_map) {
auto inputNode = graph.getInputNodeByIndex(input_port.first);
OPENVINO_ASSERT(inputNode, "CPU execution graph doesn't contain output node with index: ", input_port.first);;
OPENVINO_ASSERT(inputNode, "CPU execution graph doesn't contain output node with index: ", input_port.first);
if (inputNode->isDynamicNode()) {
auto tensor = get_tensor(input_port.second);
inputNode->redefineOutputMemory({tensor->get_shape()});
Expand Down Expand Up @@ -262,10 +262,7 @@ void SyncInferRequest::change_default_ptr(Graph& graph) {

if (controlBlockItr != m_outputControlBlocks.end()) {
auto output = graph.getOutputNodeByIndex(index);
OPENVINO_ASSERT(output,
"Output with index: ",
index,
" is absent in the outputNodesMap");
OPENVINO_ASSERT(output, "Output with index: ", index, " is absent in the outputNodesMap");
auto parentEdge = output->getParentEdgeAt(0);
// avoid cyclic memory use
auto&& controlBlock = controlBlockItr->second;
Expand Down Expand Up @@ -540,8 +537,7 @@ void SyncInferRequest::init_tensor(const std::size_t& port_index, const ov::ISyn

tensor = std::make_shared<Tensor>(memory);
} else {
const auto graph_prec =
output->getParentEdgeAt(0)->getMemory().getDesc().getPrecision();
const auto graph_prec = output->getParentEdgeAt(0)->getMemory().getDesc().getPrecision();
OutputControlBlock control_block{model_prec, Shape{shape}};

DEBUG_LOG(port_index,
Expand Down

0 comments on commit 83a643d

Please sign in to comment.