forked from openvinotoolkit/openvino
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into mvafin/pt_fe/quantize_regular_ops
- Loading branch information
Showing
129 changed files
with
3,604 additions
and
4,859 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/bindings/python/src/compatibility/openvino/requirements-dev.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
cython>=0.29.32,<=0.29.36 | ||
cython>=0.29.32 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// Copyright (C) 2018-2023 Intel Corporation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
#include "openvino/frontend/pytorch/node_context.hpp" | ||
#include "openvino/op/add.hpp" | ||
#include "openvino/op/constant.hpp" | ||
#include "openvino/op/relu.hpp" | ||
#include "utils_quantize.hpp" | ||
|
||
namespace ov { | ||
namespace frontend { | ||
namespace pytorch { | ||
namespace op { | ||
|
||
using namespace ov::op; | ||
|
||
OutputVector translate_quantized_add(const NodeContext& context) { | ||
num_inputs_check(context, 4, 4); | ||
const auto x = context.get_input(0); | ||
const auto y = context.get_input(1); | ||
const auto scale = context.get_input(2); | ||
const auto zero_point = context.get_input(3); | ||
|
||
const auto quantized_add = context.mark_node(std::make_shared<v1::Add>(x, y)); | ||
|
||
return {quantize(context, quantized_add, scale, zero_point, x)}; | ||
} | ||
|
||
OutputVector translate_quantized_add_relu(const NodeContext& context) { | ||
num_inputs_check(context, 4, 4); | ||
const auto x = context.get_input(0); | ||
const auto y = context.get_input(1); | ||
const auto scale = context.get_input(2); | ||
const auto zero_point = context.get_input(3); | ||
|
||
const auto quantized_add = context.mark_node(std::make_shared<v1::Add>(x, y)); | ||
const auto quantized_add_relu = context.mark_node(std::make_shared<v0::Relu>(quantized_add)); | ||
|
||
return {quantize(context, quantized_add_relu, scale, zero_point, x)}; | ||
} | ||
|
||
} // namespace op | ||
} // namespace pytorch | ||
} // namespace frontend | ||
} // namespace ov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Copyright (C) 2018-2023 Intel Corporation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
#include "openvino/frontend/pytorch/node_context.hpp" | ||
#include "openvino/op/constant.hpp" | ||
#include "openvino/op/hswish.hpp" | ||
#include "utils_quantize.hpp" | ||
|
||
namespace ov { | ||
namespace frontend { | ||
namespace pytorch { | ||
namespace op { | ||
|
||
using namespace ov::op; | ||
|
||
OutputVector translate_quantized_hardswish(const NodeContext& context) { | ||
num_inputs_check(context, 3, 3); | ||
const auto x = context.get_input(0); | ||
const auto scale = context.get_input(1); | ||
const auto zero_point = context.get_input(2); | ||
|
||
const auto quantized_hardswish = context.mark_node(std::make_shared<v4::HSwish>(x)); | ||
|
||
return {quantize(context, quantized_hardswish, scale, zero_point, x)}; | ||
} | ||
|
||
} // namespace op | ||
} // namespace pytorch | ||
} // namespace frontend | ||
} // namespace ov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Copyright (C) 2018-2023 Intel Corporation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
#include "openvino/frontend/pytorch/node_context.hpp" | ||
#include "openvino/op/constant.hpp" | ||
#include "openvino/op/multiply.hpp" | ||
#include "utils_quantize.hpp" | ||
|
||
namespace ov { | ||
namespace frontend { | ||
namespace pytorch { | ||
namespace op { | ||
|
||
using namespace ov::op; | ||
|
||
OutputVector translate_quantized_mul(const NodeContext& context) { | ||
num_inputs_check(context, 4, 4); | ||
const auto x = context.get_input(0); | ||
const auto y = context.get_input(1); | ||
const auto scale = context.get_input(2); | ||
const auto zero_point = context.get_input(3); | ||
|
||
const auto quantized_mul = context.mark_node(std::make_shared<v1::Multiply>(x, y)); | ||
|
||
return {quantize(context, quantized_mul, scale, zero_point, x)}; | ||
} | ||
|
||
} // namespace op | ||
} // namespace pytorch | ||
} // namespace frontend | ||
} // namespace ov |
Oops, something went wrong.