Enabled (u)int_4 to (u)int8 conversion (#4973)
This commit is contained in:
parent
c367b3f22e
commit
da7c2dfc2b
@ -148,7 +148,7 @@ InferenceEngine::CNNNetwork clDNNEngine::CloneAndTransformNetwork(const Inferenc
|
||||
enableInt8 = config.enableInt8 && ngraph::pass::low_precision::LowPrecisionTransformer::isFunctionQuantized(nGraphFunc);
|
||||
if (enableInt8) {
|
||||
manager.register_pass<ngraph::pass::DisableConvertConstantFoldingOnConstPath>(
|
||||
std::vector<ngraph::element::Type>{ ngraph::element::i8, ngraph::element::u8 });
|
||||
std::vector<ngraph::element::Type>{ ngraph::element::i8, ngraph::element::u8, ngraph::element::i4, ngraph::element::u4 });
|
||||
}
|
||||
|
||||
manager.register_pass<ngraph::pass::InitNodeInfo>();
|
||||
@ -180,6 +180,8 @@ InferenceEngine::CNNNetwork clDNNEngine::CloneAndTransformNetwork(const Inferenc
|
||||
{ngraph::element::u16, ngraph::element::i32},
|
||||
{ngraph::element::u32, ngraph::element::i32},
|
||||
{ngraph::element::boolean, ngraph::element::u8},
|
||||
{ngraph::element::i4, ngraph::element::i8},
|
||||
{ngraph::element::u4, ngraph::element::u8},
|
||||
};
|
||||
|
||||
for (auto& precision : convert_precision_list) {
|
||||
|
@ -120,7 +120,7 @@ static void Transformation(CNNNetwork& clonedNetwork, const Config& conf) {
|
||||
ngraph::pass::low_precision::LowPrecisionTransformer::isFunctionQuantized(nGraphFunc);
|
||||
if (useLpt) {
|
||||
manager.register_pass<ngraph::pass::DisableConvertConstantFoldingOnConstPath>(
|
||||
std::vector<ngraph::element::Type>{ ngraph::element::i8, ngraph::element::u8 });
|
||||
std::vector<ngraph::element::Type>{ ngraph::element::i8, ngraph::element::u8, ngraph::element::i4, ngraph::element::u4 });
|
||||
}
|
||||
|
||||
// WA: ConvertPriorBox must be executed before the 1st ConstantFolding pass
|
||||
@ -148,6 +148,8 @@ static void Transformation(CNNNetwork& clonedNetwork, const Config& conf) {
|
||||
{ngraph::element::f64, ngraph::element::f32},
|
||||
{ngraph::element::f16, ngraph::element::f32},
|
||||
{ngraph::element::boolean, ngraph::element::u8},
|
||||
{ngraph::element::i4, ngraph::element::i8},
|
||||
{ngraph::element::u4, ngraph::element::u8},
|
||||
};
|
||||
|
||||
for (auto &precision : convert_precision_list) {
|
||||
|
Loading…
Reference in New Issue
Block a user