[CPU] Fix of coverity issues (#17823)
* mvn missing else handled * negative binarization covered * coverity 1502464 * coverity 1504685, 1504781, 1504786 * rollback regpool diff * code review
This commit is contained in:
@@ -636,6 +636,8 @@ private:
|
||||
if (jcp_.with_binarization) {
|
||||
int binarization_idx = p.find(primitive_kind::binarization);
|
||||
|
||||
IE_ASSERT(binarization_idx >= 0) << "postops don't contain binarization";
|
||||
|
||||
pop(reg_oc_off);
|
||||
|
||||
mov(reg_b_weights, reinterpret_cast<size_t>(p.entry_[binarization_idx].binarization.weights_data));
|
||||
|
||||
@@ -124,7 +124,7 @@ protected:
|
||||
PhysicalSet(int size) : isFreeIndexVector(size, true) {}
|
||||
|
||||
void setAsUsed(size_t regIdx) {
|
||||
if (regIdx >= isFreeIndexVector.size() || regIdx < 0) {
|
||||
if (regIdx >= isFreeIndexVector.size()) {
|
||||
IE_THROW() << "regIdx is out of bounds in RegistersPool::PhysicalSet::setAsUsed()";
|
||||
}
|
||||
if (!isFreeIndexVector[regIdx]) {
|
||||
@@ -134,7 +134,7 @@ protected:
|
||||
}
|
||||
|
||||
void setAsUnused(size_t regIdx) {
|
||||
if (regIdx >= isFreeIndexVector.size() || regIdx < 0) {
|
||||
if (regIdx >= isFreeIndexVector.size()) {
|
||||
IE_THROW() << "regIdx is out of bounds in RegistersPool::PhysicalSet::setAsUsed()";
|
||||
}
|
||||
if (isFreeIndexVector[regIdx]) {
|
||||
@@ -147,7 +147,7 @@ protected:
|
||||
if (requestedIdx == static_cast<size_t>(anyIdx)) {
|
||||
return getFirstFreeIndex();
|
||||
} else {
|
||||
if (requestedIdx >= isFreeIndexVector.size() || requestedIdx < 0) {
|
||||
if (requestedIdx >= isFreeIndexVector.size()) {
|
||||
IE_THROW() << "requestedIdx is out of bounds in RegistersPool::PhysicalSet::getUnused()";
|
||||
}
|
||||
if (!isFreeIndexVector[requestedIdx]) {
|
||||
|
||||
@@ -1159,6 +1159,8 @@ MVN::MVN(const std::shared_ptr<ngraph::Node>& op, const GraphContext::CPtr conte
|
||||
mvnAttrs.normalizeVariance_ = mvnOp->get_normalize_variance();
|
||||
mvnAttrs.epsValue_ = mvnOp->get_eps();
|
||||
mvnAttrs.initAcrossChannels_ = mvnOp->get_across_channels();
|
||||
} else {
|
||||
IE_THROW(NotImplemented) << "Node is not an instance of MVN from the operation set v0 or v6";
|
||||
}
|
||||
mvnAttrs.execAcrossChannels_ = mvnAttrs.initAcrossChannels_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user