std::vector<float> sum_scales;
bool broadcast = false;
int batch_dim = 5;
- std::vector<MKLDNNMemoryPtr> PostOpsIntBlobMemory;
mkldnn::primitive_attr attr;
std::shared_ptr<jit_uni_eltwise_fq_kernel> eltiwse_fq_kernel;
auto const &lhsBlockingDesc = lhs.getBlockingDesc();
auto const &rhsBlockingDesc = rhs.getBlockingDesc();
- bool lhsDefaultStrides, rhsDefaultStrides;
- size_t lhsSize, rhsSize;
+ bool lhsDefaultStrides = false, rhsDefaultStrides = false;
+ size_t lhsSize = 0lu, rhsSize = 0lu;
std::tie(lhsDefaultStrides, lhsSize) = isDefaultStrides(lhsBlockingDesc.getStrides(), lhs.getDims());
std::tie(rhsDefaultStrides, rhsSize) = isDefaultStrides(rhsBlockingDesc.getStrides(), rhs.getDims());
for (int i = 0; i < p.len_; i++) {
auto& post_op = p.entry_[i];
if (post_op.is_eltwise()) {
+ if (eltwise_injectors.size() <= eltwise_inj_idx
+ || eltwise_injectors[eltwise_inj_idx] == nullptr)
+ assert(!"Invalid eltwise injectors.");
eltwise_injectors[eltwise_inj_idx]->compute_vector_range(vmm_val.getIdx(), vmm_val.getIdx() + 1);
eltwise_inj_idx++;
} else if (post_op.is_depthwise()) {
+ if (depthwise_injectors.size() <= depthwise_inj_idx
+ || depthwise_injectors[depthwise_inj_idx] == nullptr)
+ assert(!"Invalid depthwise injectors.");
mov(reg_d_weights, reinterpret_cast<size_t>(post_op.depthwise.weights_data));
mov(reg_d_bias, reinterpret_cast<size_t>(post_op.depthwise.biases_data));
add(reg_d_weights, reg_oc_off);
depthwise_injectors[depthwise_inj_idx]->compute_vector_range(vmm_val.getIdx(), vmm_val.getIdx() + 1, reg_d_weights, reg_d_bias, is_broadcast);
depthwise_inj_idx++;
} else if (post_op.is_quantization()) {
+ if (quantization_injectors.size() <= quantization_inj_idx
+ || quantization_injectors[quantization_inj_idx] == nullptr)
+ assert(!"Invalid quantization injectors.");
bool do_dequantization = post_op.quantization.alg == alg_kind::quantization_quantize_dequantize;
bool do_rounding = do_dequantization || dst_dt == memory::f32 || i != p.len_ - 1;
SizeVector indicesDim = getParentEdgeAt(INDICES_ID)->getDesc().getDims();
size_t srcRank = srcDataDim.size();
int axis = 0;
+ std::string errorPrefix = std::string("'") + getTypeStr() + "'" + " layer with name '" + getName() + "'";
if (axisRelaxed) {
auto &axisMemPtr = getParentEdgeAt(AXIS_ID)->getMemoryPtr();
uint8_t *axisPtr = reinterpret_cast<uint8_t*>(axisMemPtr->GetData()) +
}
if (axis >= static_cast<int>(srcRank) || axis < (static_cast<int>(srcRank) * - 1)) {
- THROW_IE_EXCEPTION << "'" << getType() << "'" << " layer with name '" << getName()
- << "' should have axis value in range [-r, r - 1], where r is the rank of input data";
+ THROW_IE_EXCEPTION << errorPrefix
+ << " should have axis value in range [-r, r - 1], where r is the rank of input data";
}
axis = axis < 0 ? (axis + srcRank) : axis;
for (int i = start; i < end; i++) {
int64_t idxValue = getIndicesValue(indicesPtr, i);
if (idxValue >= static_cast<int64_t>(srcDimAxis) || idxValue < 0) {
- THROW_IE_EXCEPTION << "'" << getType() << "'" << " layer with name '" << getName()
- << "' have indices value that points to non-existing output tensor element";
+ THROW_IE_EXCEPTION << errorPrefix
+ << " have indices value that points to non-existing output tensor element";
}
}
});
}
}
}
+ if (updateRank > expectUpdateShape.size())
+ THROW_IE_EXCEPTION << errorPrefix << " cannot update shape. New rank: "
+ << updateRank << ", expected: " << expectUpdateShape.size();
for (size_t ru = 0; ru < updateRank; ru++) {
if (updateDim[ru] != expectUpdateShape[ru]) {
- THROW_IE_EXCEPTION << "'" << getType() << "'" << " layer with name '" << getName()
- << "' do not have matched tensor shape relationship for input, indices and update";
+ THROW_IE_EXCEPTION << errorPrefix
+ << " do not have matched tensor shape relationship for input, indices and update";
}
}
}
break;
}
default: {
- THROW_IE_EXCEPTION << "'" << getType() << "'" << " layer with name '" << getName()
- << "' is not supported";
+ THROW_IE_EXCEPTION << errorPrefix
+ << " is not supported";
}
}
}