[GNA] Reverted internal overload correction (#16962)
* reverted overload correction
* added comment
* Enabled tests
* Revert merge error
This reverts commit daed290452
.
This commit is contained in:
parent
930441b223
commit
14f38bfde8
@ -1313,9 +1313,13 @@ bool ScaleFactorCalculator::ScaleFactorPerLayerWeightable(InferenceEngine::Weigh
|
||||
}
|
||||
}
|
||||
|
||||
if (calculateWeightsReducerFromDstStats(quant->_dst_quant) > initial_weights_reducer_val) {
|
||||
auto weightsReducer = calculateWeightsReducerFromDstStats(quant->_dst_quant);
|
||||
// This correction should be done by POT, but we observed issues with int8 quantization
|
||||
if (weightsReducer > initial_weights_reducer_val) {
|
||||
log::warning() << "Potential overload correction issue at layer " << wl->name;
|
||||
quant->_weights_quant.SetScale(quant->_weights_quant.GetScale() / weightsReducer);
|
||||
}
|
||||
quant->_dst_quant.SetScale(quant->_weights_quant.GetScale() * quant->_src_quant.GetScale());
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -141,6 +141,7 @@ TEST_P(MatMulOverloadCorrectionNegTest, CompareWithRefImpl) {
|
||||
EXPECT_THAT(what.str(), ::testing::HasSubstr(expected));
|
||||
std::cout.rdbuf(sbuf);
|
||||
std::cerr.rdbuf(ebuf);
|
||||
Run();
|
||||
};
|
||||
|
||||
const std::vector<InferenceEngine::Precision> netPrecisions = {InferenceEngine::Precision::FP32,
|
||||
|
Loading…
Reference in New Issue
Block a user