Skip to content

Commit

Permalink
add cpu test
Browse files Browse the repository at this point in the history
  • Loading branch information
ndemashov committed Aug 4, 2021
2 parents bdfed62 + d3f2779 commit db573b4
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//

#pragma once

#include <memory>
#include <ngraph/ngraph.hpp>
#include "low_precision/layer_transformation.hpp"

namespace ngraph {
namespace pass {
namespace low_precision {

class LP_TRANSFORMATIONS_API MoveFakeQuantize : public LayerTransformation {
public:
MoveFakeQuantize(const Params& params);
bool transform(TransformationContext& context, ngraph::pattern::Matcher &m) override;
bool isPrecisionPreserved(std::shared_ptr<Node> layer) const noexcept override;
};

} // namespace low_precision
} // namespace pass
} // namespace ngraph
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
// SPDX-License-Identifier: Apache-2.0
//

<<<<<<< HEAD
#include "low_precision/move_fake_quantize.hpp"
=======
#include "low_precision/move_fake_quatize.hpp"
>>>>>>> d3f2779243103cbd159d46e486d9f7ea0ffaec27

#include <ngraph/pattern/op/wrap_type.hpp>
#include <ngraph/opsets/opset1.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ namespace {

class MoveFakeQuantizeActualValues {
public:
<<<<<<< HEAD
ngraph::builder::subgraph::FakeQuantizeOnDataWithConstant fakeQuantizeBefore1;
ngraph::builder::subgraph::DequantizationOperations::Convert convertBefore1;
ngraph::builder::subgraph::DequantizationOperations dequantizationBefore1;
Expand All @@ -51,6 +52,16 @@ namespace {
ngraph::builder::subgraph::DequantizationOperations dequantizationBefore2;
std::string operation;
ngraph::builder::subgraph::FakeQuantizeOnDataWithConstant fakeQuantizeAfter;
=======
ngraph::builder::subgraph::FakeQuantizeOnDataWithConstant fakeQuantizeBefore1; //before1
ngraph::builder::subgraph::DequantizationOperations::Convert convertBefore1;
ngraph::builder::subgraph::DequantizationOperations dequantizationBefore1;
ngraph::builder::subgraph::FakeQuantizeOnDataWithConstant fakeQuantizeBefore2; //before1
ngraph::builder::subgraph::DequantizationOperations::Convert convertBefore2;
ngraph::builder::subgraph::DequantizationOperations dequantizationBefore2;
std::string operation;
ngraph::builder::subgraph::FakeQuantizeOnDataWithConstant fakeQuantizeAfter; // after
>>>>>>> d3f2779243103cbd159d46e486d9f7ea0ffaec27
ngraph::builder::subgraph::DequantizationOperations::Convert convertAfter;
ngraph::builder::subgraph::DequantizationOperations dequantizationAfter;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ namespace ngraph {
if (operation == "relu") {
auto relu1 = std::make_shared<ngraph::opset1::Relu>(input1->output(0));
auto relu2 = std::make_shared<ngraph::opset1::Relu>(input2->output(0));
<<<<<<< HEAD
parent1 = makeFakeQuantizeTypeRelaxed(relu1, inputPrecision, fqOnData1);// ???????? ?? MoveFakeQuantize
=======
parent1 = makeFakeQuantizeTypeRelaxed(relu1, inputPrecision, fqOnData1);
>>>>>>> d3f2779243103cbd159d46e486d9f7ea0ffaec27
parent2 = makeFakeQuantizeTypeRelaxed(relu2, inputPrecision, fqOnData2);
}
else {
Expand Down

0 comments on commit db573b4

Please sign in to comment.