Skip to content

Commit

Permalink
Address review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
aobolensk committed Jan 7, 2025
1 parent 607a60e commit aa3c8b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/plugins/intel_cpu/src/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ bool Node::isOneDimShape(const ov::PartialShape& pshape) {
return value_1_num >= sz - 1;
}

bool Node::isReorderRequired(ov::intel_cpu::MemoryDescPtr desc1, ov::intel_cpu::MemoryDescPtr desc2) {
bool Node::isReorderRequired(const ov::intel_cpu::MemoryDescPtr& desc1, const ov::intel_cpu::MemoryDescPtr& desc2) {
bool samePrec = desc1->getPrecision() == desc2->getPrecision();
bool isOneDimShape1 = isOneDimShape(desc1->getShape().toPartialShape());
bool isOneDimShape2 = isOneDimShape(desc2->getShape().toPartialShape());
Expand Down Expand Up @@ -383,7 +383,7 @@ void Node::selectPreferPrimitiveDescriptorWithShape(const std::vector<impl_desc_

const bool isCompatible = curDesc->isCompatible(*parentDesc);
if (!isCompatible) {
if (!isReorderRequired(std::move(parentDesc), curDesc)) {
if (!isReorderRequired(parentDesc, curDesc)) {
estimate += 1;
} else {
estimate += ov::shape_size<ov::intel_cpu::VectorDims>(curDesc->getShape().getMinDims());
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/intel_cpu/src/node.h
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ class Node {
void selectPreferPrimitiveDescriptor(const std::vector<impl_desc_type>& priority, bool ignoreConstInputs);
void selectPreferPrimitiveDescriptorWithShape(const std::vector<impl_desc_type>& priority, bool ignoreConstInputs);
bool isOneDimShape(const ov::PartialShape& pshape);
bool isReorderRequired(ov::intel_cpu::MemoryDescPtr desc1, ov::intel_cpu::MemoryDescPtr desc2);
bool isReorderRequired(const ov::intel_cpu::MemoryDescPtr& desc1, const ov::intel_cpu::MemoryDescPtr& desc2);
bool isConfigDefined(const NodeConfig& config) const;
virtual bool canBeInPlace() const;

Expand Down

0 comments on commit aa3c8b8

Please sign in to comment.