diff --git a/src/plugins/intel_cpu/src/nodes/executors/acl/acl_reduce.cpp b/src/plugins/intel_cpu/src/nodes/executors/acl/acl_reduce.cpp index e9f249dcb71d20..be123dad5263c1 100644 --- a/src/plugins/intel_cpu/src/nodes/executors/acl/acl_reduce.cpp +++ b/src/plugins/intel_cpu/src/nodes/executors/acl/acl_reduce.cpp @@ -68,6 +68,7 @@ bool AclReduceExecutor::init(const ReduceAttrs& reduceAttrs, auto pos = axisCast(i, reduceAttrs.axes.size()); if (srcDescs[0]->hasLayoutType(LayoutType::nspc)) { axe = getAxeNchwLayout(axe); + if (axe == -1) return false; } axesMean.set(pos, axe); } @@ -90,6 +91,7 @@ bool AclReduceExecutor::init(const ReduceAttrs& reduceAttrs, int axis = axisCast(reduceAttrs.axes[0], srcDims.size()); if (srcDescs[0]->hasLayoutType(LayoutType::nspc)) { axis = getAxeNchwLayout(axis); + if (axis == -1) return false; } Status reductionOperationStatus = NEReductionOperation::validate(&srcTensorInfo, &dstTensorInfo, axis, getAclReductionOperationByAlgorithm(reduceAttrs.operation), reduceAttrs.keepDims);