Skip to content

Commit

Permalink
Fix review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>
  • Loading branch information
zhaixuejun1993 committed Mar 13, 2024
1 parent 69b79c7 commit 917aca9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
12 changes: 7 additions & 5 deletions src/plugins/intel_cpu/src/graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ void Graph::Replicate(const std::shared_ptr<const ov::Model> &model) {
if (op->get_type_info() == op::v0::Parameter::get_type_info_static()) {
auto input_index = model->get_parameter_index(std::dynamic_pointer_cast<op::v0::Parameter>(op));
OPENVINO_ASSERT(input_index >= 0,
"Can not find op: ",
"CPU plugin cannot find op: ",
op->get_friendly_name(),
" in model parameter list!");
inputNodesMap[input_index] = node;
Expand All @@ -151,7 +151,10 @@ void Graph::Replicate(const std::shared_ptr<const ov::Model> &model) {

if (op->get_type_info() == op::v0::Result::get_type_info_static()) {
auto output_index = model->get_result_index(std::dynamic_pointer_cast<op::v0::Result>(op));
OPENVINO_ASSERT(output_index >= 0, "Can not find op: ", op->get_friendly_name(), " in model result list!");
OPENVINO_ASSERT(output_index >= 0,
"CPU plugin cannot find op: ",
op->get_friendly_name(),
" in model result list!");
outputNodesMap[output_index] = node;
}

Expand Down Expand Up @@ -787,7 +790,7 @@ void Graph::AllocateWithReuse() {
}
}
// sometimes there are unused output ports.
OPENVINO_ASSERT(count <= 1, "cannot find output node. count ", count);
OPENVINO_ASSERT(count <= 1, "CPU plugin cannot find output node. count ", count);
}
}
}
Expand Down Expand Up @@ -990,11 +993,10 @@ void Graph::PullOutputData(std::unordered_map<std::size_t, ov::SoPtr<ITensor>>&
const auto& intr_blob = parentEdge->getMemory();

const auto ext_blob_map = output.find(output_index);
const auto ext_blob = ext_blob_map->second;
OPENVINO_ASSERT(ext_blob_map != output.end(),
"The CPU plugin graph doesn't contain output node with output_index: ",
output_index);

const auto ext_blob = ext_blob_map->second;
auto expected_desc_ptr = MemoryDescUtils::generateCpuBlockedMemoryDesc(ext_blob);
const auto actualDesc = intr_blob.getDescWithType<BlockedMemoryDesc>();

Expand Down
10 changes: 5 additions & 5 deletions src/plugins/intel_cpu/src/infer_request.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,12 +329,12 @@ std::vector<ov::SoPtr<ov::ITensor>> SyncInferRequest::get_tensors(const ov::Outp
}

const ov::Output<const ov::Node>& SyncInferRequest::get_internal_port(const ov::Output<const ov::Node>& port) const {
auto index = find_port(port).idx;
bool is_input = ov::op::util::is_parameter(port.get_node());
if (is_input) {
return m_input_ports_map.at(index);
auto port_find = find_port(port);
OPENVINO_ASSERT(port_find.found(), "Can not find port: ", port.get_any_name());
if (port_find.is_input()) {
return m_input_ports_map.at(port_find.idx);
} else {
return m_output_ports_map.at(index);
return m_output_ports_map.at(port_find.idx);
}
}

Expand Down

0 comments on commit 917aca9

Please sign in to comment.