[CPU] Add axis check to ACL Reduce isSupported method (#17188)
* fix * fix2
This commit is contained in:
1 parent
0a5975bdfa
commit
6e11645018
2 files changed
+7
-3
No files matched your search
@@ -70,9 +70,6 @@ bool AclReduceExecutor::init(const ReduceAttrs& reduceAttrs,
|
||||
case Algorithm::ReduceMin:
|
||||
case Algorithm::ReduceSum:
|
||||
case Algorithm::ReduceProd: {
|
||||
if (reduceAttrs.axes.size() != 1) {
|
||||
return false;
|
||||
}
|
||||
Status reductionOperationStatus = NEReductionOperation::validate(&srcTensorInfo, &dstTensorInfo, axisCast(reduceAttrs.axes[0], srcDims.size()),
|
||||
getAclReductionOperationByAlgorithm(reduceAttrs.operation), reduceAttrs.keepDims);
|
||||
if (!reductionOperationStatus) {
|
||||
|
||||
@@ -79,6 +79,13 @@ public:
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((reduceAttrs.operation == Algorithm::ReduceSum ||
|
||||
reduceAttrs.operation == Algorithm::ReduceMax ||
|
||||
reduceAttrs.operation == Algorithm::ReduceMin ||
|
||||
reduceAttrs.operation == Algorithm::ReduceProd) &&
|
||||
reduceAttrs.axes.size() != 1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user