Skip to content

Commit

Permalink
[LPT] Move clean up transformations in one pass manager #5
Browse files Browse the repository at this point in the history
  • Loading branch information
eshoguli committed Jun 29, 2021
1 parent 3878a2c commit c514d4b
Showing 1 changed file with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -313,15 +313,11 @@ bool ngraph::pass::low_precision::LowPrecision::run_on_function(std::shared_ptr<
cleanup->add_matcher<ngraph::pass::low_precision::FuseConvertTransformation>(params);
cleanup->add_matcher<ngraph::pass::low_precision::FuseSubtractToFakeQuantizeTransformation>(params);
cleanup->add_matcher<ngraph::pass::low_precision::FuseMultiplyToFakeQuantizeTransformation>(params);
cleanupManager.run_passes(f);
}

{
ngraph::pass::Manager standaloneCleanupManager(passConfig);
// WA: precision restrictions for groupConv must be propagated to MultiplyToGroupConvolution transformation
const auto groupConvRestriction = OperationPrecisionRestriction::getPrecisionsByOperationType<opset1::GroupConvolution>(precisionRestrictions);
standaloneCleanupManager.register_pass<ngraph::pass::low_precision::MultiplyToGroupConvolutionTransformation>(params, groupConvRestriction);
standaloneCleanupManager.run_passes(f);
cleanup->add_matcher<ngraph::pass::low_precision::MultiplyToGroupConvolutionTransformation>(
params,
OperationPrecisionRestriction::getPrecisionsByOperationType<opset1::GroupConvolution>(precisionRestrictions));
cleanupManager.run_passes(f);
}

// TODO: LPT: is legacy?
Expand Down

0 comments on commit c514d4b

Please sign in to comment.