Skip to content

Commit

Permalink
Concat & MVN transformations: return separateInStandaloneBranch call
Browse files Browse the repository at this point in the history
  • Loading branch information
v-Golubev committed Sep 2, 2024
1 parent b183fb8 commit 977cbd1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/common/low_precision_transformations/src/concat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ ConcatTransformation::ConcatTransformation(const Params& params) : LayerTransfor
}

bool ConcatTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher &m) {
std::shared_ptr<ov::opset1::Concat> concat = ov::as_type_ptr<ov::opset1::Concat>(m.get_match_root());
if (!canBeTransformed(context, concat)) {
if (!canBeTransformed(context, m.get_match_root())) {
return false;
}

const auto concat = ov::as_type_ptr<ov::opset1::Concat>(NetworkHelper::separateInStandaloneBranch(m.get_match_root(), defaultPrecisions));
std::vector<FakeQuantizeDequantization> layerDequantizations;
layerDequantizations.reserve(concat->get_input_size());
for (size_t parentIndex = 0ul; parentIndex < concat->get_input_size(); parentIndex++) {
Expand Down
6 changes: 1 addition & 5 deletions src/common/low_precision_transformations/src/mvn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,7 @@ bool MVNTransformation::transform(TransformationContext &context, ov::pass::patt
return false;
}

std::shared_ptr<Node> mvn = ov::as_type_ptr<op::v0::MVN>(operation);
if (!mvn) {
mvn = ov::as_type_ptr<opset6::MVN>(operation);
}

const auto mvn = NetworkHelper::separateInStandaloneBranch(operation, defaultPrecisions);
bool normalizeVariance;
if (ov::is_type<op::v0::MVN>(mvn)) {
normalizeVariance = ov::as_type_ptr<op::v0::MVN>(mvn)->get_normalize_variance();
Expand Down

0 comments on commit 977cbd1

Please sign in to comment.