Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CPU] Replace OPENVINO_ASSERT macros usage in nodes with CPU_NODE_ASSERT #28872

Merged
merged 5 commits into from
Feb 10, 2025

Conversation

aobolensk
Copy link
Contributor

Details:

  • Replace custom OPENVINO_ASSERT macros usage for error reporting in nodes implementation with CPU_NODE_ASSERT
  • Add assertion message where it is missing

Tickets:

  • 160275

@aobolensk aobolensk requested review from a team as code owners February 7, 2025 10:02
@github-actions github-actions bot added the category: CPU OpenVINO CPU plugin label Feb 7, 2025
@aobolensk aobolensk requested a review from maxnick February 7, 2025 10:18
@maxnick maxnick added this to the 2025.1 milestone Feb 7, 2025
Comment on lines 728 to 731
CPU_NODE_ASSERT(baseDim != Shape::UNDEFINED_DIM,
" Concat node: ",
getName(),
" can't use inPlace memory with concatenation on dynamic dimension");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the node type and name from the message as it's incerted in the prefix (see CPU_NODE_ASSERT macro). Here and below.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

src/plugins/intel_cpu/src/nodes/gather.cpp Show resolved Hide resolved
src/plugins/intel_cpu/src/nodes/memory.cpp Outdated Show resolved Hide resolved
src/plugins/intel_cpu/src/nodes/shapeof.cpp Show resolved Hide resolved
@@ -571,21 +571,21 @@ void Split::resolveInPlaceEdges(Edge::LOOK look) {
size_t numberOfOutputs = config.outConfs.size();
size_t inplaceInpIndx = selected_pd->getConfig().outConfs[0].inPlace();
auto baseDim = inputShapes.front().getDims()[axis];
OPENVINO_ASSERT(baseDim != Shape::UNDEFINED_DIM,
CPU_NODE_ASSERT(baseDim != Shape::UNDEFINED_DIM,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the node name and type.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@aobolensk aobolensk requested a review from maxnick February 7, 2025 12:13
src/plugins/intel_cpu/src/nodes/concat.cpp Outdated Show resolved Hide resolved
src/plugins/intel_cpu/src/nodes/concat.cpp Outdated Show resolved Hide resolved
src/plugins/intel_cpu/src/nodes/memory.cpp Outdated Show resolved Hide resolved
@maxnick maxnick added this pull request to the merge queue Feb 10, 2025
Merged via the queue into openvinotoolkit:master with commit 96c2896 Feb 10, 2025
181 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: CPU OpenVINO CPU plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants