[CPU] Register pass to remove unnecessary convert layers (#7642)

This commit is contained in:
Mang Guo 2021-10-18 20:28:47 +08:00 committed by GitHub
parent 4c722e025b
commit ac9c2f19dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,6 +28,7 @@
#include <transformations/common_optimizations/common_optimizations.hpp>
#include <transformations/common_optimizations/weights_dequantize_to_fake_quantize.hpp>
#include "transformations/common_optimizations/convert_quantize_dequantize.hpp"
#include <transformations/common_optimizations/nop_elimination.hpp>
#include <transformations/op_conversions/convert_depth_to_space.hpp>
#include <transformations/op_conversions/convert_shuffle_channels3.hpp>
#include <transformations/op_conversions/convert_space_to_depth.hpp>
@ -184,6 +185,7 @@ static void TransformationUpToCPUSpecificOpSet(std::shared_ptr<ngraph::Function>
std::vector<ngraph::element::Type>{ ngraph::element::i8, ngraph::element::u8, ngraph::element::i4, ngraph::element::u4 });
}
manager.register_pass<ngraph::pass::ConvertPrecision>(precisions);
manager.register_pass<ngraph::pass::EliminateConvert>();
auto pass_config = manager.get_pass_config();