OpenVINO™ is an open source toolkit for optimizing and deploying AI inference
C++ aicomputer-visiondeep-learningdeploy-aidiffusion-modelsgenerative-aigood-first-issueinferencellm-inferencenatural-language-processingnlpopenvinooptimize-aiperformance-boostrecommendation-systemspeech-recognitionstable-diffusiontransformersyolo
[CPU] Replace OPENVINO_THROW macros usage in nodes with THROW_CPU_NODE_ERR (#28771)
Arseniy Obolenskiye068aef4ce60
diff --git a/src/plugins/intel_cpu/src/nodes/batch_to_space.cpp b/src/plugins/intel_cpu/src/nodes/batch_to_space.cppindex 35a2d829bbc..bda466e0941 100644--- a/src/plugins/intel_cpu/src/nodes/batch_to_space.cpp+++ b/src/plugins/intel_cpu/src/nodes/batch_to_space.cpp@@ -258,9 +258,9 @@ void BatchToSpace::execute(const dnnl::stream& strm) {batchToSpaceKernel<element_type_traits<ov::element::i32>::value_type>();break;default:- OPENVINO_THROW("BatchToSpace layer does not support precision '",- std::string(getParentEdgeAt(0)->getMemory().getDesc().getPrecision().get_type_name()),- "'");+ THROW_CPU_NODE_ERR("does not support precision '",+ std::string(getParentEdgeAt(0)->getMemory().getDesc().getPrecision().get_type_name()),+ "'");}}diff --git a/src/plugins/intel_cpu/src/nodes/bin_conv.cpp b/src/plugins/intel_cpu/src/nodes/bin_conv.cppindex 722719e687c..370bdea66aa 100644--- a/src/plugins/intel_cpu/src/nodes/bin_conv.cpp+++ b/src/plugins/intel_cpu/src/nodes/bin_conv.cpp@@ -1084,7 +1084,7 @@ void BinaryConvolution::initSupportedPrimitiveDescriptors() {void BinaryConvolution::createPrimitive() {auto selectedPrimitiveDescriptor = getSelectedPrimitiveDescriptor();if (!selectedPrimitiveDescriptor) {- OPENVINO_THROW("CPU binary convolution with name '", getName(), "' doesn't have primitive descriptors.");+ THROW_CPU_NODE_ERR("doesn't have primitive descriptors.");}auto srcDims = getParentEdgeAt(0)->getMemory().getStaticDims();@@ -1163,7 +1163,7 @@ void BinaryConvolution::createPrimitive() {(jcp.l_pad <= jcp.ur_w) && (r_pad_no_tail <= jcp.ur_w) &&IMPLICATION(jcp.kw > 7, (jcp.t_pad == 0 && jcp.l_pad == 0) || (jcp.stride_w == 1 && jcp.stride_h == 1));if (!args_ok) {- OPENVINO_THROW("BinaryConvolution with name '", getName(), "' has unsupported parameters");+ THROW_CPU_NODE_ERR("has unsupported parameters");}#if defined(OPENVINO_ARCH_X86_64)jit_dw_conv_params jcp_dw_conv = {};@@ -1416,7 +1416,7 @@ void BinaryConvolution::execute(const dnnl::stream& strm) {auto selectedPrimitiveDescriptor = getSelectedPrimitiveDescriptor();if (!selectedPrimitiveDescriptor) {- OPENVINO_THROW("CPU binary convolution with name '", getName(), "' doesn't have primitive descriptors.");+ THROW_CPU_NODE_ERR("doesn't have primitive descriptors.");}auto implType = selectedPrimitiveDescriptor->getImplementationType();diff --git a/src/plugins/intel_cpu/src/nodes/bucketize.cpp b/src/plugins/intel_cpu/src/nodes/bucketize.cppindex 97d4e0daf2e..8e2db6f9192 100644--- a/src/plugins/intel_cpu/src/nodes/bucketize.cpp+++ b/src/plugins/intel_cpu/src/nodes/bucketize.cpp@@ -38,9 +38,7 @@ Bucketize::Bucketize(const std::shared_ptr<ov::Node>& op, const GraphContext::CPconst auto bucketsize = ov::as_type_ptr<const ov::opset3::Bucketize>(op);if (bucketsize == nullptr) {- OPENVINO_THROW("Operation with name '",- op->get_friendly_name(),- "' is not an instance of Bucketize from opset3.");+ THROW_CPU_NODE_ERR("is not an instance of Bucketize from opset3.");}if (getOriginalInputsNumber() != 2 || getOriginalOutputsNumber() != 1) {@@ -191,16 +189,16 @@ void Bucketize::prepareParams() {auto inputBinsMemPtr = getSrcMemoryAtPort(INPUT_BINS_PORT);auto dstMemPtr = getDstMemoryAtPort(0);if (!dstMemPtr || !dstMemPtr->isDefined()) {- OPENVINO_THROW("Destination memory is undefined.");+ THROW_CPU_NODE_ERR("has destination memory undefined.");}if (!inputTensorMemPtr || !inputTensorMemPtr->isDefined()) {- OPENVINO_THROW("Input tensor is undefined.");+ THROW_CPU_NODE_ERR("has input tensor undefined.");}if (!inputBinsMemPtr || !inputBinsMemPtr->isDefined()) {- OPENVINO_THROW("Input bins is undefined.");+ THROW_CPU_NODE_ERR("has input bins undefined.");}if (getSelectedPrimitiveDescriptor() == nullptr) {- OPENVINO_THROW("Preferable primitive descriptor is not set.");+ THROW_CPU_NODE_ERR("has preferable primitive descriptors unset.");}// update with_bins/num_values/num_bin_valuesdiff --git a/src/plugins/intel_cpu/src/nodes/causal_mask_preprocess.cpp b/src/plugins/intel_cpu/src/nodes/causal_mask_preprocess.cppindex de618833615..7856106d6ca 100644--- a/src/plugins/intel_cpu/src/nodes/causal_mask_preprocess.cpp+++ b/src/plugins/intel_cpu/src/nodes/causal_mask_preprocess.cpp@@ -103,7 +103,7 @@ CausalMaskPreprocess::CausalMaskPreprocess(const std::shared_ptr<ov::Node>& op,: Node(op, context, InternalDynShapeInferFactory()) {std::string errorMessage;if (!isSupportedOperation(op, errorMessage)) {- OPENVINO_THROW("CPU: " + errorMessage);+ OPENVINO_THROW_NOT_IMPLEMENTED(errorMessage);}const auto node = ov::as_type_ptr<const intel_cpu::CausalMaskPreprocessNode>(op);@@ -146,7 +146,7 @@ void CausalMaskPreprocess::initSupportedPrimitiveDescriptors() {prec = ov::element::i32;}} else {- OPENVINO_THROW("CPU: CausalMaskPreprocess type not supported : " + m_config.type);+ THROW_CPU_NODE_ERR("type not supported : " + m_config.type);}std::vector<PortConfigurator> inPortConfigs;diff --git a/src/plugins/intel_cpu/src/nodes/color_convert.cpp b/src/plugins/intel_cpu/src/nodes/color_convert.cppindex 41cda880226..d8466b5522e 100644--- a/src/plugins/intel_cpu/src/nodes/color_convert.cpp+++ b/src/plugins/intel_cpu/src/nodes/color_convert.cpp@@ -1078,8 +1078,7 @@ void ColorConvert::initSupportedI420Impls() {void ColorConvert::createPrimitive() {const NodeDesc* desc = getSelectedPrimitiveDescriptor();if (!desc) {- OPENVINO_THROW(getTypeStr() + " node with name '" + getName() + "' ",- "no optimal primitive descriptor selected");+ THROW_CPU_NODE_ERR("has no optimal primitive descriptor selected");}if (!_impl) {@@ -1094,7 +1093,7 @@ void ColorConvert::createPrimitive() {void ColorConvert::execute(const dnnl::stream& strm) {if (!_impl) {- OPENVINO_THROW(getTypeStr() + " node with name '" + getName() + "' ", "has no any implemented converter");+ THROW_CPU_NODE_ERR("has no any implemented converter");}_impl->execute(strm);}diff --git a/src/plugins/intel_cpu/src/nodes/concat.cpp b/src/plugins/intel_cpu/src/nodes/concat.cppindex 614b19590e0..425052750f1 100644--- a/src/plugins/intel_cpu/src/nodes/concat.cpp+++ b/src/plugins/intel_cpu/src/nodes/concat.cpp@@ -63,7 +63,7 @@ Concat::Concat(const std::shared_ptr<ov::Node>& op, const GraphContext::CPtr& coaxis += inRank;}if (axis >= static_cast<int64_t>(inRank) || axis < 0) {- OPENVINO_THROW("Concat node with name '", getName(), "' has invalid value of axis parameter: ", axis);+ THROW_CPU_NODE_ERR("has invalid value of axis parameter: ", axis);}this->axis = axis;}@@ -83,7 +83,7 @@ void Concat::getSupportedDescriptors() {}}if (incorrectDims || firstParentDims.size() == 0) {- OPENVINO_THROW("Incorrect input dimensions for concat node ", getName());+ THROW_CPU_NODE_ERR("has incorrect input dimensions");}}@@ -240,7 +240,7 @@ void Concat::selectOptimalPrimitiveDescriptor() {const auto& parent_config = parent_pdesc->getConfig();int outputIndex = parentEdge->getInputNum();if (outputIndex < 0 || outputIndex >= static_cast<int>(parent_config.outConfs.size())) {- OPENVINO_THROW("Cannot find index of output node");+ THROW_CPU_NODE_ERR("Cannot find index of output node");}const auto& port_desc = parent_config.outConfs[outputIndex].getMemDesc();for (auto& item : supportedLayouts) {@@ -260,7 +260,7 @@ void Concat::selectOptimalPrimitiveDescriptor() {const auto& config = prim_desc->getConfig();int inputIndex = childEdge->getOutputNum();if (inputIndex < 0 || inputIndex >= static_cast<int>(config.inConfs.size())) {- OPENVINO_THROW("Cannot find index of output node");+ THROW_CPU_NODE_ERR("Cannot find index of output node");}const auto& port_desc = config.inConfs[inputIndex].getMemDesc();for (auto& item : supportedLayouts) {@@ -353,11 +353,11 @@ void Concat::prepareParams() {const auto& dstMemPtr = getDstMemoryAtPort(0);if (!dstMemPtr || !dstMemPtr->isDefined()) {- OPENVINO_THROW("Destination memory is undefined.");+ THROW_CPU_NODE_ERR("Destination memory is undefined.");}auto dstMemDesc = dstMemPtr->getDescWithType<BlockedMemoryDesc>();if (getSelectedPrimitiveDescriptor() == nullptr) {- OPENVINO_THROW("Preferable primitive descriptor is not set.");+ THROW_CPU_NODE_ERR("Preferable primitive descriptor is not set.");}const auto& outputStrides = dstMemDesc->getStrides();@@ -404,7 +404,7 @@ void Concat::prepareParams() {const auto& srcMemPtr = getSrcMemoryAtPort(i);if (!srcMemPtr || !srcMemPtr->isDefined()) {auto parent = getParentEdgeAt(i)->getParent();- OPENVINO_THROW("Source memory from ", parent->getName(), " is undefined for node ", getName(), ".");+ THROW_CPU_NODE_ERR("Source memory from ", parent->getName(), " is undefined.");}if (canExecRef) {@@ -469,7 +469,7 @@ size_t Concat::inverseOrder(const VectorDims& order, size_t axis) {void Concat::initOptimalPrimitiveDescriptor() {auto selected_pd = getSelectedPrimitiveDescriptor();if (selected_pd == nullptr) {- OPENVINO_THROW("Preferable primitive descriptor is not set.");+ THROW_CPU_NODE_ERR("Preferable primitive descriptor is not set.");}if (!isInPlace()) {@@ -715,7 +715,7 @@ void Concat::resolveInPlaceEdges(Edge::LOOK look) {auto selected_pd = getSelectedPrimitiveDescriptor();if (selected_pd == nullptr) {- OPENVINO_THROW("Preferable primitive descriptor is not set.");+ THROW_CPU_NODE_ERR("Preferable primitive descriptor is not set.");}auto& config = selected_pd->getConfig();size_t numberOfInputs = config.inConfs.size();diff --git a/src/plugins/intel_cpu/src/nodes/conv.cpp b/src/plugins/intel_cpu/src/nodes/conv.cppindex 0f9fd20d24f..70abb0aec19 100644--- a/src/plugins/intel_cpu/src/nodes/conv.cpp+++ b/src/plugins/intel_cpu/src/nodes/conv.cpp@@ -346,7 +346,7 @@ ov::element::Type Convolution::fusedEltwisePrecision(const NodePtr& fusingNode)} else if (fusingPort == 1) {eltwisePrecision = fusingNode->getOriginalInputPrecisionAtPort(0);} else {- OPENVINO_THROW("Cannot determine Eltwise post op precision for Convolution node with name '", getName(), "'");+ THROW_CPU_NODE_ERR("Cannot determine Eltwise post op precision");}return eltwisePrecision;@@ -420,7 +420,7 @@ void Convolution::getSupportedDescriptors() {return;}if (!attrs.empty()) {- OPENVINO_THROW("attrs vector is not empty '", getName(), "'");+ THROW_CPU_NODE_ERR("has a non-empty attrs vector");}attrs.reserve(2);@@ -474,22 +474,20 @@ void Convolution::getSupportedDescriptors() {}if (static_cast<int>(getParentEdges().size()) != expectedInputEdgesNum) {- OPENVINO_THROW("Incorrect number of input edges for layer ",- getName(),- ", expected: ",- expectedInputEdgesNum,- " actual: ",- getParentEdges().size());+ THROW_CPU_NODE_ERR("Incorrect number of input edges, expected: ",+ expectedInputEdgesNum,+ " actual: ",+ getParentEdges().size());}if (getChildEdges().empty()) {- OPENVINO_THROW("Incorrect number of output edges for layer ", getName());+ THROW_CPU_NODE_ERR("Incorrect number of output edges");}int ndims = getInputShapeAtPort(0).getRank();withDWConv = isFusedWith(Type::Convolution);if (withDWConv && isDynamicNode()) {- OPENVINO_THROW("DW convolution is fused into convolution node ", getName(), " with dynamic shape.");+ THROW_CPU_NODE_ERR("DW convolution is fused into the node with dynamic shape.");}for (size_t i = 0; i < fusedWith.size(); i++) {@@ -780,11 +778,11 @@ void Convolution::setPostOps(dnnl::primitive_attr& attr,continue;}- OPENVINO_THROW("Fusing of ",- NameFromType(node->getType()),- " operation to ",- NameFromType(this->getType()),- " node is not implemented");+ THROW_CPU_NODE_ERR("Fusing of ",+ NameFromType(node->getType()),+ " operation to ",+ NameFromType(this->getType()),+ " node is not implemented");}attr.set_post_ops(ops);@@ -1347,25 +1345,25 @@ void Convolution::prepareParams() {auto wghMemPtr = getSrcMemoryAtPort(1);auto dstMemPtr = getOutputMemory();if (!dstMemPtr || !dstMemPtr->isDefined()) {- OPENVINO_THROW("Destination memory was undefined.");+ THROW_CPU_NODE_ERR("Destination memory was undefined.");}if (!srcMemPtr || !srcMemPtr->isDefined()) {- OPENVINO_THROW("Input memory was undefined.");+ THROW_CPU_NODE_ERR("Input memory was undefined.");}if (!wghMemPtr || !wghMemPtr->isDefined()) {- OPENVINO_THROW("Weight memory was undefined.");+ THROW_CPU_NODE_ERR("Weight memory was undefined.");}MemoryPtr biasMemPtr = nullptr;if (withBiases) {biasMemPtr = getSrcMemoryAtPort(2);if (!biasMemPtr || !biasMemPtr->isDefined()) {- OPENVINO_THROW("Input memory is undefined.");+ THROW_CPU_NODE_ERR("Input memory is undefined.");}}const NodeDesc* selected_pd = getSelectedPrimitiveDescriptor();if (selected_pd == nullptr) {- OPENVINO_THROW("Preferable primitive descriptor is not set for node ", getName(), ".");+ THROW_CPU_NODE_ERR("Preferable primitive descriptor is not set.");}DnnlMemoryDescCPtr inMemoryDesc = srcMemPtr->getDescWithType<DnnlMemoryDesc>();@@ -1525,7 +1523,7 @@ void Convolution::prepareParams() {execPtr = result.first;if (!execPtr) {- OPENVINO_THROW("Primitive descriptor was not found for node ", getName(), ".");+ THROW_CPU_NODE_ERR("Primitive descriptor was not found");}primArgs[DNNL_ARG_SRC] = srcMemPtr->getPrimitive();@@ -1631,7 +1629,7 @@ void Convolution::ConvolutionSumExecutor::reorder_exec(std::unordered_map<int, dvoid Convolution::execute(const dnnl::stream& strm) {if (!execPtr) {- OPENVINO_THROW("Can't execute Convolution node with name: ", getName(), ", because executor is not compiled");+ THROW_CPU_NODE_ERR("executor is not compiled");}execPtr->exec(primArgs, strm);@@ -1641,10 +1639,7 @@ void Convolution::executeDynamicImpl(const dnnl::stream& strm) {execute(strm);if (withSumBroadcast) {if (!subgraph) {- OPENVINO_THROW("Unexpected: Fused ops subgraph has not been created in ",- getTypeStr(),- " with name ",- getName());+ THROW_CPU_NODE_ERR("Fused ops subgraph has not been created");}const size_t sumPortNum = getParentEdges().size() - 1;const auto& sumInpMem = getParentEdgeAt(sumPortNum)->getMemory();@@ -1723,10 +1718,7 @@ MemoryDescPtr Convolution::getSumMemDesc(const primitive_desc& primitive_desc_itMemoryPtr Convolution::getOutputMemory() const {if (withSumBroadcast) {if (!subgraph) {- OPENVINO_THROW("Unexpected: Fused ops subgraph has not been created in ",- getTypeStr(),- " with name ",- getName());+ THROW_CPU_NODE_ERR("Fused ops subgraph has not been created");}auto inp0 = subgraph->getInput(0);return inp0->getDstMemoryAtPort(0);@@ -1776,7 +1768,7 @@ void Convolution::appendZeroPointsArgs() {void Convolution::initializeInputZeroPoints(const uint8_t* inputZpData, const size_t inputZpSize) {if (!inputZeroPoints.empty() || !legacyInputZeroPoints.empty()) {- OPENVINO_THROW("input zero point is not empty '", getName(), "'");+ THROW_CPU_NODE_ERR("input zero point is not empty");}if (inputZpSize) {inputZeroPointType = zpType::PerTensor;diff --git a/src/plugins/intel_cpu/src/nodes/cum_sum.cpp b/src/plugins/intel_cpu/src/nodes/cum_sum.cppindex dec5a42e14e..72f2881161f 100644--- a/src/plugins/intel_cpu/src/nodes/cum_sum.cpp+++ b/src/plugins/intel_cpu/src/nodes/cum_sum.cpp@@ -50,7 +50,7 @@ CumSum::CumSum(const std::shared_ptr<ov::Node>& op, const GraphContext::CPtr& coconst auto cumsum = ov::as_type_ptr<const ov::opset3::CumSum>(op);if (cumsum == nullptr) {- OPENVINO_THROW("Operation with name '", op->get_friendly_name(), "' is not an instance of CumSum from opset3.");+ THROW_CPU_NODE_ERR("is not an instance of CumSum from opset3.");}exclusive = cumsum->is_exclusive();diff --git a/src/plugins/intel_cpu/src/nodes/deconv.cpp b/src/plugins/intel_cpu/src/nodes/deconv.cppindex 71d3737595f..55d22330e4f 100644--- a/src/plugins/intel_cpu/src/nodes/deconv.cpp+++ b/src/plugins/intel_cpu/src/nodes/deconv.cpp@@ -290,7 +290,7 @@ void Deconvolution::createDnnlCompatibleWeights() {MemoryPtr blob = getSrcMemoryAtPort(1);if (!blob) {- OPENVINO_THROW("Cannot get const weights blob for node ", getName(), ".");+ THROW_CPU_NODE_ERR("Cannot get const weights blob.");}weightIsConst = getParentEdgeAt(1)->getParent()->isConstant();@@ -691,11 +691,11 @@ void Deconvolution::setPostOps(dnnl::primitive_attr& attr, const VectorDims& dimcontinue;}- OPENVINO_THROW("Fusing of ",- NameFromType(node->getType()),- " operation to ",- NameFromType(this->getType()),- " node is not implemented");+ THROW_CPU_NODE_ERR("Fusing of ",+ NameFromType(node->getType()),+ " operation to ",+ NameFromType(this->getType()),+ " node is not implemented");}attr.set_post_ops(ops);@@ -728,10 +728,8 @@ VectorDims Deconvolution::shapeInferInternal(const VectorDims& inDims, std::vectfor (size_t i = 0; i < inputShapes.size(); ++i) {if (port_mask & 1 << i) {if (outSpDims.size() != getInputShapeAtPort(i).getStaticDims()[0]) {- OPENVINO_THROW("Can't compute output shape for node with name: ",- getName(),- ", because the node has 'output_shape' input, but provided output spatial dims "- "number is incorrect");+ THROW_CPU_NODE_ERR(+ "the node has 'output_shape' input, but provided output spatial dims number is incorrect");}outSpDimsVecShape = {outSpDims.size()};inputShapesRefs.push_back(std::cref(outSpDimsVecShape));@@ -745,10 +743,7 @@ VectorDims Deconvolution::shapeInferInternal(const VectorDims& inDims, std::vectauto result = shapeInference->infer(inputShapesRefs, inputValues);if (ShapeInferStatus::success != result.status) {- OPENVINO_THROW("Unexpected: Unexpected shape inference result status in node of type ",- getTypeStr(),- " with name ",- getName());+ THROW_CPU_NODE_ERR("Unexpected shape inference result status");}return std::move(result.dims.back());}@@ -769,7 +764,7 @@ void Deconvolution::execute(const dnnl::stream& strm) {}if (!execPtr) {- OPENVINO_THROW("Can't execute Deconvolution node with name: ", getName(), ", because executor is not compiled");+ THROW_CPU_NODE_ERR("executor is not compiled");}execPtr->exec(primArgs, strm);@@ -904,17 +899,17 @@ void Deconvolution::prepareParams() {auto wghMemPtr = getSrcMemoryAtPort(1);auto dstMemPtr = getDstMemoryAtPort(0);if (!dstMemPtr || !dstMemPtr->isDefined()) {- OPENVINO_THROW("Destination memory is undefined.");+ THROW_CPU_NODE_ERR("Destination memory is undefined.");}if (!srcMemPtr || !srcMemPtr->isDefined()) {- OPENVINO_THROW("Input memory is undefined.");+ THROW_CPU_NODE_ERR("Input memory is undefined.");}if (!wghMemPtr || !wghMemPtr->isDefined()) {- OPENVINO_THROW("Weight memory is undefined.");+ THROW_CPU_NODE_ERR("Weight memory is undefined.");}auto selected_pd = getSelectedPrimitiveDescriptor();if (selected_pd == nullptr) {- OPENVINO_THROW("Preferable primitive descriptor is not set for node ", getName(), ".");+ THROW_CPU_NODE_ERR("Preferable primitive descriptor is not set.");}if (useACL) {diff --git a/src/plugins/intel_cpu/src/nodes/def_conv.cpp b/src/plugins/intel_cpu/src/nodes/def_conv.cppindex 28724027a69..ee894cedf41 100644--- a/src/plugins/intel_cpu/src/nodes/def_conv.cpp+++ b/src/plugins/intel_cpu/src/nodes/def_conv.cpp@@ -1298,7 +1298,7 @@ void DeformableConvolution::prepareParams() {execPtr = result.first;if (!execPtr) {- OPENVINO_THROW("Primitive descriptor was not found for node ", getName(), ".");+ THROW_CPU_NODE_ERR("Primitive descriptor was not found.");}}@@ -1363,14 +1363,14 @@ void DeformableConvolution::execute(const dnnl::stream& strm) {auto selectedPrimitiveDescriptor = getSelectedPrimitiveDescriptor();if (!selectedPrimitiveDescriptor) {- OPENVINO_THROW("Deformable convolution with name '", getName(), "' doesn't have primitive descriptors.");+ THROW_CPU_NODE_ERR("doesn't have primitive descriptors.");}auto config = selectedPrimitiveDescriptor->getConfig();if (execPtr) {execPtr->exec(src, offsets, weights, modulation, dst, sampledCoordsVector.data(), interpWeightsVector.data());} else {- OPENVINO_THROW("Deformable Convolution executor doesn't exist");+ THROW_CPU_NODE_ERR("executor doesn't exist");}}diff --git a/src/plugins/intel_cpu/src/nodes/depth_to_space.cpp b/src/plugins/intel_cpu/src/nodes/depth_to_space.cppindex edba298536d..d33e0c9efcf 100644--- a/src/plugins/intel_cpu/src/nodes/depth_to_space.cpp+++ b/src/plugins/intel_cpu/src/nodes/depth_to_space.cpp@@ -205,7 +205,7 @@ void DepthToSpace::prepareParams() {auto cache = context->getParamsCache();auto result = cache->getOrCreate(attrs, builder);if (!result.first) {- OPENVINO_THROW("DepthToSpaceExecutor was not found for node ", getName(), ".");+ THROW_CPU_NODE_ERR("DepthToSpaceExecutor was not found.");}execPtr = result.first;diff --git a/src/plugins/intel_cpu/src/nodes/dft.cpp b/src/plugins/intel_cpu/src/nodes/dft.cppindex ab542e5a51d..5d6e750ecd6 100644--- a/src/plugins/intel_cpu/src/nodes/dft.cpp+++ b/src/plugins/intel_cpu/src/nodes/dft.cpp@@ -594,7 +594,7 @@ void DFT::createJITKernels(bool hasDFT, bool hasFFT) {} else if (mayiuse(cpu::x64::sse41)) {dftKernel.reset(new jit_uni_dft_kernel_f32<cpu::x64::sse41>());} else {- OPENVINO_THROW("Can't create jit DFT kernel");+ THROW_CPU_NODE_ERR("Can't create jit DFT kernel");}if (dftKernel) {@@ -610,7 +610,7 @@ void DFT::createJITKernels(bool hasDFT, bool hasFFT) {} else if (mayiuse(cpu::x64::sse41)) {fftKernel.reset(new jit_uni_fft_kernel_f32<cpu::x64::sse41>());} else {- OPENVINO_THROW("Can't create jit FFT kernel");+ THROW_CPU_NODE_ERR("Can't create jit FFT kernel");}if (fftKernel) {diff --git a/src/plugins/intel_cpu/src/nodes/eltwise.cpp b/src/plugins/intel_cpu/src/nodes/eltwise.cppindex 038bc7e951a..a2c41f44425 100644--- a/src/plugins/intel_cpu/src/nodes/eltwise.cpp+++ b/src/plugins/intel_cpu/src/nodes/eltwise.cpp@@ -1295,7 +1295,7 @@ size_t Eltwise::getOpInputsNum() const {case Algorithm::EltwiseSelect:return 3;default:- OPENVINO_THROW("Unsupported operation for Eltwise node with name `", getName(), "`.");+ THROW_CPU_NODE_ERR("Unsupported operation.");}}@@ -1313,10 +1313,10 @@ bool Eltwise::isWithBroadcast() {void Eltwise::getSupportedDescriptors() {if (getParentEdges().size() < 1) {- OPENVINO_THROW("Incorrect number of input edges for layer ", getName());+ THROW_CPU_NODE_ERR("Incorrect number of input edges");}if (getChildEdges().empty()) {- OPENVINO_THROW("Incorrect number of output edges for layer ", getName());+ THROW_CPU_NODE_ERR("Incorrect number of output edges");}}@@ -1371,9 +1371,7 @@ void Eltwise::initSupportedPrimitiveDescriptors() {#endifif (!canUseOptimizedImpl && !fusedWith.empty()) {- OPENVINO_THROW("Unexpected: Eltwise node with name '",- getName(),- "' uses reference impl, but unexpectedly fused with other ops");+ THROW_CPU_NODE_ERR("uses reference impl, but unexpectedly fused with other ops");}size_t expectedInputsNum = getOpInputsNum();@@ -1384,23 +1382,19 @@ void Eltwise::initSupportedPrimitiveDescriptors() {}}if (getParentEdges().size() > MAX_ELTWISE_INPUTS) {- OPENVINO_THROW("Eltwise node with name `",- getName(),- "` doesn't support more than ",- MAX_ELTWISE_INPUTS,- " inputs (actual = ",- getParentEdges().size(),- ")");+ THROW_CPU_NODE_ERR("doesn't support more than ",+ MAX_ELTWISE_INPUTS,+ " inputs (actual = ",+ getParentEdges().size(),+ ")");}if (expectedInputsNum != getParentEdges().size()) {- OPENVINO_THROW("Eltwise node with name `",- getName(),- "` has invalid input number of inputs: expected = ",- expectedInputsNum,- " (actual = ",- getParentEdges().size(),- ")");+ THROW_CPU_NODE_ERR("has invalid input number of inputs: expected = ",+ expectedInputsNum,+ " (actual = ",+ getParentEdges().size(),+ ")");}std::vector<ov::element::Type> inputPrecisions;@@ -1424,7 +1418,7 @@ void Eltwise::initSupportedPrimitiveDescriptors() {}if (inputPrecisions.size() != getParentEdges().size()) {- OPENVINO_THROW("Eltwise node with name `", getName(), "` has invalid input precisions configuration.");+ THROW_CPU_NODE_ERR("has invalid input precisions configuration.");}ov::element::Type outputPrecision = getOriginalOutputPrecisionAtPort(0);@@ -1446,7 +1440,7 @@ void Eltwise::initSupportedPrimitiveDescriptors() {}if (outputPrecision == ov::element::bf16 || hasBF16) {- OPENVINO_THROW("Eltwise node with name `", getName(), "` doesn't support BF16 precision on this target.");+ THROW_CPU_NODE_ERR("doesn't support BF16 precision on this target.");}}# if defined(OV_CPU_WITH_ACL)@@ -1463,14 +1457,14 @@ void Eltwise::initSupportedPrimitiveDescriptors() {? (canUseOptimizedShapeAgnosticImpl ? EltwiseImplType::optimizedShapeAgnostic : EltwiseImplType::optimized): EltwiseImplType::reference;#else- OPENVINO_THROW("Unknow CPU architecture");+ THROW_CPU_NODE_ERR("Unknown CPU architecture");#endif#if defined(OV_CPU_WITH_ACL)auto filterPrecision = [&](const ov::element::Type& prc, const ov::element::Type& forcedPrec) {if (isBitwise(algorithm)) {if (std::find(supportedPrecisions.begin(), supportedPrecisions.end(), prc) == supportedPrecisions.end()) {- OPENVINO_THROW("Eltwise node with name `", getName(), "` doesn't support ", prc, " precision.");+ THROW_CPU_NODE_ERR("doesn't support ", prc, " precision.");}return prc;}@@ -1518,11 +1512,7 @@ void Eltwise::initSupportedPrimitiveDescriptors() {if (isBitwise(algorithm)) {if (std::find(supportedPrecisions.begin(), supportedPrecisions.end(), prc) ==supportedPrecisions.end()) {- OPENVINO_THROW("Eltwise node with name `",- getName(),- "` doesn't support ",- prc,- " precision.");+ THROW_CPU_NODE_ERR("doesn't support ", prc, " precision.");}return prc;}@@ -1534,7 +1524,7 @@ void Eltwise::initSupportedPrimitiveDescriptors() {} else if (prc == ov::element::f64) {return ov::element::f32;} else {- OPENVINO_THROW("Eltwise node with name `", getName(), "` doesn't support ", prc, " precision.");+ THROW_CPU_NODE_ERR("doesn't support ", prc, " precision.");}} else {return prc;@@ -1678,7 +1668,7 @@ void Eltwise::initSupportedPrimitiveDescriptors() {if (mayiuse(dnnl::impl::cpu::aarch64::asimd)) {impl_type = impl_desc_type::jit_asimd;} else {- OPENVINO_THROW("not supported architecture");+ THROW_CPU_NODE_ERR("not supported architecture");}#elif defined(OPENVINO_ARCH_X86_64)if (mayiuse(dnnl::impl::cpu::x64::avx512_core)) {@@ -1913,11 +1903,7 @@ void Eltwise::prepareParams() {} else if (node->getType() == Type::FakeQuantize) {node->appendPostOps(key.postOps, {}, fqDataPtrs);} else {- OPENVINO_THROW("Unexpected: Eltwise node with name '",- getName(),- "' has unexpected fused op of type '",- node->getTypeStr(),- "'");+ THROW_CPU_NODE_ERR("has unexpected fused op of type '", node->getTypeStr(), "'");}}@@ -2030,7 +2016,7 @@ void Eltwise::execute(const dnnl::stream& strm) {eltwiseExecPtr->exec(srcMemory, dstMemory, fqDataPtrs.data());} else {- OPENVINO_THROW("Can't execute eltwise node with name: ", getName(), ". Primitive isn't created");+ THROW_CPU_NODE_ERR("Primitive isn't created");}}@@ -2150,9 +2136,7 @@ void Eltwise::appendPostOpsImpl(dnnl::post_ops& ops,if (scales.size() == 1) {depthwiseData.resize(channelSize, depthwiseData.back());} else if (scales.size() != channelSize) {- OPENVINO_THROW("Appending Eltwise node with name '",- getName(),- "' failed due to scales data size inconsistency");+ THROW_CPU_NODE_ERR("Appending node has failed due to scales data size inconsistency");}depthwiseData.insert(depthwiseData.end(), shifts.begin(), shifts.end());if (shifts.empty()) {@@ -2161,9 +2145,7 @@ void Eltwise::appendPostOpsImpl(dnnl::post_ops& ops,} else if (shifts.size() == 1) {depthwiseData.resize(2 * channelSize, depthwiseData.back());} else if (shifts.size() != channelSize) {- OPENVINO_THROW("Appending Eltwise node with name '",- getName(),- "' failed due to shifts data size inconsistency");+ THROW_CPU_NODE_ERR("Appending node has failed due to shifts data size inconsistency");}depthwiseDataSize = 2 * channelSize;diff --git a/src/plugins/intel_cpu/src/nodes/embedding_bag_offsets.cpp b/src/plugins/intel_cpu/src/nodes/embedding_bag_offsets.cppindex f76bbef120a..4c84cb4ff5f 100644--- a/src/plugins/intel_cpu/src/nodes/embedding_bag_offsets.cpp+++ b/src/plugins/intel_cpu/src/nodes/embedding_bag_offsets.cpp@@ -54,11 +54,11 @@ EmbeddingBagOffset::EmbeddingBagOffset(const std::shared_ptr<ov::Node>& op, cons}}if (getInputShapeAtPort(INDICES_IDX).getRank() != 1ul) {- OPENVINO_THROW("'", _layerName, "' layer has indices data with invalid rank.");+ THROW_CPU_NODE_ERR("has indices data with invalid rank.");}if (getInputShapeAtPort(OFFSETS_IDX).getRank() != 1ul) {- OPENVINO_THROW("'", _layerName, "' layer's offsets data has invalid rank.");+ THROW_CPU_NODE_ERR("offsets data has invalid rank.");}}@@ -67,7 +67,6 @@ void EmbeddingBagOffset::initSupportedPrimitiveDescriptors() {return;}- std::string logPrefix = std::string("Layer EmbeddingBag with name '") + _layerName + "' ";static const std::set<ov::element::Type> supportedPrecisions = {ov::element::f32,ov::element::i8,ov::element::u8,@@ -79,7 +78,7 @@ void EmbeddingBagOffset::initSupportedPrimitiveDescriptors() {}if (!supportedPrecisions.empty()) {if (supportedPrecisions.find(inDataPrecision) == supportedPrecisions.end()) {- OPENVINO_THROW(logPrefix, "has unsupported precision: ", inDataPrecision.get_type_name());+ THROW_CPU_NODE_ERR("has unsupported precision: ", inDataPrecision.get_type_name());}} else {static const std::set<ov::element::Type> defaultSupportedPrecisions = {ov::element::f32,@@ -87,7 +86,7 @@ void EmbeddingBagOffset::initSupportedPrimitiveDescriptors() {ov::element::u8,ov::element::i32};if (defaultSupportedPrecisions.find(inDataPrecision) == defaultSupportedPrecisions.end()) {- OPENVINO_THROW(logPrefix, "has unsupported precision: ", inDataPrecision.get_type_name());+ THROW_CPU_NODE_ERR("has unsupported precision: ", inDataPrecision.get_type_name());}}@@ -125,10 +124,10 @@ void EmbeddingBagOffset::getIndices(size_t embIndex,int& weightsIdx,bool& withWeight) {if (static_cast<size_t>(embIndex) >= _offsetsLen) {- OPENVINO_THROW("Invalid embedding bag index.");+ THROW_CPU_NODE_ERR("Invalid embedding bag index.");}if (static_cast<size_t>(offsetsData_[embIndex]) >= _indicesLen) {- OPENVINO_THROW("Offset value exceeds indices size.");+ THROW_CPU_NODE_ERR("Offset value exceeds indices size.");}indices = nullptr;diff --git a/src/plugins/intel_cpu/src/nodes/embedding_bag_packed.cpp b/src/plugins/intel_cpu/src/nodes/embedding_bag_packed.cppindex 21650ad3e63..2becb7e2635 100644--- a/src/plugins/intel_cpu/src/nodes/embedding_bag_packed.cpp+++ b/src/plugins/intel_cpu/src/nodes/embedding_bag_packed.cpp@@ -54,7 +54,7 @@ EmbeddingBagPacked::EmbeddingBagPacked(const std::shared_ptr<ov::Node>& op, cons}}if (getInputShapeAtPort(INDICES_IDX).getRank() != 2ul) {- OPENVINO_THROW("'", _layerName, "' layer has indices data with invalid rank.");+ THROW_CPU_NODE_ERR("has indices data with invalid rank.");}}@@ -63,7 +63,6 @@ void EmbeddingBagPacked::initSupportedPrimitiveDescriptors() {return;}- std::string logPrefix = std::string("Layer EmbeddingBag with name '") + _layerName + "' ";static const std::set<ov::element::Type> supportedPrecisions = {ov::element::f32,ov::element::i8,ov::element::u8,@@ -75,7 +74,7 @@ void EmbeddingBagPacked::initSupportedPrimitiveDescriptors() {}if (!supportedPrecisions.empty()) {if (supportedPrecisions.find(inDataPrecision) == supportedPrecisions.end()) {- OPENVINO_THROW(logPrefix, "has unsupported precision: ", inDataPrecision.get_type_name());+ THROW_CPU_NODE_ERR("has unsupported precision: ", inDataPrecision.get_type_name());}} else {static const std::set<ov::element::Type> defaultSupportedPrecisions = {ov::element::f32,@@ -83,7 +82,7 @@ void EmbeddingBagPacked::initSupportedPrimitiveDescriptors() {ov::element::u8,ov::element::i32};if (defaultSupportedPrecisions.find(inDataPrecision) == defaultSupportedPrecisions.end()) {- OPENVINO_THROW(logPrefix, "has unsupported precision: ", inDataPrecision.get_type_name());+ THROW_CPU_NODE_ERR("has unsupported precision: ", inDataPrecision.get_type_name());}}@@ -112,7 +111,7 @@ void EmbeddingBagPacked::getIndices(size_t embIndex,int& weightsIdx,bool& withWeight) {if (static_cast<size_t>(embIndex) >= _batch * _indicesPerBag) {- OPENVINO_THROW("Invalid embedding bag index.");+ THROW_CPU_NODE_ERR("Invalid embedding bag index.");}withWeight = true;diff --git a/src/plugins/intel_cpu/src/nodes/embedding_segments_sum.cpp b/src/plugins/intel_cpu/src/nodes/embedding_segments_sum.cppindex 6339bff1f56..c53fd25b038 100644--- a/src/plugins/intel_cpu/src/nodes/embedding_segments_sum.cpp+++ b/src/plugins/intel_cpu/src/nodes/embedding_segments_sum.cpp@@ -36,13 +36,12 @@ EmbeddingSegmentsSum::EmbeddingSegmentsSum(const std::shared_ptr<ov::Node>& op,OPENVINO_THROW_NOT_IMPLEMENTED(errorMessage);}_reduction = Reduction::SUM;- std::string errPrefix = std::string("EmbeddingSegmentsSum layer with name '") + _layerName + "' ";if (getInputShapeAtPort(INDICES_IDX).getRank() != 1ul) {- OPENVINO_THROW(errPrefix, "has indices data with invalid rank: ", getInputShapeAtPort(INDICES_IDX).getRank());+ THROW_CPU_NODE_ERR("has indices data with invalid rank: ", getInputShapeAtPort(INDICES_IDX).getRank());}if (getInputShapeAtPort(SEGMENT_ID_IDX).getRank() != 1ul) {- OPENVINO_THROW(errPrefix, "has invalid segmentID data rank: ", getInputShapeAtPort(SEGMENT_ID_IDX).getRank());+ THROW_CPU_NODE_ERR("has invalid segmentID data rank: ", getInputShapeAtPort(SEGMENT_ID_IDX).getRank());}}@@ -51,7 +50,6 @@ void EmbeddingSegmentsSum::initSupportedPrimitiveDescriptors() {return;}- std::string logPrefix = std::string("Layer EmbeddingBag with name '") + _layerName + "' ";static const std::set<ov::element::Type> supportedPrecisions = {ov::element::f32,ov::element::i8,ov::element::u8,@@ -63,7 +61,7 @@ void EmbeddingSegmentsSum::initSupportedPrimitiveDescriptors() {}if (!supportedPrecisions.empty()) {if (supportedPrecisions.find(inDataPrecision) == supportedPrecisions.end()) {- OPENVINO_THROW(logPrefix, "has unsupported precision: ", inDataPrecision.get_type_name());+ THROW_CPU_NODE_ERR("has unsupported precision: ", inDataPrecision.get_type_name());}} else {static const std::set<ov::element::Type> defaultSupportedPrecisions = {ov::element::f32,@@ -71,7 +69,7 @@ void EmbeddingSegmentsSum::initSupportedPrimitiveDescriptors() {ov::element::u8,ov::element::i32};if (defaultSupportedPrecisions.find(inDataPrecision) == defaultSupportedPrecisions.end()) {- OPENVINO_THROW(logPrefix, "has unsupported precision: ", inDataPrecision.get_type_name());+ THROW_CPU_NODE_ERR("has unsupported precision: ", inDataPrecision.get_type_name());}}@@ -111,7 +109,7 @@ void EmbeddingSegmentsSum::getIndices(size_t embIndex,int& weightsIdx,bool& withWeight) {if (embIndex >= static_cast<size_t>(lastNumSegments_)) {- OPENVINO_THROW("Invalid embedding bag index.");+ THROW_CPU_NODE_ERR("Invalid embedding bag index.");}indices = nullptr;diff --git a/src/plugins/intel_cpu/src/nodes/experimental_detectron_generate_proposals_single_image.cpp b/src/plugins/intel_cpu/src/nodes/experimental_detectron_generate_proposals_single_image.cppindex a648b80250f..e61a7243dd7 100644--- a/src/plugins/intel_cpu/src/nodes/experimental_detectron_generate_proposals_single_image.cpp+++ b/src/plugins/intel_cpu/src/nodes/experimental_detectron_generate_proposals_single_image.cpp@@ -343,7 +343,7 @@ void ExperimentalDetectronGenerateProposalsSingleImage::initSupportedPrimitiveDevoid ExperimentalDetectronGenerateProposalsSingleImage::execute(const dnnl::stream& strm) {try {if (inputShapes.size() != 4 || outputShapes.size() != 2) {- OPENVINO_THROW("Incorrect number of input or output edges!");+ THROW_CPU_NODE_ERR("Incorrect number of input or output edges!");}size_t anchor_dims_size = 1;@@ -358,7 +358,7 @@ void ExperimentalDetectronGenerateProposalsSingleImage::execute(const dnnl::stredeltas_dims_size *= deltaDims[i];}if (anchor_dims_size != deltas_dims_size) {- OPENVINO_THROW("'Anchors' blob size for ONNXProposal is incompatible with 'deltas' blob size!");+ THROW_CPU_NODE_ERR("'Anchors' blob size for ONNXProposal is incompatible with 'deltas' blob size!");}size_t score_dims_size = 1;@@ -367,7 +367,7 @@ void ExperimentalDetectronGenerateProposalsSingleImage::execute(const dnnl::strescore_dims_size *= scoreDims[i];}if (deltas_dims_size != (4 * score_dims_size)) {- OPENVINO_THROW("'Deltas' blob size for ONNXProposal is incompatible with 'scores' blob size!");+ THROW_CPU_NODE_ERR("'Deltas' blob size for ONNXProposal is incompatible with 'scores' blob size!");}// Prepare memory@@ -461,8 +461,7 @@ void ExperimentalDetectronGenerateProposalsSingleImage::execute(const dnnl::strepost_nms_topn_);}} catch (const std::exception& e) {- std::string errorMsg = e.what();- OPENVINO_THROW(errorMsg);+ THROW_CPU_NODE_ERR(e.what());}}diff --git a/src/plugins/intel_cpu/src/nodes/experimental_detectron_topkrois.cpp b/src/plugins/intel_cpu/src/nodes/experimental_detectron_topkrois.cppindex b9ae3ba31ca..043af38909f 100644--- a/src/plugins/intel_cpu/src/nodes/experimental_detectron_topkrois.cpp+++ b/src/plugins/intel_cpu/src/nodes/experimental_detectron_topkrois.cpp@@ -40,9 +40,7 @@ ExperimentalDetectronTopKROIs::ExperimentalDetectronTopKROIs(const std::shared_pconst auto topKROI = ov::as_type_ptr<const ov::opset6::ExperimentalDetectronTopKROIs>(op);if (topKROI == nullptr) {- OPENVINO_THROW("Operation with name '",- op->get_friendly_name(),- "' is not an instance of ExperimentalDetectronTopKROIs from opset6.");+ THROW_CPU_NODE_ERR("is not an instance of ExperimentalDetectronTopKROIs from opset6.");}if (inputShapes.size() != 2 || outputShapes.size() != 1) {diff --git a/src/plugins/intel_cpu/src/nodes/extract_image_patches.cpp b/src/plugins/intel_cpu/src/nodes/extract_image_patches.cppindex 0038fc467de..8193b26077f 100644--- a/src/plugins/intel_cpu/src/nodes/extract_image_patches.cpp+++ b/src/plugins/intel_cpu/src/nodes/extract_image_patches.cpp@@ -407,13 +407,13 @@ void ExtractImagePatches::prepareParams() {const auto& srcMemPtr0 = getSrcMemoryAtPort(0);const auto& dstMemPtr = getDstMemoryAtPort(0);if (!srcMemPtr0 || !srcMemPtr0->isDefined()) {- OPENVINO_THROW("Input memory is undefined.");+ THROW_CPU_NODE_ERR("Input memory is undefined.");}if (!dstMemPtr || !dstMemPtr->isDefined()) {- OPENVINO_THROW("Destination memory is undefined.");+ THROW_CPU_NODE_ERR("Destination memory is undefined.");}if (getSelectedPrimitiveDescriptor() == nullptr) {- OPENVINO_THROW("Preferable primitive descriptor is not set.");+ THROW_CPU_NODE_ERR("Preferable primitive descriptor is not set.");}const auto& in_dims = getParentEdgeAt(0)->getMemory().getStaticDims();@@ -466,7 +466,7 @@ void ExtractImagePatches::execute(const dnnl::stream& strm) {const auto outStrides = getChildEdgeAt(0)->getMemory().getDescWithType<BlockedMemoryDesc>()->getStrides();execPtr->exec(src, dst, inStrides, outStrides);} else {- OPENVINO_THROW("Can't execute extract image patches node. Primitive wasn't created");+ THROW_CPU_NODE_ERR("Primitive wasn't created");}}diff --git a/src/plugins/intel_cpu/src/nodes/fake_quantize.cpp b/src/plugins/intel_cpu/src/nodes/fake_quantize.cppindex 23551606407..97e2bae11aa 100644--- a/src/plugins/intel_cpu/src/nodes/fake_quantize.cpp+++ b/src/plugins/intel_cpu/src/nodes/fake_quantize.cpp@@ -1327,13 +1327,7 @@ FakeQuantize::FakeQuantize(const std::shared_ptr<ov::Node>& op, const GraphConte#if defined(VALIDATE_QUANTIZATION_RANGES)if ((il == ih && levels != 2) || il > ih || std::isnan(il) || std::isnan(ih) || std::isinf(il) ||std::isinf(ih)) {- OPENVINO_THROW("Quantize layer with name '",- getName(),- "' has invalid input quantize ranges: ",- "inputLow = ",- il,- ", inputHigh = ",- ih);+ THROW_CPU_NODE_ERR("has invalid input quantize ranges: ", "inputLow = ", il, ", inputHigh = ", ih);}#endif#ifdef FQ_DOUBLE_PRECISION@@ -1351,13 +1345,7 @@ FakeQuantize::FakeQuantize(const std::shared_ptr<ov::Node>& op, const GraphConte#if defined(VALIDATE_QUANTIZATION_RANGES)if (std::isnan(ol) || std::isnan(oh) || std::isinf(ol) || std::isinf(oh)) {- OPENVINO_THROW("Quantize layer with name '",- getName(),- "' has wrong output quantize ranges: ",- "outputLow = ",- ol,- ", outputHigh = ",- oh);+ THROW_CPU_NODE_ERR("has wrong output quantize ranges: ", "outputLow = ", ol, ", outputHigh = ", oh);}#endif#ifdef FQ_DOUBLE_PRECISION@@ -1553,7 +1541,7 @@ bool FakeQuantize::needPrepareParams() const {if (isBinarization()) {auto selectedPrimitiveDescriptor = getSelectedPrimitiveDescriptor();if (!selectedPrimitiveDescriptor) {- OPENVINO_THROW("CPU quantize node with name '", getName(), "' doesn't have primitive descriptors.");+ THROW_CPU_NODE_ERR("doesn't have primitive descriptors.");}if (internalBlobMemory.empty() ||@@ -1630,7 +1618,7 @@ void FakeQuantize::createPrimitive() {Node::createPrimitive();auto selectedPrimitiveDescriptor = getSelectedPrimitiveDescriptor();if (!selectedPrimitiveDescriptor) {- OPENVINO_THROW("CPU quantize node with name '", getName(), "' doesn't have primitive descriptors.");+ THROW_CPU_NODE_ERR("doesn't have primitive descriptors.");}if (selectedPrimitiveDescriptor->getImplementationType() != impl_desc_type::ref) {const auto& config = getSelectedPrimitiveDescriptor()->getConfig();diff --git a/src/plugins/intel_cpu/src/nodes/gather.cpp b/src/plugins/intel_cpu/src/nodes/gather.cppindex fa763805e9c..666616c9c5a 100644--- a/src/plugins/intel_cpu/src/nodes/gather.cpp+++ b/src/plugins/intel_cpu/src/nodes/gather.cpp@@ -961,7 +961,7 @@ void Gather::resolveInPlaceEdges(Edge::LOOK look) {auto selected_pd = getSelectedPrimitiveDescriptor();if (selected_pd == nullptr) {- OPENVINO_THROW("Preferable primitive descriptor is not set.");+ THROW_CPU_NODE_ERR("Preferable primitive descriptor is not set.");}constexpr size_t outputPort = 0;diff --git a/src/plugins/intel_cpu/src/nodes/gather_elements.cpp b/src/plugins/intel_cpu/src/nodes/gather_elements.cppindex 7c282ef863a..f475925a5b4 100644--- a/src/plugins/intel_cpu/src/nodes/gather_elements.cpp+++ b/src/plugins/intel_cpu/src/nodes/gather_elements.cpp@@ -147,7 +147,7 @@ void GatherElements::execute(const dnnl::stream& strm) {case sizeof(element_type_traits<ov::element::i8>::value_type):return directExecution<element_type_traits<ov::element::i8>::value_type>();default:- OPENVINO_THROW("Unsupported data type size");+ THROW_CPU_NODE_ERR("Unsupported data type size");}}diff --git a/src/plugins/intel_cpu/src/nodes/generate_proposals.cpp b/src/plugins/intel_cpu/src/nodes/generate_proposals.cppindex c7e4466f881..82981d9e0bb 100644--- a/src/plugins/intel_cpu/src/nodes/generate_proposals.cpp+++ b/src/plugins/intel_cpu/src/nodes/generate_proposals.cpp@@ -349,7 +349,7 @@ void GenerateProposals::executeDynamicImpl(const dnnl::stream& strm) {void GenerateProposals::execute(const dnnl::stream& strm) {try {if (inputShapes.size() != 4 || outputShapes.size() != 3) {- OPENVINO_THROW("Incorrect number of input or output edges!");+ THROW_CPU_NODE_ERR("Incorrect number of input or output edges!");}size_t anchor_dims_size = 1;@@ -364,7 +364,7 @@ void GenerateProposals::execute(const dnnl::stream& strm) {deltas_dims_size *= deltaDims[i];}if (anchor_dims_size != deltas_dims_size) {- OPENVINO_THROW("'Anchors' blob size for GenerateProposals is incompatible with 'deltas' blob size!");+ THROW_CPU_NODE_ERR("'Anchors' blob size for GenerateProposals is incompatible with 'deltas' blob size!");}size_t score_dims_size = 1;@@ -373,7 +373,7 @@ void GenerateProposals::execute(const dnnl::stream& strm) {score_dims_size *= scoreDims[i];}if (deltas_dims_size != (4 * score_dims_size)) {- OPENVINO_THROW("'Deltas' blob size for GenerateProposals is incompatible with 'scores' blob size!");+ THROW_CPU_NODE_ERR("'Deltas' blob size for GenerateProposals is incompatible with 'scores' blob size!");}size_t im_info_dims_size = 1;@@ -504,8 +504,7 @@ void GenerateProposals::execute(const dnnl::stream& strm) {memcpy(p_roi_score_item, &score_item[0], score_item.size() * sizeof(float));memcpy(p_roi_num_item, &roi_num[0], getDstMemoryAtPort(OUTPUT_ROI_NUM)->getSize());} catch (const std::exception& e) {- std::string errorMsg = e.what();- OPENVINO_THROW(errorMsg);+ THROW_CPU_NODE_ERR(e.what());}}diff --git a/src/plugins/intel_cpu/src/nodes/grid_sample.cpp b/src/plugins/intel_cpu/src/nodes/grid_sample.cppindex 46732779df8..aeca249f3a7 100644--- a/src/plugins/intel_cpu/src/nodes/grid_sample.cpp+++ b/src/plugins/intel_cpu/src/nodes/grid_sample.cpp@@ -41,7 +41,7 @@ GridSample::GridSample(const std::shared_ptr<ov::Node>& op, const GraphContext::: Node(op, context, NgraphShapeInferFactory(op)) {std::string errorMessage;if (!isSupportedOperation(op, errorMessage)) {- THROW_CPU_NODE_ERR(errorMessage);+ OPENVINO_THROW_NOT_IMPLEMENTED(errorMessage);}if (op->get_input_size() != 2 || op->get_output_size() != 1) {diff --git a/src/plugins/intel_cpu/src/nodes/if.cpp b/src/plugins/intel_cpu/src/nodes/if.cppindex 6793aebc4bb..3a41f6431ce 100644--- a/src/plugins/intel_cpu/src/nodes/if.cpp+++ b/src/plugins/intel_cpu/src/nodes/if.cpp@@ -92,10 +92,7 @@ void If::getSupportedDescriptors() {if (auto inNode = subGraphThen.getInputNodeByIndex(ifOp->get_then_body()->get_parameter_index(param))) {inputMemThen.push_back(getToMemories(inNode.get(), 0));} else {- OPENVINO_THROW("Then body of node If with name ",- getName(),- " does not have input with name: ",- param->get_friendly_name());+ THROW_CPU_NODE_ERR("Then body of node does not have input with name: ", param->get_friendly_name());}}@@ -103,10 +100,7 @@ void If::getSupportedDescriptors() {if (auto inNode = subGraphElse.getInputNodeByIndex(ifOp->get_else_body()->get_parameter_index(param))) {inputMemElse.push_back(getToMemories(inNode.get(), 0));} else {- OPENVINO_THROW("Else body of node If with name ",- getName(),- " does not have input with name: ",- param->get_friendly_name());+ THROW_CPU_NODE_ERR("Else body of node does not have input with name: ", param->get_friendly_name());}}@@ -115,10 +109,7 @@ void If::getSupportedDescriptors() {auto outMem = outNode->getSrcMemoryAtPort(0);outputMemThen.push_back(outMem);} else {- OPENVINO_THROW("Then body of node If with name ",- getName(),- " does not have output with name: ",- out->get_friendly_name());+ THROW_CPU_NODE_ERR("Then body of node does not have output with name: ", out->get_friendly_name());}}@@ -127,10 +118,7 @@ void If::getSupportedDescriptors() {auto outMem = outNode->getSrcMemoryAtPort(0);outputMemElse.push_back(outMem);} else {- OPENVINO_THROW("Else body of node If with name ",- getName(),- " does not have output with name: ",- out->get_friendly_name());+ THROW_CPU_NODE_ERR("Else body of node does not have output with name: ", out->get_friendly_name());}}diff --git a/src/plugins/intel_cpu/src/nodes/interpolate.cpp b/src/plugins/intel_cpu/src/nodes/interpolate.cppindex 67fe9022676..72dece52591 100644--- a/src/plugins/intel_cpu/src/nodes/interpolate.cpp+++ b/src/plugins/intel_cpu/src/nodes/interpolate.cpp@@ -2398,9 +2398,7 @@ inline int Interpolate::get_axis_id() const {void Interpolate::prepareParams() {if (!shapesDefined()) {- OPENVINO_THROW("Can't prepare params for Interpolate node with name: ",- getName(),- ", because input/output dims aren't defined");+ THROW_CPU_NODE_ERR("input/output dims aren't defined");}auto dstMemPtr = getDstMemoryAtPort(0);@@ -2467,7 +2465,7 @@ void Interpolate::prepareParams() {std::vector<float> dataScales =getScales(getPaddedInputShape(srcDims, interpAttrs.padBegin, interpAttrs.padEnd), dstDims);if (!NCHWAsNHWC && (getOutputShapeAtPort(0).getRank() > 2 && (dataScales[0] != 1.f || dataScales[1] != 1.f))) {- OPENVINO_THROW("Interpolate layer only supports resize on spatial dimensions(depth, height and width)");+ THROW_CPU_NODE_ERR("only supports resize on spatial dimensions(depth, height and width)");}if (canUseAclExecutor) {@@ -2581,11 +2579,11 @@ void Interpolate::setPostOps(dnnl::primitive_attr& attr, const VectorDims& dims)continue;}- OPENVINO_THROW("Fusing of ",- NameFromType(node->getType()),- " operation to ",- NameFromType(this->getType()),- " node is not implemented");+ THROW_CPU_NODE_ERR("Fusing of ",+ NameFromType(node->getType()),+ " operation to ",+ NameFromType(this->getType()),+ " node is not implemented");}attr.set_post_ops(ops);@@ -2692,9 +2690,7 @@ void Interpolate::execute(const dnnl::stream& strm) {srcPadded.resize(eltsTotal * srcDataSize, 0x0);uint8_t* src_data_pad = static_cast<uint8_t*>(&srcPadded[0]);if ((srcDim5d[0] != srcDimPad5d[0]) || (srcDim5d[1] != srcDimPad5d[1])) {- OPENVINO_THROW("Interpolate layer with name '",- getName(),- "' does not support padding on batch and channel dimensions");+ THROW_CPU_NODE_ERR("does not support padding on batch and channel dimensions");}parallel_for5d(srcDim5d[0],CB,@@ -2728,7 +2724,7 @@ void Interpolate::execute(const dnnl::stream& strm) {} else if (aclExecPtr) {aclExecPtr->exec({srcMemPtr}, {dstMemPtr}, postOpsDataPtrs.data());} else {- OPENVINO_THROW("Can't execute Interpolate node. Primitive didn't created");+ THROW_CPU_NODE_ERR("Primitive wasn't created");}}diff --git a/src/plugins/intel_cpu/src/nodes/inverse.cpp b/src/plugins/intel_cpu/src/nodes/inverse.cppindex 25f54cb5283..751a55add5d 100644--- a/src/plugins/intel_cpu/src/nodes/inverse.cpp+++ b/src/plugins/intel_cpu/src/nodes/inverse.cpp@@ -19,7 +19,7 @@ Inverse::Inverse(const std::shared_ptr<ov::Node>& op, const GraphContext::CPtr&: Node(op, context, NgraphShapeInferFactory(op)) {std::string errorMessage;if (!isSupportedOperation(op, errorMessage)) {- THROW_CPU_NODE_ERR(errorMessage);+ OPENVINO_THROW_NOT_IMPLEMENTED(errorMessage);}auto inverse_op = as_type_ptr<op::v14::Inverse>(op);diff --git a/src/plugins/intel_cpu/src/nodes/llm_mlp.cpp b/src/plugins/intel_cpu/src/nodes/llm_mlp.cppindex 1fc77f2ecd6..73425c58b65 100644--- a/src/plugins/intel_cpu/src/nodes/llm_mlp.cpp+++ b/src/plugins/intel_cpu/src/nodes/llm_mlp.cpp@@ -504,7 +504,7 @@ LLMMLP::LLMMLP(const std::shared_ptr<ov::Node>& op, const GraphContext::CPtr& costd::string errorMessage;const auto& config = context->getConfig();if (!isSupportedOperation(op, errorMessage, config.fcDynamicQuantizationGroupSize)) {- OPENVINO_THROW("CPU: " + errorMessage);+ OPENVINO_THROW_NOT_IMPLEMENTED(errorMessage);}const auto node_mlp = ov::as_type_ptr<const LLMMLPNode>(op);m_mlp_config = node_mlp->get_config();@@ -590,7 +590,7 @@ void LLMMLP::createPrimitive() {}#endifif (!m_executor) {- OPENVINO_THROW("LLMMLP Executor creation fails with precision " + rtPrecision.to_string());+ THROW_CPU_NODE_ERR("Executor creation fails with precision " + rtPrecision.to_string());}}diff --git a/src/plugins/intel_cpu/src/nodes/log_softmax.cpp b/src/plugins/intel_cpu/src/nodes/log_softmax.cppindex 018e8049aa4..e94bacd42ab 100644--- a/src/plugins/intel_cpu/src/nodes/log_softmax.cpp+++ b/src/plugins/intel_cpu/src/nodes/log_softmax.cpp@@ -35,9 +35,7 @@ LogSoftmax::LogSoftmax(const std::shared_ptr<ov::Node>& op, const GraphContext::const auto logSoftMax = ov::as_type_ptr<const ov::opset5::LogSoftmax>(op);if (logSoftMax == nullptr) {- OPENVINO_THROW("Operation with name '",- op->get_friendly_name(),- "' is not an instance of LogSoftmax from opset5.");+ THROW_CPU_NODE_ERR("is not an instance of LogSoftmax from opset5.");}if (inputShapes.size() != 1 || outputShapes.size() != 1) {diff --git a/src/plugins/intel_cpu/src/nodes/lrn.cpp b/src/plugins/intel_cpu/src/nodes/lrn.cppindex ce13c03d8ef..ba7e16af8d0 100644--- a/src/plugins/intel_cpu/src/nodes/lrn.cpp+++ b/src/plugins/intel_cpu/src/nodes/lrn.cpp@@ -212,7 +212,7 @@ void Lrn::prepareParams() {auto result = cache->getOrCreate(key, builder);execPtr = result.first;if (!execPtr) {- OPENVINO_THROW("Primitive descriptor was not found for node ", getName(), ".");+ THROW_CPU_NODE_ERR("Primitive descriptor was not found.");}auto scratchpadMem = getScratchPadMem(execPtr->getScratchPadDesc());diff --git a/src/plugins/intel_cpu/src/nodes/mathematics.cpp b/src/plugins/intel_cpu/src/nodes/mathematics.cppindex 23f4511154c..8bcacd36502 100644--- a/src/plugins/intel_cpu/src/nodes/mathematics.cpp+++ b/src/plugins/intel_cpu/src/nodes/mathematics.cpp@@ -196,7 +196,7 @@ void Math::execute(const dnnl::stream& strm) {});break;default:- OPENVINO_THROW("Incorrect Reduce layer type");+ THROW_CPU_NODE_ERR("Incorrect Reduce layer type");}}diff --git a/src/plugins/intel_cpu/src/nodes/matmul.cpp b/src/plugins/intel_cpu/src/nodes/matmul.cppindex d7fe2c4d489..d60ab73ad06 100644--- a/src/plugins/intel_cpu/src/nodes/matmul.cpp+++ b/src/plugins/intel_cpu/src/nodes/matmul.cpp@@ -199,11 +199,11 @@ void MatMul::setPostOps(dnnl::primitive_attr& attr, const VectorDims& dims, boolcontinue;}- OPENVINO_THROW("Fusing of ",- NameFromType(node->getType()),- " operation to ",- NameFromType(this->getType()),- " node is not implemented");+ THROW_CPU_NODE_ERR("Fusing of ",+ NameFromType(node->getType()),+ " operation to ",+ NameFromType(this->getType()),+ " node is not implemented");}attr.set_post_ops(ops);diff --git a/src/plugins/intel_cpu/src/nodes/multinomial.cpp b/src/plugins/intel_cpu/src/nodes/multinomial.cppindex e7ed2d1b8e1..7802a847f27 100644--- a/src/plugins/intel_cpu/src/nodes/multinomial.cpp+++ b/src/plugins/intel_cpu/src/nodes/multinomial.cpp@@ -18,7 +18,7 @@ Multinomial::Multinomial(const std::shared_ptr<ov::Node>& op, const GraphContext: Node(op, context, NgraphShapeInferFactory(op)) {std::string errorMessage;if (!isSupportedOperation(op, errorMessage)) {- THROW_CPU_NODE_ERR(errorMessage);+ OPENVINO_THROW_NOT_IMPLEMENTED(errorMessage);}auto multinomial_op = as_type_ptr<op::v13::Multinomial>(op);diff --git a/src/plugins/intel_cpu/src/nodes/mvn.cpp b/src/plugins/intel_cpu/src/nodes/mvn.cppindex 7acaca20050..9cff2cbaa01 100644--- a/src/plugins/intel_cpu/src/nodes/mvn.cpp+++ b/src/plugins/intel_cpu/src/nodes/mvn.cpp@@ -2168,13 +2168,13 @@ void MVN::prepareParams() {auto dstMemPtr = getDstMemoryAtPort(0);auto srcMemPtr = getSrcMemoryAtPort(0);if (!dstMemPtr || !dstMemPtr->isDefined()) {- OPENVINO_THROW("Destination memory is undefined.");+ THROW_CPU_NODE_ERR("Destination memory is undefined.");}if (!srcMemPtr || !srcMemPtr->isDefined()) {- OPENVINO_THROW("Input memory is undefined.");+ THROW_CPU_NODE_ERR("Input memory is undefined.");}if (getSelectedPrimitiveDescriptor() == nullptr) {- OPENVINO_THROW("Preferable primitive descriptor is not set.");+ THROW_CPU_NODE_ERR("Preferable primitive descriptor is not set.");}const VectorDims in_dims = srcMemPtr->getStaticDims();@@ -2275,7 +2275,7 @@ void MVN::transformTo5DCase(const VectorDims& shape) {break;}default: {- OPENVINO_THROW("MVN layer with name '", getName(), "' doesn't support planar layout with rank: ", shape.size());+ THROW_CPU_NODE_ERR("doesn't support planar layout with rank: ", shape.size());}}}@@ -2295,11 +2295,11 @@ void MVN::setPostOps(dnnl::primitive_attr& attr, bool initWeights) {eltwiseNode->appendPostOps(ops, shape5D, postOpsDataPtrs);continue;}- OPENVINO_THROW("Fusing of ",- NameFromType(node->getType()),- " operation to ",- NameFromType(this->getType()),- " node is not implemented");+ THROW_CPU_NODE_ERR("Fusing of ",+ NameFromType(node->getType()),+ " operation to ",+ NameFromType(this->getType()),+ " node is not implemented");}attr.set_post_ops(ops);}@@ -2319,7 +2319,7 @@ void MVN::execute(const dnnl::stream& strm) {} else if (aclExecPtr) {aclExecPtr->exec({srcMemPtr}, {dstMemPtr}, postOpsDataPtrs.data());} else {- OPENVINO_THROW("Can't execute Interpolate node. Primitive didn't created");+ THROW_CPU_NODE_ERR("Primitive wasn't created");}}diff --git a/src/plugins/intel_cpu/src/nodes/ngram.cpp b/src/plugins/intel_cpu/src/nodes/ngram.cppindex 9e8d647a694..0646e71d378 100644--- a/src/plugins/intel_cpu/src/nodes/ngram.cpp+++ b/src/plugins/intel_cpu/src/nodes/ngram.cpp@@ -109,7 +109,7 @@ void Ngram::execute(const dnnl::stream& strm) {} else if (idcesPrecision == ov::element::i64) {batchLenghts = computeBatchLenghts<std::int64_t>();} else {- OPENVINO_THROW("Unsupported idces precision: ", idcesPrecision);+ THROW_CPU_NODE_ERR("Unsupported indices precision: ", idcesPrecision);}/* The following procedure applied to each batch:diff --git a/src/plugins/intel_cpu/src/nodes/non_max_suppression.cpp b/src/plugins/intel_cpu/src/nodes/non_max_suppression.cppindex a34538fc24a..4af902f26e4 100644--- a/src/plugins/intel_cpu/src/nodes/non_max_suppression.cpp+++ b/src/plugins/intel_cpu/src/nodes/non_max_suppression.cpp@@ -54,7 +54,7 @@ NonMaxSuppression::NonMaxSuppression(const std::shared_ptr<ov::Node>& op, constm_is_soft_suppressed_by_iou(false) {std::string errorMessage;if (!isSupportedOperation(op, errorMessage)) {- OPENVINO_THROW(errorMessage);+ OPENVINO_THROW_NOT_IMPLEMENTED(errorMessage);}if (one_of(op->get_type_info(), op::internal::NonMaxSuppressionIEInternal::get_type_info_static())) {diff --git a/src/plugins/intel_cpu/src/nodes/non_zero.cpp b/src/plugins/intel_cpu/src/nodes/non_zero.cppindex f68b3a0c2cf..9a323c11be6 100644--- a/src/plugins/intel_cpu/src/nodes/non_zero.cpp+++ b/src/plugins/intel_cpu/src/nodes/non_zero.cpp@@ -66,11 +66,7 @@ void NonZero::initSupportedPrimitiveDescriptors() {ov::element::u32,ov::element::i8,ov::element::u8)) {- OPENVINO_THROW("Can't create primitive descriptor for NonZero layer with name: ",- getName(),- " doesn't support ",- inPrc.get_type_name(),- " precision on 0 port");+ THROW_CPU_NODE_ERR("doesn't support ", inPrc.get_type_name(), " precision on 0 port");}addSupportedPrimDesc({{LayoutType::ncsp}}, {{LayoutType::ncsp, ov::element::i32}}, impl_desc_type::ref);diff --git a/src/plugins/intel_cpu/src/nodes/normalize.cpp b/src/plugins/intel_cpu/src/nodes/normalize.cppindex c82a1bccebe..689eb757c90 100644--- a/src/plugins/intel_cpu/src/nodes/normalize.cpp+++ b/src/plugins/intel_cpu/src/nodes/normalize.cpp@@ -917,11 +917,11 @@ void NormalizeL2::setPostOps(dnnl::primitive_attr& kernel_attrs, const VectorDimcontinue;}- OPENVINO_THROW("Fusing of ",- NameFromType(node->getType()),- " operation to ",- NameFromType(this->getType()),- " node is not implemented");+ THROW_CPU_NODE_ERR("Fusing of ",+ NameFromType(node->getType()),+ " operation to ",+ NameFromType(this->getType()),+ " node is not implemented");}kernel_attrs.set_post_ops(ops);@@ -981,7 +981,7 @@ void NormalizeL2::prepareParams() {auto result = cache->getOrCreate(key, builder);if (!result.first) {- OPENVINO_THROW("Primitive descriptor was not found for node ", getName(), ".");+ THROW_CPU_NODE_ERR("Primitive descriptor was not found.");}execPtr = result.first;diff --git a/src/plugins/intel_cpu/src/nodes/paged_attn.cpp b/src/plugins/intel_cpu/src/nodes/paged_attn.cppindex 61277dd4dfc..30a7439f0c9 100644--- a/src/plugins/intel_cpu/src/nodes/paged_attn.cpp+++ b/src/plugins/intel_cpu/src/nodes/paged_attn.cpp@@ -56,7 +56,7 @@ PagedAttention::PagedAttention(const std::shared_ptr<ov::Node>& op, const GraphC: Node(op, context, InternalDynShapeInferFactory()) {std::string errorMessage;if (!isSupportedOperation(op, errorMessage)) {- OPENVINO_THROW("CPU: " + errorMessage);+ OPENVINO_THROW_NOT_IMPLEMENTED(errorMessage);}// output score may have no childm_hasScore = !op->get_output_target_inputs(1).empty();@@ -176,7 +176,7 @@ void PagedAttention::createPrimitive() {auto cache = context->getParamsCache();auto result = cache->getOrCreate(key, builder);if (!result.first) {- OPENVINO_THROW("PagedAttention AttentionExecutor creation fails with precision " + rtPrecision.to_string());+ THROW_CPU_NODE_ERR("AttentionExecutor creation fails with precision " + rtPrecision.to_string());}m_executor = result.first;}diff --git a/src/plugins/intel_cpu/src/nodes/pooling.cpp b/src/plugins/intel_cpu/src/nodes/pooling.cppindex bff8d1193a1..a7e128e449f 100644--- a/src/plugins/intel_cpu/src/nodes/pooling.cpp+++ b/src/plugins/intel_cpu/src/nodes/pooling.cpp@@ -275,10 +275,10 @@ void Pooling::getSupportedDescriptors() {}if (getParentEdges().size() != 1) {- OPENVINO_THROW("Incorrect number of input edges for layer ", getName());+ THROW_CPU_NODE_ERR("Incorrect number of input edges");}if (getChildEdges().empty()) {- OPENVINO_THROW("Incorrect number of output edges for layer ", getName());+ THROW_CPU_NODE_ERR("Incorrect number of output edges");}ov::element::Type inputPrecision = getOriginalInputPrecisionAtPort(0);@@ -362,7 +362,7 @@ void Pooling::getSupportedDescriptors() {auto outputDataType = DnnlExtensionUtils::ElementTypeToDataType(outputPrecision);if ((inputRank < 3) || (inputRank > 5)) {- OPENVINO_THROW("Pooling layer. Unsupported mode. Only 3D, 4D and 5D blobs are supported as input.");+ THROW_CPU_NODE_ERR("Unsupported mode. Only 3D, 4D and 5D blobs are supported as input.");}initEffectiveAttributes(inShape, MemoryDescUtils::makeDummyShape(childShape));@@ -414,7 +414,7 @@ void Pooling::getSupportedDescriptors() {void Pooling::prepareParams() {auto selected_pd = getSelectedPrimitiveDescriptor();if (selected_pd == nullptr) {- OPENVINO_THROW("Pooling node with name '", getName(), "' did not set preferable primitive descriptor");+ THROW_CPU_NODE_ERR("did not set preferable primitive descriptor");}AttrPtr attr;@@ -436,10 +436,10 @@ void Pooling::prepareParams() {auto dstMemPtr = getDstMemoryAtPort(0);auto srcMemPtr = getSrcMemoryAtPort(0);if (!dstMemPtr || !dstMemPtr->isDefined()) {- OPENVINO_THROW("Destination memory is undefined.");+ THROW_CPU_NODE_ERR("Destination memory is undefined.");}if (!srcMemPtr || !srcMemPtr->isDefined()) {- OPENVINO_THROW("Input memory is undefined.");+ THROW_CPU_NODE_ERR("Input memory is undefined.");}std::vector<MemoryDescPtr> srcMemoryDescs;@@ -507,7 +507,7 @@ void Pooling::prepareParams() {dnnlExecPtr = result.first;if (!dnnlExecPtr) {- OPENVINO_THROW("Primitive descriptor was not found for node ", getName(), ".");+ THROW_CPU_NODE_ERR("Primitive descriptor was not found.");}auto scratchpadMem = getScratchPadMem(dnnlExecPtr->getScratchPadDesc());@@ -539,7 +539,7 @@ void Pooling::execute(const dnnl::stream& strm) {execPtr->exec(srcMemory, dstMemory, postOpsArgs);} else {- OPENVINO_THROW("Pooling node with name '", getName(), "' doesn't have an initialized executor");+ THROW_CPU_NODE_ERR("doesn't have an initialized executor");}}@@ -765,11 +765,11 @@ void Pooling::setPostOps(dnnl::primitive_attr& attr) {continue;}- OPENVINO_THROW("Fusing of ",- NameFromType(node->getType()),- " operation to ",- NameFromType(this->getType()),- " node is not implemented");+ THROW_CPU_NODE_ERR("Fusing of ",+ NameFromType(node->getType()),+ " operation to ",+ NameFromType(this->getType()),+ " node is not implemented");}attr.set_post_ops(ops);diff --git a/src/plugins/intel_cpu/src/nodes/proposal.cpp b/src/plugins/intel_cpu/src/nodes/proposal.cppindex e049e0e33ba..79b79a46a05 100644--- a/src/plugins/intel_cpu/src/nodes/proposal.cpp+++ b/src/plugins/intel_cpu/src/nodes/proposal.cpp@@ -179,14 +179,14 @@ void Proposal::execute(const dnnl::stream& strm) {const float imgHeight = imgInfoData[0];const float imgWidth = imgInfoData[1];if (!std::isnormal(imgHeight) || !std::isnormal(imgWidth) || (imgHeight < 0.f) || (imgWidth < 0.f)) {- OPENVINO_THROW("Proposal operation image info input must have positive image height and width.");+ THROW_CPU_NODE_ERR("image info input must have positive image height and width.");}// scale factor for height & widthconst float scaleHeight = imgInfoData[2];const float scaleWidth = imgInfoSize == 4 ? imgInfoData[3] : scaleHeight;if (!std::isfinite(scaleHeight) || !std::isfinite(scaleWidth) || (scaleHeight < 0.f) || (scaleWidth < 0.f)) {- OPENVINO_THROW("Proposal operation image info input must have non negative scales.");+ THROW_CPU_NODE_ERR("image info input must have non negative scales.");}ov::Extensions::Cpu::XARCH::proposal_exec(probabilitiesData,@@ -199,8 +199,7 @@ void Proposal::execute(const dnnl::stream& strm) {outProbData,conf);} catch (const ov::Exception& e) {- std::string errorMsg = e.what();- OPENVINO_THROW(errorMsg);+ THROW_CPU_NODE_ERR(e.what());}}diff --git a/src/plugins/intel_cpu/src/nodes/qkv_proj.cpp b/src/plugins/intel_cpu/src/nodes/qkv_proj.cppindex f08f1a77d30..55dbc20c1bd 100644--- a/src/plugins/intel_cpu/src/nodes/qkv_proj.cpp+++ b/src/plugins/intel_cpu/src/nodes/qkv_proj.cpp@@ -328,7 +328,7 @@ void QKVProjection::createPrimitive() {}#endifif (!m_executor) {- OPENVINO_THROW("QKVProjection Executor creation fails with precision " + rtPrecision.to_string());+ THROW_CPU_NODE_ERR("Executor creation fails with precision " + rtPrecision.to_string());}}@@ -348,7 +348,7 @@ QKVProjection::QKVProjection(const std::shared_ptr<ov::Node>& op, const GraphCon}if (!isSupportedOperation(op, errorMessage, concurrency, config.fcDynamicQuantizationGroupSize)) {- OPENVINO_THROW("CPU: " + errorMessage);+ OPENVINO_THROW_NOT_IMPLEMENTED(errorMessage);}const auto node = ov::as_type_ptr<const QKVProjectionNode>(op);m_config = node->get_config();diff --git a/src/plugins/intel_cpu/src/nodes/random_uniform.cpp b/src/plugins/intel_cpu/src/nodes/random_uniform.cppindex b23a091d28e..bf2e8efa1c1 100644--- a/src/plugins/intel_cpu/src/nodes/random_uniform.cpp+++ b/src/plugins/intel_cpu/src/nodes/random_uniform.cpp@@ -41,7 +41,7 @@ RandomUniform::RandomUniform(const std::shared_ptr<ov::Node>& op, const GraphCon: Node(op, context, NgraphShapeInferFactory(op)) {std::string errorMessage;if (!isSupportedOperation(op, errorMessage)) {- THROW_CPU_NODE_ERR(errorMessage);+ OPENVINO_THROW_NOT_IMPLEMENTED(errorMessage);}// RandomUniform should generate new sequence each run even if all inputs are constants. So that methoddiff --git a/src/plugins/intel_cpu/src/nodes/range.cpp b/src/plugins/intel_cpu/src/nodes/range.cppindex d09a9d810d7..b7810e9ca64 100644--- a/src/plugins/intel_cpu/src/nodes/range.cpp+++ b/src/plugins/intel_cpu/src/nodes/range.cpp@@ -109,11 +109,10 @@ void Range::execute(const dnnl::stream& strm) {retcode = rangeKernel<int32_t>();break;default:- OPENVINO_THROW("Incorrect output precision. Only FP32 and I32 are supported!");+ THROW_CPU_NODE_ERR("Incorrect output precision. Only FP32 and I32 are supported!");}if (retcode == PARAMETER_MISMATCH) {- std::string errorMsg = "Range indexes exceeds data tensor dimension";- OPENVINO_THROW(errorMsg);+ THROW_CPU_NODE_ERR("Range indexes exceeds data tensor dimension");}}diff --git a/src/plugins/intel_cpu/src/nodes/rdft.cpp b/src/plugins/intel_cpu/src/nodes/rdft.cppindex c67648d47a7..6732d963142 100644--- a/src/plugins/intel_cpu/src/nodes/rdft.cpp+++ b/src/plugins/intel_cpu/src/nodes/rdft.cpp@@ -81,15 +81,14 @@ RDFT::RDFT(const std::shared_ptr<ov::Node>& op, const GraphContext::CPtr& contexOPENVINO_THROW_NOT_IMPLEMENTED(errorMessage);}- std::string errorMsgPrefix = "RDFT layer with name '" + op->get_name() + "'";const size_t numInputs = getOriginalInputsNumber();if (numInputs != 2 && numInputs != 3) {- OPENVINO_THROW(errorMsgPrefix, " has invalid number of input/output edges: ", numInputs);+ THROW_CPU_NODE_ERR("has invalid number of input/output edges: ", numInputs);}const auto axesRank = inputShapes[AXES_INDEX].getRank();if (axesRank != 1) {- OPENVINO_THROW(errorMsgPrefix, " has invalid 'axes' input tensor with rank: ", axesRank);+ THROW_CPU_NODE_ERR("has invalid 'axes' input tensor with rank: ", axesRank);}inverse = ov::is_type<ov::op::v9::IRDFT>(op);@@ -105,7 +104,7 @@ RDFT::RDFT(const std::shared_ptr<ov::Node>& op, const GraphContext::CPtr& contexif (numInputs > 2) {const auto signalSizeRank = inputShapes[SIGNAL_SIZE_INDEX].getRank();if (signalSizeRank != 1) {- OPENVINO_THROW(errorMsgPrefix, " has invalid 'signalSize' input tensor with rank: ", signalSizeRank);+ THROW_CPU_NODE_ERR("has invalid 'signalSize' input tensor with rank: ", signalSizeRank);}auto signalSizesNode = ov::as_type<ov::op::v0::Constant>(op->get_input_node_ptr(2));if (!signalSizesNode) {@@ -128,20 +127,18 @@ void RDFT::initSupportedPrimitiveDescriptors() {const auto& dataPrecision = getOriginalInputPrecisionAtPort(DATA_INDEX);if (!dataPrecision.is_real()) {- OPENVINO_THROW(errorMsgPrefix, " has unsupported 'data' input precision: ", dataPrecision.get_type_name());+ THROW_CPU_NODE_ERR("has unsupported 'data' input precision: ", dataPrecision.get_type_name());}const auto& axesPrecision = getOriginalInputPrecisionAtPort(AXES_INDEX);if (axesPrecision != ov::element::i32 && axesPrecision != ov::element::i64) {- OPENVINO_THROW(errorMsgPrefix, " has unsupported 'axes' input precision: ", axesPrecision.get_type_name());+ THROW_CPU_NODE_ERR("has unsupported 'axes' input precision: ", axesPrecision.get_type_name());}if (inputShapes.size() > SIGNAL_SIZE_INDEX) {const auto& signalSizePrecision = getOriginalInputPrecisionAtPort(SIGNAL_SIZE_INDEX);if (signalSizePrecision != ov::element::i32 && signalSizePrecision != ov::element::i64) {- OPENVINO_THROW(errorMsgPrefix,- " has unsupported 'signalSize' input precision: ",- signalSizePrecision.get_type_name());+ THROW_CPU_NODE_ERR("has unsupported 'signalSize' input precision: ", signalSizePrecision.get_type_name());}}diff --git a/src/plugins/intel_cpu/src/nodes/rdft.h b/src/plugins/intel_cpu/src/nodes/rdft.hindex e8990e383d8..df7755751ec 100644--- a/src/plugins/intel_cpu/src/nodes/rdft.h+++ b/src/plugins/intel_cpu/src/nodes/rdft.h@@ -118,7 +118,6 @@ private:bool needShapeInfer() const override;bool needPrepareParams() const override;- std::string errorMsgPrefix;bool inverse;std::vector<int> axes;std::vector<int> signalSizes;diff --git a/src/plugins/intel_cpu/src/nodes/reduce.cpp b/src/plugins/intel_cpu/src/nodes/reduce.cppindex 54e4e2e6fd5..a86b89c099d 100644--- a/src/plugins/intel_cpu/src/nodes/reduce.cpp+++ b/src/plugins/intel_cpu/src/nodes/reduce.cpp@@ -3707,11 +3707,11 @@ void Reduce::setPostOps(dnnl::primitive_attr& attr, const VectorDims& postOpDimseltwiseNode->appendPostOps(ops, postOpDims, postOpsDataPtrs, getFusingAxis());continue;}- OPENVINO_THROW("Fusing of ",- NameFromType(node->getType()),- " operation to ",- NameFromType(this->getType()),- " node is not implemented");+ THROW_CPU_NODE_ERR("Fusing of ",+ NameFromType(node->getType()),+ " operation to ",+ NameFromType(this->getType()),+ " node is not implemented");}attr.set_post_ops(ops);diff --git a/src/plugins/intel_cpu/src/nodes/region_yolo.cpp b/src/plugins/intel_cpu/src/nodes/region_yolo.cppindex 0cda931c137..8ea710f099e 100644--- a/src/plugins/intel_cpu/src/nodes/region_yolo.cpp+++ b/src/plugins/intel_cpu/src/nodes/region_yolo.cpp@@ -389,7 +389,7 @@ inline void RegionYolo::calculate_logistic(size_t start_index, int count, uint8_bf16_dst_data[i + start_index] = logistic_scalar(bf16_dst_data[i + start_index]);}} else {- OPENVINO_THROW("Unsupported precision configuration outPrc=", output_prec.get_type_name());+ THROW_CPU_NODE_ERR("Unsupported precision configuration outPrc=", output_prec.get_type_name());}}}@@ -419,10 +419,10 @@ void RegionYolo::execute(const dnnl::stream& strm) {}if (output_size != getDstMemoryAtPort(0)->getShape().getElementsCount()) {- OPENVINO_THROW("Incorrect layer configuration or output dimensions. ",- output_size,- " != ",- getDstMemoryAtPort(0)->getShape().getElementsCount());+ THROW_CPU_NODE_ERR("Incorrect layer configuration or output dimensions. ",+ output_size,+ " != ",+ getDstMemoryAtPort(0)->getShape().getElementsCount());}size_t inputs_size = IH * IW * num_ * (classes + coords + 1);diff --git a/src/plugins/intel_cpu/src/nodes/reshape.cpp b/src/plugins/intel_cpu/src/nodes/reshape.cppindex e375bb6aadd..69d4b1f3d9b 100644--- a/src/plugins/intel_cpu/src/nodes/reshape.cpp+++ b/src/plugins/intel_cpu/src/nodes/reshape.cpp@@ -38,9 +38,9 @@ Reshape::Reshape(const std::shared_ptr<ov::Node>& op, const GraphContext::CPtr&}if (isDynamicNode()) {- auto checkSecondInput = [](const std::shared_ptr<ov::Node>& op, const std::string& opType) {+ auto checkSecondInput = [this](const std::shared_ptr<ov::Node>& op, const std::string& opType) {if (op->get_input_partial_shape(1).is_dynamic()) {- OPENVINO_THROW("CPU plug-in doesn't support ", opType, " node with non static second input");+ THROW_CPU_NODE_ERR("has non static second input");}};@@ -48,13 +48,13 @@ Reshape::Reshape(const std::shared_ptr<ov::Node>& op, const GraphContext::CPtr&checkSecondInput(op, "Reshape");} else if (ov::as_type_ptr<const ov::opset1::Squeeze>(op)) {if (op->get_input_size() == 1) {- OPENVINO_THROW("CPU plug-in doesn't support Squeeze node with inputs num equal 1");+ THROW_CPU_NODE_ERR("has inputs num equal 1");}checkSecondInput(op, "Squeeze");} else if (ov::as_type_ptr<const ov::opset1::Unsqueeze>(op)) {checkSecondInput(op, "Unsqueeze");} else {- OPENVINO_THROW("Unsupported operation type via reshape node");+ THROW_CPU_NODE_ERR("Unsupported operation type via reshape node");}}}@@ -81,10 +81,10 @@ bool Reshape::needShapeInfer() const {void Reshape::getSupportedDescriptors() {if (getParentEdges().size() != 1 && getParentEdges().size() != 2) {- OPENVINO_THROW("Incorrect number of input edges for layer ", getName());+ THROW_CPU_NODE_ERR("Incorrect number of input edges");}if (getChildEdges().empty()) {- OPENVINO_THROW("Incorrect number of output edges for layer ", getName());+ THROW_CPU_NODE_ERR("Incorrect number of output edges");}}diff --git a/src/plugins/intel_cpu/src/nodes/reverse_sequence.cpp b/src/plugins/intel_cpu/src/nodes/reverse_sequence.cppindex e5671234628..c7d3b7b7ea8 100644--- a/src/plugins/intel_cpu/src/nodes/reverse_sequence.cpp+++ b/src/plugins/intel_cpu/src/nodes/reverse_sequence.cpp@@ -192,7 +192,7 @@ void ReverseSequence::execute(const dnnl::stream& strm) {const auto precision = getParentEdgeAt(REVERSESEQUENCE_LENGTHS)->getMemory().getDesc().getPrecision();if (!one_of(precision, ov::element::f32, ov::element::i32)) {- OPENVINO_THROW("ReverseSequence layer does not support ", precision, " precision");+ THROW_CPU_NODE_ERR("does not support ", precision, " precision");}if (precision == ov::element::f32) {diff --git a/src/plugins/intel_cpu/src/nodes/rms_norm.cpp b/src/plugins/intel_cpu/src/nodes/rms_norm.cppindex 20b7d2694ff..66b9ae3d3bd 100644--- a/src/plugins/intel_cpu/src/nodes/rms_norm.cpp+++ b/src/plugins/intel_cpu/src/nodes/rms_norm.cpp@@ -122,7 +122,7 @@ RMSNorm::RMSNorm(const std::shared_ptr<ov::Node>& op, const GraphContext::CPtr&: Node(op, context, RMSNormShapeInferFactory(op)) {std::string errorMessage;if (!isSupportedOperation(op, errorMessage)) {- OPENVINO_THROW("CPU: " + errorMessage);+ OPENVINO_THROW_NOT_IMPLEMENTED(errorMessage);}const auto rms = ov::as_type_ptr<const ov::op::internal::RMS>(op);m_eps = static_cast<float>(rms->get_epsilon());diff --git a/src/plugins/intel_cpu/src/nodes/roi_align.cpp b/src/plugins/intel_cpu/src/nodes/roi_align.cppindex cd80985943e..744c10a927a 100644--- a/src/plugins/intel_cpu/src/nodes/roi_align.cpp+++ b/src/plugins/intel_cpu/src/nodes/roi_align.cpp@@ -879,7 +879,7 @@ void ROIAlign::execute(const dnnl::stream& strm) {auto inputPrec = getParentEdgeAt(0)->getMemory().getDataType();auto outputPrec = getChildEdgeAt(0)->getMemory().getDataType();if (!((inputPrec == dnnl_bf16 && outputPrec == dnnl_bf16) || (inputPrec == dnnl_f32 && outputPrec == dnnl_f32))) {- OPENVINO_THROW("ROIAlign doesn't support demanded precisions");+ THROW_CPU_NODE_ERR("doesn't support demanded precisions");}ROIAlignContext ctx = {*this};@@ -970,9 +970,9 @@ void ROIAlign::executeSpecified() {const float* srcRoiPtr = &srcRoi[roiOff];int roiBatchInd = srcRoiIdx[n];if (roiBatchInd < -1) { // -1 means switched off region- OPENVINO_THROW("Batch index cannot be less, than -1");+ THROW_CPU_NODE_ERR("Batch index cannot be less, than -1");} else if (static_cast<size_t>(roiBatchInd) >= inputDimVector[0]) {- OPENVINO_THROW("Demanded batch (id = ", roiBatchInd, ") doesn't exist");+ THROW_CPU_NODE_ERR("Demanded batch (id = ", roiBatchInd, ") doesn't exist");}float x1 = (srcRoiPtr[0] + offset_src) * spatialScale + offset_dst;@@ -1099,7 +1099,7 @@ void ROIAlign::executeSpecified() {});if (realRois == 0) {- OPENVINO_THROW("realRois must be greater than 0");+ THROW_CPU_NODE_ERR("realRois must be greater than 0");}if (roi_align_kernel) {diff --git a/src/plugins/intel_cpu/src/nodes/roi_align_rotated.cpp b/src/plugins/intel_cpu/src/nodes/roi_align_rotated.cppindex 700bbd6fbdf..399a9ca2db1 100644--- a/src/plugins/intel_cpu/src/nodes/roi_align_rotated.cpp+++ b/src/plugins/intel_cpu/src/nodes/roi_align_rotated.cpp@@ -99,7 +99,7 @@ void ROIAlignRotated::execute(const dnnl::stream&) {CASE(f32);CASE(f64);default:- OPENVINO_THROW("[ROIAlignRotated]: Unhandled data type ", type, " in execute()");+ THROW_CPU_NODE_ERR("Unhandled data type ", type, " in execute()");}#undef CASE}diff --git a/src/plugins/intel_cpu/src/nodes/roi_pooling.cpp b/src/plugins/intel_cpu/src/nodes/roi_pooling.cppindex 50e2c3b4f93..1b843a0341e 100644--- a/src/plugins/intel_cpu/src/nodes/roi_pooling.cpp+++ b/src/plugins/intel_cpu/src/nodes/roi_pooling.cpp@@ -485,7 +485,7 @@ void ROIPooling::initSupportedPrimitiveDescriptors() {void ROIPooling::createPrimitive() {auto selectedPD = getSelectedPrimitiveDescriptor();if (!selectedPD) {- OPENVINO_THROW("CPU ROI Pooling node with name '", getName(), "' doesn't have primitive descriptors.");+ THROW_CPU_NODE_ERR("doesn't have primitive descriptors.");}refParams.c_block = mayiuse(cpu::x64::avx512_core) ? 16 : 8;@@ -512,7 +512,7 @@ void ROIPooling::execute(const dnnl::stream& strm) {const auto& dstMemory = getChildEdgeAt(0)->getMemory();execPtr->exec(srcMemory0, srcMemory1, dstMemory);} else {- OPENVINO_THROW("Can't execute ROI Pooling node. Primitive wasn't created");+ THROW_CPU_NODE_ERR("Primitive wasn't created");}}@@ -525,16 +525,16 @@ void ROIPooling::prepareParams() {const auto& srcMemPtr1 = getSrcMemoryAtPort(0);const auto& dstMemPtr = getDstMemoryAtPort(0);if (!srcMemPtr0 || !srcMemPtr0->isDefined()) {- OPENVINO_THROW("Input memory is undefined.");+ THROW_CPU_NODE_ERR("Input memory is undefined.");}if (!srcMemPtr1 || !srcMemPtr1->isDefined()) {- OPENVINO_THROW("Input memory is undefined.");+ THROW_CPU_NODE_ERR("Input memory is undefined.");}if (!dstMemPtr || !dstMemPtr->isDefined()) {- OPENVINO_THROW("Destination is undefined.");+ THROW_CPU_NODE_ERR("Destination is undefined.");}if (getSelectedPrimitiveDescriptor() == nullptr) {- OPENVINO_THROW("Preferable primitive descriptor is not set.");+ THROW_CPU_NODE_ERR("Preferable primitive descriptor is not set.");}const auto& inDims = getParentEdgeAt(0)->getMemory().getStaticDims();diff --git a/src/plugins/intel_cpu/src/nodes/rope.cpp b/src/plugins/intel_cpu/src/nodes/rope.cppindex 2dbd89d41ec..f22a5a72075 100644--- a/src/plugins/intel_cpu/src/nodes/rope.cpp+++ b/src/plugins/intel_cpu/src/nodes/rope.cpp@@ -25,7 +25,7 @@ RoPE::RoPE(const std::shared_ptr<ov::Node>& op, const GraphContext::CPtr& contex: Node(op, context, NgraphShapeInferFactory(op)) {std::string errorMessage;if (!isSupportedOperation(op, errorMessage)) {- OPENVINO_THROW("CPU: " + errorMessage);+ OPENVINO_THROW_NOT_IMPLEMENTED(errorMessage);}const auto node = ov::as_type_ptr<const op::internal::RoPE>(op);diff --git a/src/plugins/intel_cpu/src/nodes/scaled_attn.cpp b/src/plugins/intel_cpu/src/nodes/scaled_attn.cppindex 0d3730008ee..28f56b54151 100644--- a/src/plugins/intel_cpu/src/nodes/scaled_attn.cpp+++ b/src/plugins/intel_cpu/src/nodes/scaled_attn.cpp@@ -1084,7 +1084,7 @@ ScaledDotProductAttention::ScaledDotProductAttention(const std::shared_ptr<ov::N: Node(op, context, SDPAShapeInferFactory(op)) {std::string errorMessage;if (!isSupportedOperation(op, errorMessage)) {- OPENVINO_THROW("CPU: " + errorMessage);+ OPENVINO_THROW_NOT_IMPLEMENTED(errorMessage);}const auto& cpuConfig = context->getConfig();const auto& keyCachePrecision = cpuConfig.keyCachePrecision;@@ -1193,7 +1193,7 @@ void ScaledDotProductAttention::createPrimitive() {if (m_config.config.fuse_concat) {auto desc = getSelectedPrimitiveDescriptor();if (desc == nullptr) {- OPENVINO_THROW("has unidentified preferable primitive descriptor");+ THROW_CPU_NODE_ERR("has unidentified preferable primitive descriptor");}}auto rtPrecision = getRuntimePrecision();@@ -1237,8 +1237,7 @@ void ScaledDotProductAttention::createPrimitive() {auto cache = context->getParamsCache();auto result = cache->getOrCreate(key, builder);if (!result.first) {- OPENVINO_THROW("ScaledDotProductAttention AttentionExecutor creation fails with precision " +- rtPrecision.to_string());+ THROW_CPU_NODE_ERR("AttentionExecutor creation fails with precision " + rtPrecision.to_string());}m_executor = result.first;}@@ -1328,12 +1327,12 @@ void ScaledDotProductAttention::assignState(const std::shared_ptr<VariableStateK} else if (inputNumber - 1 == static_cast<size_t>(idx)) {m_v_state = state;} else {- OPENVINO_THROW("Unexpected idx ",- idx,- " for a state in a node with type: ",- getTypeStr(),- " and name ",- getName());+ THROW_CPU_NODE_ERR("Unexpected idx ",+ idx,+ " for a state in a node with type: ",+ getTypeStr(),+ " and name ",+ getName());}}diff --git a/src/plugins/intel_cpu/src/nodes/shuffle_channels.cpp b/src/plugins/intel_cpu/src/nodes/shuffle_channels.cppindex 0b9e1999dfa..164ceec8d30 100644--- a/src/plugins/intel_cpu/src/nodes/shuffle_channels.cpp+++ b/src/plugins/intel_cpu/src/nodes/shuffle_channels.cpp@@ -15,8 +15,6 @@#include "openvino/core/parallel.hpp"#include "utils/general_utils.h"-#define THROW_SHCH_ERROR(...) OPENVINO_THROW("ShuffleChannels layer with name '", getName(), "' ", __VA_ARGS__)-using namespace dnnl;using namespace dnnl::impl;@@ -72,7 +70,7 @@ ShuffleChannels::ShuffleChannels(const std::shared_ptr<ov::Node>& op, const Grap}if (inputShapes.size() != 1 || outputShapes.size() != 1) {- THROW_SHCH_ERROR("has incorrect number of input/output edges.");+ THROW_CPU_NODE_ERR("has incorrect number of input/output edges.");}auto shuffleChannels = ov::as_type_ptr<const ov::op::v0::ShuffleChannels>(op);@@ -92,7 +90,7 @@ void ShuffleChannels::initSupportedPrimitiveDescriptors() {ov::element::Type precision = getOriginalInputPrecisionAtPort(0);const std::set<size_t> supported_precision_sizes = {1, 2, 4, 8, 16};if (supported_precision_sizes.find(precision.size()) == supported_precision_sizes.end()) {- THROW_SHCH_ERROR("has unsupported precision: ", precision.get_type_name());+ THROW_CPU_NODE_ERR("has unsupported precision: ", precision.get_type_name());}impl_desc_type impl_type;@@ -123,13 +121,13 @@ void ShuffleChannels::createPrimitive() {auto dstMemPtr = getDstMemoryAtPort(0);auto srcMemPtr = getSrcMemoryAtPort(0);if (!dstMemPtr) {- THROW_SHCH_ERROR("has null destination memory");+ THROW_CPU_NODE_ERR("has null destination memory");}if (!srcMemPtr) {- THROW_SHCH_ERROR("has null input memory");+ THROW_CPU_NODE_ERR("has null input memory");}if (getSelectedPrimitiveDescriptor() == nullptr) {- THROW_SHCH_ERROR("has unidentified preferable primitive descriptor");+ THROW_CPU_NODE_ERR("has unidentified preferable primitive descriptor");}const auto& memoryDesc = srcMemPtr->getDesc();@@ -159,7 +157,7 @@ void ShuffleChannels::prepareParams() {auto cache = context->getParamsCache();auto result = cache->getOrCreate(attrs, builder);if (!result.first) {- OPENVINO_THROW("ShuffleChannelsExecutor was not found for node ", getName(), ".");+ THROW_CPU_NODE_ERR("executor was not found for node.");}execPtr = result.first;@@ -295,7 +293,7 @@ void ShuffleChannels::executeDynamicImpl(const dnnl::stream& strm) {void ShuffleChannels::execute(const dnnl::stream& strm) {if (!execPtr) {- THROW_SHCH_ERROR("doesn't have a compiled executor.");+ THROW_CPU_NODE_ERR("doesn't have a compiled executor.");}int MB = (attrs.axis != 0) ? getSrcMemoryAtPort(0)->getStaticDims()[0] : -1;diff --git a/src/plugins/intel_cpu/src/nodes/softmax.cpp b/src/plugins/intel_cpu/src/nodes/softmax.cppindex f95e7bf3ae5..60df571e0bb 100644--- a/src/plugins/intel_cpu/src/nodes/softmax.cpp+++ b/src/plugins/intel_cpu/src/nodes/softmax.cpp@@ -89,10 +89,10 @@ void SoftMax::getSupportedDescriptors() {auto inputDataType = DnnlExtensionUtils::ElementTypeToDataType(precision);if (getParentEdges().size() != 1) {- OPENVINO_THROW("Incorrect number of input edges for layer ", getName());+ THROW_CPU_NODE_ERR("Incorrect number of input edges");}if (!getChildEdges().size()) {- OPENVINO_THROW("Incorrect number of output edges for layer ", getName());+ THROW_CPU_NODE_ERR("Incorrect number of output edges");}const auto& inShape = getInputShapeAtPort(0);@@ -126,7 +126,7 @@ Node::AttrPtr SoftMax::initPrimitiveAttr() {void SoftMax::initOptimalPrimitiveDescriptor() {auto selected_pd = getSelectedPrimitiveDescriptor();if (selected_pd == nullptr) {- OPENVINO_THROW("Preferable primitive descriptor is not set.");+ THROW_CPU_NODE_ERR("Preferable primitive descriptor is not set.");}auto config = selected_pd->getConfig();if (isDynamicNode()) {@@ -137,7 +137,7 @@ void SoftMax::initOptimalPrimitiveDescriptor() {if (config.inConfs.size() != 1 || config.outConfs.size() != 1 ||(config.inConfs[0].getMemDesc()->isDefined() && config.outConfs[0].getMemDesc()->isDefined() &&!config.outConfs[0].getPortDesc()->isCompatible(*config.inConfs[0].getPortDesc()))) {- OPENVINO_THROW("Layer ", getName(), " has incorrect selected config!");+ THROW_CPU_NODE_ERR("has incorrect selected config!");}config.inConfs[0].setMemDesc(getConsistentInputDesc(config, 0)->getMemDesc());@@ -173,7 +173,7 @@ void SoftMax::prepareParams() {const NodeDesc* selected_pd = getSelectedPrimitiveDescriptor();if (selected_pd == nullptr) {- OPENVINO_THROW("Preferable primitive descriptor is not set for node ", getName(), ".");+ THROW_CPU_NODE_ERR("Preferable primitive descriptor is not set.");}auto attr = initPrimitiveAttr();@@ -218,7 +218,7 @@ void SoftMax::prepareParams() {execPtr = result.first;if (!execPtr) {- OPENVINO_THROW("Primitive descriptor was not found for node ", getName(), ".");+ THROW_CPU_NODE_ERR("Primitive descriptor was not found.");}auto scratchpadMem = getScratchPadMem(execPtr->getScratchPadDesc());@@ -236,7 +236,7 @@ void SoftMax::execute(const dnnl::stream& strm) {if (execPtr) {execPtr->exec(primArgs, strm);} else {- OPENVINO_THROW("Softmax node with name '", getName(), "' doesn't have an initialized executor");+ THROW_CPU_NODE_ERR("doesn't have an initialized executor");}}diff --git a/src/plugins/intel_cpu/src/nodes/space_to_batch.cpp b/src/plugins/intel_cpu/src/nodes/space_to_batch.cppindex 273a754d5a5..678c08d2af2 100644--- a/src/plugins/intel_cpu/src/nodes/space_to_batch.cpp+++ b/src/plugins/intel_cpu/src/nodes/space_to_batch.cpp@@ -260,8 +260,8 @@ void SpaceToBatch::execute(const dnnl::stream& strm) {SpaceToBatchKernel<element_type_traits<ov::element::i32>::value_type>();break;default:- OPENVINO_THROW("SpaceToBatch layer does not support precision '" +- std::string(getParentEdgeAt(0)->getMemory().getDesc().getPrecision().get_type_name()) + "'");+ THROW_CPU_NODE_ERR("does not support precision '" ++ std::string(getParentEdgeAt(0)->getMemory().getDesc().getPrecision().get_type_name()) + "'");}}diff --git a/src/plugins/intel_cpu/src/nodes/space_to_depth.cpp b/src/plugins/intel_cpu/src/nodes/space_to_depth.cppindex d1c02ef7f18..4b0ff1919f6 100644--- a/src/plugins/intel_cpu/src/nodes/space_to_depth.cpp+++ b/src/plugins/intel_cpu/src/nodes/space_to_depth.cpp@@ -205,7 +205,7 @@ void SpaceToDepth::prepareParams() {auto cache = context->getParamsCache();auto result = cache->getOrCreate(attrs, builder);if (!result.first) {- OPENVINO_THROW("SpaceToDepthExecutor was not found for node ", getName(), ".");+ THROW_CPU_NODE_ERR("executor was not found.");}execPtr = result.first;diff --git a/src/plugins/intel_cpu/src/nodes/split.cpp b/src/plugins/intel_cpu/src/nodes/split.cppindex 2bfbd291d5d..cc1560b4bb1 100644--- a/src/plugins/intel_cpu/src/nodes/split.cpp+++ b/src/plugins/intel_cpu/src/nodes/split.cpp@@ -561,7 +561,7 @@ void Split::resolveInPlaceEdges(Edge::LOOK look) {}auto selected_pd = getSelectedPrimitiveDescriptor();if (selected_pd == nullptr) {- OPENVINO_THROW("Preferable primitive descriptor is not set.");+ THROW_CPU_NODE_ERR("Preferable primitive descriptor is not set.");}auto& config = selected_pd->getConfig();size_t numberOfOutputs = config.outConfs.size();diff --git a/src/plugins/intel_cpu/src/nodes/stft.cpp b/src/plugins/intel_cpu/src/nodes/stft.cppindex 751891e9c4a..be66e4dc9bf 100644--- a/src/plugins/intel_cpu/src/nodes/stft.cpp+++ b/src/plugins/intel_cpu/src/nodes/stft.cpp@@ -33,7 +33,7 @@ STFT::STFT(const std::shared_ptr<ov::Node>& op, const GraphContext::CPtr& contex: Node(op, context, NgraphShapeInferFactory(op)) {std::string errorMessage;if (!isSupportedOperation(op, errorMessage)) {- THROW_CPU_NODE_ERR(errorMessage);+ OPENVINO_THROW_NOT_IMPLEMENTED(errorMessage);}const auto stft_op = as_type_ptr<op::v15::STFT>(op);diff --git a/src/plugins/intel_cpu/src/nodes/subgraph.cpp b/src/plugins/intel_cpu/src/nodes/subgraph.cppindex a7df4b4c673..9726f15c93a 100644--- a/src/plugins/intel_cpu/src/nodes/subgraph.cpp+++ b/src/plugins/intel_cpu/src/nodes/subgraph.cpp@@ -170,7 +170,7 @@ Subgraph::Subgraph(const std::shared_ptr<ov::Node>& op, const GraphContext::CPtr#elif defined(OPENVINO_ARCH_X86_64)subgraph_attrs->snippet->set_generator(std::make_shared<CPUGenerator>(host_isa, context->getParamsCache()));#else- OPENVINO_THROW("CPU plugin: Subgraphs code-generator is not supported on non-x64 platforms");+ THROW_CPU_NODE_ERR("Subgraphs code-generator is not supported on non-x64 platforms");#endif// Note: we have to update shapeInfer, so it uses the per-thread op::Subgraph copy@@ -282,7 +282,7 @@ void Subgraph::initSupportedPrimitiveDescriptors() {? context->getConfig().inferencePrecision: originalInputPrecision;if (supportedPrecisions.count(precision) == 0) {- OPENVINO_THROW("Subgraph node with name `", getName(), "` doesn't support ", precision, " precision.");+ THROW_CPU_NODE_ERR("doesn't support ", precision, " precision.");}const auto equalPrecisions =@@ -302,7 +302,7 @@ void Subgraph::initSupportedPrimitiveDescriptors() {for (size_t i = 0; i < outputShapes.size(); i++) {auto precision = getOriginalOutputPrecisionAtPort(i);if (supportedPrecisions.count(precision) == 0) {- OPENVINO_THROW("Subgraph node with name `", getName(), "` doesn't support ", precision, " precision.");+ THROW_CPU_NODE_ERR("doesn't support ", precision, " precision.");}BlockedMemoryDesc::CmpMask outputMask = BlockedMemoryDesc::SKIP_OFFSET_MASK;diff --git a/src/plugins/intel_cpu/src/nodes/tensoriterator.cpp b/src/plugins/intel_cpu/src/nodes/tensoriterator.cppindex 22bac0edf95..7543ade4651 100644--- a/src/plugins/intel_cpu/src/nodes/tensoriterator.cpp+++ b/src/plugins/intel_cpu/src/nodes/tensoriterator.cpp@@ -485,7 +485,7 @@ void TensorIterator::getSupportedDescriptors() {-1,1});} else {- OPENVINO_THROW("Incorrect type of the output description.");+ THROW_CPU_NODE_ERR("Incorrect type of the output description.");}}diff --git a/src/plugins/intel_cpu/src/nodes/transpose.cpp b/src/plugins/intel_cpu/src/nodes/transpose.cppindex e7d4ae61a9b..b17333011f6 100644--- a/src/plugins/intel_cpu/src/nodes/transpose.cpp+++ b/src/plugins/intel_cpu/src/nodes/transpose.cpp@@ -148,7 +148,7 @@ void Transpose::prepareParams() {auto srcDesc = dnnl::memory::desc(dstDesc.get_dims(), dstDesc.get_data_type(), memory::format_tag::acdb);auto result = getReorderPrim(context->getParamsCache(), getEngine(), srcDesc, dstDesc);if (!result) {- OPENVINO_THROW("Reorder primitive descriptor was not found for Transpose node ", getName(), ".");+ THROW_CPU_NODE_ERR("reorder primitive descriptor was not found.");}prim = result;@@ -191,7 +191,7 @@ void Transpose::prepareParams() {auto result = cache->getOrCreate(transposeParams.permuteParams, builder);if (!result.first) {- OPENVINO_THROW("Primitive descriptor was not found for node ", getName(), ".");+ THROW_CPU_NODE_ERR("Primitive descriptor was not found.");}execPtr = result.first;@@ -205,13 +205,13 @@ void Transpose::createPrimitive() {auto dstMemPtr = getDstMemoryAtPort(0);auto srcMemPtr = getSrcMemoryAtPort(INPUT_DATA_IDX);if (!dstMemPtr) {- OPENVINO_THROW("Destination memory is null.");+ THROW_CPU_NODE_ERR("Destination memory is null.");}if (!srcMemPtr) {- OPENVINO_THROW("Input memory is null.");+ THROW_CPU_NODE_ERR("Input memory is null.");}if (getSelectedPrimitiveDescriptor() == nullptr) {- OPENVINO_THROW("Preferable primitive descriptor was not set.");+ THROW_CPU_NODE_ERR("Preferable primitive descriptor was not set.");}if (getParentEdgeAt(INPUT_DATA_IDX)->getMemory().getDesc().hasLayoutType(LayoutType::ncsp) &&@@ -258,7 +258,7 @@ void Transpose::execute(const dnnl::stream& strm) {execPtr->exec({srcMemPtr}, {dstMemPtr});} else {- OPENVINO_THROW("Could not execute Transpose node. Primitive was not created.");+ THROW_CPU_NODE_ERR("Primitive was not created.");}}