Revert "Delete opset headers from transformations/utils" (#23350)
Reverts openvinotoolkit/openvino#22725 To fix RHEL build
This commit is contained in:
parent
f5641a109c
commit
090bf9205f
|
|
@ -11,8 +11,6 @@
|
|||
#include "openvino/op/fake_convert.hpp"
|
||||
#include "openvino/op/fake_quantize.hpp"
|
||||
#include "openvino/op/multiply.hpp"
|
||||
#include "openvino/op/negative.hpp"
|
||||
#include "openvino/op/power.hpp"
|
||||
#include "openvino/op/subtract.hpp"
|
||||
#include "openvino/pass/constant_folding.hpp"
|
||||
#include "openvino/pass/pattern/op/or.hpp"
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@
|
|||
|
||||
#include "openvino/core/descriptor_tensor.hpp"
|
||||
#include "openvino/core/rt_info.hpp"
|
||||
#include "openvino/op/constant.hpp"
|
||||
#include "openvino/op/convert.hpp"
|
||||
#include "openvino/opsets/opset4.hpp"
|
||||
#include "openvino/opsets/opset8.hpp"
|
||||
#include "openvino/pass/graph_rewrite.hpp"
|
||||
#include "transformations/rt_info/attributes.hpp"
|
||||
#include "transformations_visibility.hpp"
|
||||
|
|
@ -65,7 +65,7 @@ bool has_op_with_type(const std::shared_ptr<const ov::Model>& function) {
|
|||
|
||||
inline bool has_decompression_converts(const std::shared_ptr<const ov::Model>& function) {
|
||||
for (const auto& op : function->get_ops()) {
|
||||
if (std::dynamic_pointer_cast<ov::op::v0::Convert>(op)) {
|
||||
if (std::dynamic_pointer_cast<opset8::Convert>(op)) {
|
||||
if (ov::is_decompression(op))
|
||||
return true;
|
||||
}
|
||||
|
|
@ -133,7 +133,7 @@ bool has_constant_value(const std::shared_ptr<Node>& node,
|
|||
return false;
|
||||
}
|
||||
|
||||
auto constant = std::dynamic_pointer_cast<ov::op::v0::Constant>(node);
|
||||
auto constant = std::dynamic_pointer_cast<opset4::Constant>(node);
|
||||
if (!constant) {
|
||||
return false;
|
||||
}
|
||||
|
|
@ -167,7 +167,7 @@ bool has_constant_value(const std::shared_ptr<Node>& node,
|
|||
return false;
|
||||
}
|
||||
|
||||
auto constant = std::dynamic_pointer_cast<ov::op::v0::Constant>(node);
|
||||
auto constant = std::dynamic_pointer_cast<opset4::Constant>(node);
|
||||
if (!constant) {
|
||||
return false;
|
||||
}
|
||||
|
|
@ -184,18 +184,18 @@ bool has_constant_value(const std::shared_ptr<Node>& node,
|
|||
return const_values == values;
|
||||
}
|
||||
|
||||
TRANSFORMATIONS_API bool get_single_value(const std::shared_ptr<ov::op::v0::Constant>& const_node,
|
||||
TRANSFORMATIONS_API bool get_single_value(const std::shared_ptr<opset4::Constant>& const_node,
|
||||
float& value,
|
||||
bool check_value_range = true);
|
||||
|
||||
TRANSFORMATIONS_API std::shared_ptr<Node> normalize_constant(const std::shared_ptr<ov::op::v0::Constant>& constant,
|
||||
TRANSFORMATIONS_API std::shared_ptr<Node> normalize_constant(const std::shared_ptr<opset4::Constant>& constant,
|
||||
const PartialShape& shape);
|
||||
|
||||
TRANSFORMATIONS_API std::shared_ptr<Node> broadcastTo(const Output<Node>& input, const Shape& shape);
|
||||
|
||||
TRANSFORMATIONS_API std::shared_ptr<Node> reshapeTo(const Output<Node>& input, const Shape& shape);
|
||||
|
||||
TRANSFORMATIONS_API bool constantIsEqualTo(const std::shared_ptr<ov::op::v0::Constant>& const_node,
|
||||
TRANSFORMATIONS_API bool constantIsEqualTo(const std::shared_ptr<opset4::Constant>& const_node,
|
||||
float value,
|
||||
float eps = 1e-5);
|
||||
|
||||
|
|
|
|||
|
|
@ -9,10 +9,6 @@
|
|||
#include "openvino/op/constant.hpp"
|
||||
#include "openvino/op/reshape.hpp"
|
||||
#include "openvino/op/unsqueeze.hpp"
|
||||
#include "openvino/op/util/binary_elementwise_arithmetic.hpp"
|
||||
#include "openvino/op/util/binary_elementwise_comparison.hpp"
|
||||
#include "openvino/op/util/binary_elementwise_logical.hpp"
|
||||
#include "openvino/op/util/gather_base.hpp"
|
||||
#include "openvino/pass/pattern/op/or.hpp"
|
||||
#include "openvino/pass/pattern/op/wrap_type.hpp"
|
||||
#include "transformations/utils/utils.hpp"
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@
|
|||
#include "itt.hpp"
|
||||
#include "openvino/core/rt_info.hpp"
|
||||
#include "openvino/op/constant.hpp"
|
||||
#include "openvino/op/util/multi_subgraph_base.hpp"
|
||||
#include "openvino/pass/pattern/op/wrap_type.hpp"
|
||||
#include "transformations/utils/utils.hpp"
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@
|
|||
#include "openvino/op/constant.hpp"
|
||||
#include "openvino/op/divide.hpp"
|
||||
#include "openvino/op/erf.hpp"
|
||||
#include "openvino/op/gelu.hpp"
|
||||
#include "openvino/op/multiply.hpp"
|
||||
#include "openvino/op/parameter.hpp"
|
||||
#include "openvino/op/power.hpp"
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
#include "itt.hpp"
|
||||
#include "openvino/op/constant.hpp"
|
||||
#include "openvino/op/divide.hpp"
|
||||
#include "openvino/op/util/multi_subgraph_base.hpp"
|
||||
#include "openvino/op/util/precision_sensitive_attribute.hpp"
|
||||
#include "openvino/pass/pattern/op/wrap_type.hpp"
|
||||
#include "transformations/rt_info/disable_fp16_compression.hpp"
|
||||
|
|
|
|||
|
|
@ -12,13 +12,11 @@
|
|||
#include "itt.hpp"
|
||||
#include "openvino/core/validation_util.hpp"
|
||||
#include "openvino/op/add.hpp"
|
||||
#include "openvino/op/broadcast.hpp"
|
||||
#include "openvino/op/concat.hpp"
|
||||
#include "openvino/op/constant.hpp"
|
||||
#include "openvino/op/convert.hpp"
|
||||
#include "openvino/op/divide.hpp"
|
||||
#include "openvino/op/gather.hpp"
|
||||
#include "openvino/op/gather_elements.hpp"
|
||||
#include "openvino/op/gru_sequence.hpp"
|
||||
#include "openvino/op/lstm_sequence.hpp"
|
||||
#include "openvino/op/multiply.hpp"
|
||||
|
|
@ -28,17 +26,11 @@
|
|||
#include "openvino/op/scatter_elements_update.hpp"
|
||||
#include "openvino/op/scatter_nd_update.hpp"
|
||||
#include "openvino/op/scatter_update.hpp"
|
||||
#include "openvino/op/slice.hpp"
|
||||
#include "openvino/op/split.hpp"
|
||||
#include "openvino/op/squeeze.hpp"
|
||||
#include "openvino/op/strided_slice.hpp"
|
||||
#include "openvino/op/subtract.hpp"
|
||||
#include "openvino/op/tile.hpp"
|
||||
#include "openvino/op/transpose.hpp"
|
||||
#include "openvino/op/unsqueeze.hpp"
|
||||
#include "openvino/op/util/binary_elementwise_comparison.hpp"
|
||||
#include "openvino/op/util/binary_elementwise_logical.hpp"
|
||||
#include "openvino/op/util/op_types.hpp"
|
||||
#include "openvino/op/util/pad_base.hpp"
|
||||
#include "openvino/op/variadic_split.hpp"
|
||||
#include "openvino/pass/pattern/op/optional.hpp"
|
||||
|
|
|
|||
|
|
@ -12,8 +12,6 @@
|
|||
#include "openvino/op/constant.hpp"
|
||||
#include "openvino/op/reshape.hpp"
|
||||
#include "openvino/op/unsqueeze.hpp"
|
||||
#include "openvino/op/util/arithmetic_reductions_keep_dims.hpp"
|
||||
#include "openvino/op/util/logical_reduction_keep_dims.hpp"
|
||||
#include "openvino/op/util/reduction_base.hpp"
|
||||
#include "openvino/pass/pattern/op/or.hpp"
|
||||
#include "openvino/pass/pattern/op/wrap_type.hpp"
|
||||
|
|
|
|||
|
|
@ -10,8 +10,6 @@
|
|||
#include "itt.hpp"
|
||||
#include "openvino/op/constant.hpp"
|
||||
#include "openvino/op/reshape.hpp"
|
||||
#include "openvino/op/util/arithmetic_reductions_keep_dims.hpp"
|
||||
#include "openvino/op/util/logical_reduction_keep_dims.hpp"
|
||||
#include "openvino/op/util/reduction_base.hpp"
|
||||
#include "openvino/pass/pattern/op/or.hpp"
|
||||
#include "openvino/pass/pattern/op/wrap_type.hpp"
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@
|
|||
#include "openvino/op/constant.hpp"
|
||||
#include "openvino/op/reshape.hpp"
|
||||
#include "openvino/op/transpose.hpp"
|
||||
#include "openvino/op/util/gather_base.hpp"
|
||||
#include "openvino/pass/pattern/op/wrap_type.hpp"
|
||||
#include "transformations/utils/utils.hpp"
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@
|
|||
#include "openvino/op/reshape.hpp"
|
||||
#include "openvino/op/shape_of.hpp"
|
||||
#include "openvino/op/squeeze.hpp"
|
||||
#include "openvino/op/util/binary_elementwise_arithmetic.hpp"
|
||||
#include "openvino/pass/pattern/op/or.hpp"
|
||||
#include "openvino/pass/pattern/op/wrap_type.hpp"
|
||||
#include "transformations/rt_info/strides_property.hpp"
|
||||
|
|
|
|||
|
|
@ -18,9 +18,6 @@
|
|||
#include "openvino/op/squeeze.hpp"
|
||||
#include "openvino/op/transpose.hpp"
|
||||
#include "openvino/op/unsqueeze.hpp"
|
||||
#include "openvino/op/util/arithmetic_reductions_keep_dims.hpp"
|
||||
#include "openvino/op/util/binary_elementwise_arithmetic.hpp"
|
||||
#include "openvino/op/util/logical_reduction_keep_dims.hpp"
|
||||
#include "openvino/pass/pattern/op/wrap_type.hpp"
|
||||
#include "transformations/utils/utils.hpp"
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ ov::pass::FlushFP32SubnormalsToZero::FlushFP32SubnormalsToZero() {
|
|||
if (!has_subnormals)
|
||||
return false;
|
||||
|
||||
auto new_constant = std::make_shared<ov::op::v0::Constant>(ov::element::f32, node->get_shape());
|
||||
auto new_constant = std::make_shared<ov::opset8::Constant>(ov::element::f32, node->get_shape());
|
||||
auto* dst_data = const_cast<float*>(new_constant->get_data_ptr<float>());
|
||||
|
||||
for (size_t i = 0; i < size; ++i) {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@
|
|||
#include "openvino/core/rt_info.hpp"
|
||||
#include "openvino/op/constant.hpp"
|
||||
#include "openvino/op/convert.hpp"
|
||||
#include "openvino/op/nms_rotated.hpp"
|
||||
#include "openvino/op/non_max_suppression.hpp"
|
||||
#include "openvino/op/reshape.hpp"
|
||||
#include "openvino/pass/pattern/op/wrap_type.hpp"
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@
|
|||
#include "openvino/core/validation_util.hpp"
|
||||
#include "openvino/op/add.hpp"
|
||||
#include "openvino/op/broadcast.hpp"
|
||||
#include "openvino/op/concat.hpp"
|
||||
#include "openvino/op/constant.hpp"
|
||||
#include "openvino/op/gather.hpp"
|
||||
#include "openvino/op/gru_cell.hpp"
|
||||
|
|
@ -25,16 +24,12 @@
|
|||
#include "openvino/op/lstm_cell.hpp"
|
||||
#include "openvino/op/lstm_sequence.hpp"
|
||||
#include "openvino/op/parameter.hpp"
|
||||
#include "openvino/op/range.hpp"
|
||||
#include "openvino/op/reshape.hpp"
|
||||
#include "openvino/op/result.hpp"
|
||||
#include "openvino/op/reverse_sequence.hpp"
|
||||
#include "openvino/op/rnn_cell.hpp"
|
||||
#include "openvino/op/rnn_sequence.hpp"
|
||||
#include "openvino/op/scatter_nd_update.hpp"
|
||||
#include "openvino/op/scatter_update.hpp"
|
||||
#include "openvino/op/shape_of.hpp"
|
||||
#include "openvino/op/squeeze.hpp"
|
||||
#include "openvino/op/tensor_iterator.hpp"
|
||||
#include "openvino/op/transpose.hpp"
|
||||
#include "openvino/op/unsqueeze.hpp"
|
||||
|
|
@ -564,12 +559,12 @@ ov::pass::ConvertLoopToLSTMSequence::ConvertLoopToLSTMSequence() {
|
|||
auto sequence_index_or_label =
|
||||
std::make_shared<pattern::op::Or>(OutputVector{sequence_index_label, sequence_index_reshaped_label});
|
||||
auto gather_body_label =
|
||||
pattern::wrap_type<ov::op::v8::Gather>({X_body_label, sequence_index_or_label, gather_axis_label},
|
||||
pattern::rank_equals(2));
|
||||
pattern::wrap_type<opset8::Gather>({X_body_label, sequence_index_or_label, gather_axis_label},
|
||||
pattern::rank_equals(2));
|
||||
auto W_label = pattern::any_input();
|
||||
auto R_label = pattern::any_input();
|
||||
auto B_label = pattern::wrap_type<op::v0::Constant>();
|
||||
auto lstm_cell_label = pattern::wrap_type<ov::op::v4::LSTMCell>(
|
||||
auto lstm_cell_label = pattern::wrap_type<opset4::LSTMCell>(
|
||||
{gather_body_label, H_body_label, C_body_label, W_label, R_label, B_label});
|
||||
auto scatter_index_new_shape_label = pattern::wrap_type<op::v0::Constant>();
|
||||
auto scatter_index_body_label =
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@
|
|||
#include "openvino/op/concat.hpp"
|
||||
#include "openvino/op/constant.hpp"
|
||||
#include "openvino/op/divide.hpp"
|
||||
#include "openvino/op/group_normalization.hpp"
|
||||
#include "openvino/op/multiply.hpp"
|
||||
#include "openvino/op/mvn.hpp"
|
||||
#include "openvino/op/parameter.hpp"
|
||||
|
|
|
|||
|
|
@ -9,11 +9,9 @@
|
|||
#include "openvino/core/validation_util.hpp"
|
||||
#include "openvino/op/concat.hpp"
|
||||
#include "openvino/op/convert.hpp"
|
||||
#include "openvino/op/divide.hpp"
|
||||
#include "openvino/op/matmul.hpp"
|
||||
#include "openvino/op/reshape.hpp"
|
||||
#include "openvino/op/util/binary_elementwise_arithmetic.hpp"
|
||||
#include "openvino/op/util/op_types.hpp"
|
||||
#include "openvino/pass/pattern/op/or.hpp"
|
||||
#include "openvino/pass/pattern/op/wrap_type.hpp"
|
||||
#include "transformations/symbolic_transformations/utils.hpp"
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
#include "compare.hpp"
|
||||
#include "itt.hpp"
|
||||
#include "openvino/core/dimension_tracker.hpp"
|
||||
#include "openvino/op/reshape.hpp"
|
||||
#include "openvino/pass/pattern/op/wrap_type.hpp"
|
||||
#include "transformations/symbolic_transformations/utils.hpp"
|
||||
#include "transformations/utils/utils.hpp"
|
||||
|
|
|
|||
|
|
@ -10,19 +10,12 @@
|
|||
#include <memory>
|
||||
|
||||
#include "openvino/core/validation_util.hpp"
|
||||
#include "openvino/op/add.hpp"
|
||||
#include "openvino/op/broadcast.hpp"
|
||||
#include "openvino/op/constant.hpp"
|
||||
#include "openvino/op/divide.hpp"
|
||||
#include "openvino/op/gather.hpp"
|
||||
#include "openvino/op/multiply.hpp"
|
||||
#include "openvino/op/relu.hpp"
|
||||
#include "openvino/op/reshape.hpp"
|
||||
#include "openvino/op/shape_of.hpp"
|
||||
#include "openvino/op/sigmoid.hpp"
|
||||
#include "openvino/op/subtract.hpp"
|
||||
#include "openvino/op/tanh.hpp"
|
||||
#include "openvino/op/util/shape_of_base.hpp"
|
||||
#include "openvino/opsets/opset1.hpp"
|
||||
#include "openvino/opsets/opset3.hpp"
|
||||
|
||||
namespace ov {
|
||||
namespace op {
|
||||
|
|
@ -157,11 +150,11 @@ bool check_for_broadcast(const ov::PartialShape& ref_shape, const ov::PartialSha
|
|||
|
||||
std::shared_ptr<ov::Node> activation(const std::string& activation_name, const ov::Output<ov::Node>& apply_to) {
|
||||
if (activation_name == "relu") {
|
||||
return std::make_shared<ov::op::v0::Relu>(apply_to);
|
||||
return std::make_shared<opset4::Relu>(apply_to);
|
||||
} else if (activation_name == "sigmoid") {
|
||||
return std::make_shared<ov::op::v0::Sigmoid>(apply_to);
|
||||
return std::make_shared<opset4::Sigmoid>(apply_to);
|
||||
} else if (activation_name == "tanh") {
|
||||
return std::make_shared<ov::op::v0::Tanh>(apply_to);
|
||||
return std::make_shared<opset4::Tanh>(apply_to);
|
||||
} else {
|
||||
OPENVINO_THROW("Unsupported activation function");
|
||||
}
|
||||
|
|
@ -278,22 +271,21 @@ bool shapes_equal_except_dynamic_expected_batch(const ov::PartialShape& expected
|
|||
|
||||
void visit_shape_path(Node* node, std::unordered_set<ov::Node*>& visited, std::function<void(ov::Node*)> func) {
|
||||
auto is_shapeof = [](ov::Node* node) {
|
||||
return ov::is_type<ov::op::v0::ShapeOf>(node) || ov::is_type<ov::op::v3::ShapeOf>(node);
|
||||
return ov::is_type<opset1::ShapeOf>(node) || ov::is_type<opset3::ShapeOf>(node);
|
||||
};
|
||||
visit_path_impl(node, visited, func, is_shapeof);
|
||||
}
|
||||
|
||||
void visit_constant_path(ov::Node* node, std::unordered_set<ov::Node*>& visited, std::function<void(ov::Node*)> func) {
|
||||
auto check_parameter = [](ov::Node* node) {
|
||||
OPENVINO_ASSERT(!ov::is_type<ov::op::v0::Parameter>(node),
|
||||
"visit_constant_path is called for non-constant path.");
|
||||
OPENVINO_ASSERT(!ov::is_type<opset1::Parameter>(node), "visit_constant_path is called for non-constant path.");
|
||||
return false;
|
||||
};
|
||||
visit_path_impl(node, visited, func, check_parameter);
|
||||
}
|
||||
|
||||
bool is_dequantization_subgraph(const Output<Node>& node) {
|
||||
if (!is_type<ov::op::v1::Multiply>(node.get_node())) {
|
||||
if (!is_type<opset8::Multiply>(node.get_node())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -301,9 +293,9 @@ bool is_dequantization_subgraph(const Output<Node>& node) {
|
|||
Node* sub = nullptr;
|
||||
Node* convert = nullptr;
|
||||
|
||||
if (is_type<ov::op::v1::Subtract>(mul_inputs[0].get_node())) {
|
||||
if (is_type<opset8::Subtract>(mul_inputs[0].get_node())) {
|
||||
sub = mul_inputs[0].get_node();
|
||||
} else if (is_type<ov::op::v0::Convert>(mul_inputs[0].get_node())) {
|
||||
} else if (is_type<opset8::Convert>(mul_inputs[0].get_node())) {
|
||||
convert = mul_inputs[0].get_node();
|
||||
} else {
|
||||
return false;
|
||||
|
|
@ -311,7 +303,7 @@ bool is_dequantization_subgraph(const Output<Node>& node) {
|
|||
|
||||
if (sub) {
|
||||
auto sub_inputs = sub->input_values();
|
||||
if (is_type<ov::op::v0::Convert>(sub_inputs[0].get_node())) {
|
||||
if (is_type<opset8::Convert>(sub_inputs[0].get_node())) {
|
||||
convert = sub_inputs[0].get_node();
|
||||
}
|
||||
}
|
||||
|
|
@ -328,8 +320,8 @@ bool is_dequantization_subgraph(const Output<Node>& node) {
|
|||
bool can_eliminate_eltwise_node(const std::shared_ptr<Node>& eltwise,
|
||||
const Output<Node>& constant,
|
||||
const Output<Node>& non_constant_input) {
|
||||
if (!is_type<ov::op::v1::Add>(eltwise) && !is_type<ov::op::v1::Subtract>(eltwise) &&
|
||||
!is_type<ov::op::v1::Multiply>(eltwise) && !is_type<ov::op::v1::Divide>(eltwise)) {
|
||||
if (!is_type<opset8::Add>(eltwise) && !is_type<opset8::Subtract>(eltwise) && !is_type<opset8::Multiply>(eltwise) &&
|
||||
!is_type<opset8::Divide>(eltwise)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -338,7 +330,7 @@ bool can_eliminate_eltwise_node(const std::shared_ptr<Node>& eltwise,
|
|||
}
|
||||
|
||||
// check if constant has a single value with either 0 (for Add, Subtract) or 1 (for Multiply, Divide)
|
||||
auto constant_ptr = std::dynamic_pointer_cast<ov::op::v0::Constant>(constant.get_node_shared_ptr());
|
||||
auto constant_ptr = std::dynamic_pointer_cast<opset8::Constant>(constant.get_node_shared_ptr());
|
||||
if (!constant_ptr) {
|
||||
return false;
|
||||
}
|
||||
|
|
@ -385,7 +377,7 @@ bool can_eliminate_eltwise_node(const std::shared_ptr<Node>& eltwise,
|
|||
return false;
|
||||
}
|
||||
float expected_const = 0;
|
||||
if (is_type<ov::op::v1::Multiply>(eltwise) || is_type<ov::op::v1::Divide>(eltwise)) {
|
||||
if (is_type<opset8::Multiply>(eltwise) || is_type<opset8::Divide>(eltwise)) {
|
||||
expected_const = 1;
|
||||
}
|
||||
if (actual_const != expected_const) {
|
||||
|
|
|
|||
|
|
@ -7,11 +7,7 @@
|
|||
#include <gtest/gtest.h>
|
||||
|
||||
#include "common_test_utils/ov_test_utils.hpp"
|
||||
#include "openvino/op/add.hpp"
|
||||
#include "openvino/op/concat.hpp"
|
||||
#include "openvino/op/multiply.hpp"
|
||||
#include "openvino/op/parameter.hpp"
|
||||
#include "openvino/op/split.hpp"
|
||||
#include "openvino/op/variadic_split.hpp"
|
||||
#include "ov_ops/rotary_positional_embeddings.hpp"
|
||||
#include "transformations/utils/utils.hpp"
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@
|
|||
#include "openvino/op/constant.hpp"
|
||||
#include "openvino/op/divide.hpp"
|
||||
#include "openvino/op/erf.hpp"
|
||||
#include "openvino/op/gelu.hpp"
|
||||
#include "openvino/op/multiply.hpp"
|
||||
#include "openvino/op/parameter.hpp"
|
||||
#include "openvino/op/power.hpp"
|
||||
|
|
|
|||
|
|
@ -16,11 +16,8 @@
|
|||
#include "common_test_utils/ov_test_utils.hpp"
|
||||
#include "common_test_utils/test_common.hpp"
|
||||
#include "openvino/core/model.hpp"
|
||||
#include "openvino/op/convert.hpp"
|
||||
#include "openvino/opsets/opset1.hpp"
|
||||
#include "openvino/opsets/opset10.hpp"
|
||||
#include "openvino/opsets/opset4.hpp"
|
||||
#include "openvino/opsets/opset8.hpp"
|
||||
#include "openvino/opsets/opset9.hpp"
|
||||
#include "openvino/pass/constant_folding.hpp"
|
||||
#include "openvino/pass/manager.hpp"
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
#include <gtest/gtest.h>
|
||||
|
||||
#include "common_test_utils/ov_test_utils.hpp"
|
||||
#include "openvino/opsets/opset8.hpp"
|
||||
#include "transformations/low_precision/mark_dequantization_subgraph.hpp"
|
||||
#include "transformations/utils/utils.hpp"
|
||||
|
||||
|
|
|
|||
|
|
@ -10,14 +10,9 @@
|
|||
#include "openvino/core/dimension_tracker.hpp"
|
||||
#include "openvino/core/model.hpp"
|
||||
#include "openvino/core/validation_util.hpp"
|
||||
#include "openvino/op/add.hpp"
|
||||
#include "openvino/op/concat.hpp"
|
||||
#include "openvino/op/divide.hpp"
|
||||
#include "openvino/op/matmul.hpp"
|
||||
#include "openvino/op/multiply.hpp"
|
||||
#include "openvino/op/parameter.hpp"
|
||||
#include "openvino/op/reshape.hpp"
|
||||
#include "openvino/op/util/op_types.hpp"
|
||||
#include "transformations/utils/utils.hpp"
|
||||
|
||||
using namespace ov;
|
||||
|
|
|
|||
|
|
@ -10,8 +10,6 @@
|
|||
#include <string>
|
||||
|
||||
#include "common_test_utils/ov_test_utils.hpp"
|
||||
#include "openvino/op/add.hpp"
|
||||
#include "openvino/op/transpose.hpp"
|
||||
#include "transformations/rt_info/transpose_sinking_attr.hpp"
|
||||
#include "transformations/utils/utils.hpp"
|
||||
|
||||
|
|
@ -20,16 +18,17 @@ using namespace std;
|
|||
using namespace ov;
|
||||
|
||||
using namespace op::v0;
|
||||
using namespace op::v1;
|
||||
|
||||
TEST(TransformationTests, ResetNoSinkingAttribute) {
|
||||
auto a = std::make_shared<Parameter>(element::f32, Shape{12, 3, 4, 8});
|
||||
auto b = std::make_shared<Parameter>(element::f32, Shape{12, 3, 4, 8});
|
||||
|
||||
auto transpose_a = make_shared<op::v1::Transpose>(a, Constant::create(element::i64, Shape{4}, {1, 0, 2, 3}));
|
||||
auto transpose_b = make_shared<op::v1::Transpose>(b, Constant::create(element::i64, Shape{4}, {1, 0, 2, 3}));
|
||||
auto transpose_a = make_shared<Transpose>(a, Constant::create(element::i64, Shape{4}, {1, 0, 2, 3}));
|
||||
auto transpose_b = make_shared<Transpose>(b, Constant::create(element::i64, Shape{4}, {1, 0, 2, 3}));
|
||||
|
||||
auto add = std::make_shared<op::v1::Add>(transpose_a, transpose_b);
|
||||
auto trans_after = make_shared<op::v1::Transpose>(add, Constant::create(element::i64, Shape{4}, {1, 0, 2, 3}));
|
||||
auto add = std::make_shared<Add>(transpose_a, transpose_b);
|
||||
auto trans_after = make_shared<Transpose>(add, Constant::create(element::i64, Shape{4}, {1, 0, 2, 3}));
|
||||
auto model = std::make_shared<Model>(NodeVector{trans_after}, ParameterVector{a, b});
|
||||
|
||||
mark_as_no_sinking_node(transpose_a);
|
||||
|
|
|
|||
|
|
@ -10,61 +10,12 @@
|
|||
#include "common_test_utils/ov_test_utils.hpp"
|
||||
#include "common_test_utils/test_tools.hpp"
|
||||
#include "openvino/core/constant_fold_utils.hpp"
|
||||
#include "openvino/op/abs.hpp"
|
||||
#include "openvino/op/acosh.hpp"
|
||||
#include "openvino/op/add.hpp"
|
||||
#include "openvino/op/asinh.hpp"
|
||||
#include "openvino/op/atanh.hpp"
|
||||
#include "openvino/op/broadcast.hpp"
|
||||
#include "openvino/op/ceiling.hpp"
|
||||
#include "openvino/op/concat.hpp"
|
||||
#include "openvino/op/constant.hpp"
|
||||
#include "openvino/op/convert_like.hpp"
|
||||
#include "openvino/op/divide.hpp"
|
||||
#include "openvino/op/equal.hpp"
|
||||
#include "openvino/op/floor.hpp"
|
||||
#include "openvino/op/gather.hpp"
|
||||
#include "openvino/op/greater.hpp"
|
||||
#include "openvino/op/greater_eq.hpp"
|
||||
#include "openvino/op/interpolate.hpp"
|
||||
#include "openvino/op/less.hpp"
|
||||
#include "openvino/op/less_eq.hpp"
|
||||
#include "openvino/op/logical_not.hpp"
|
||||
#include "openvino/op/logical_or.hpp"
|
||||
#include "openvino/op/loop.hpp"
|
||||
#include "openvino/op/maximum.hpp"
|
||||
#include "openvino/op/minimum.hpp"
|
||||
#include "openvino/op/multiply.hpp"
|
||||
#include "openvino/op/negative.hpp"
|
||||
#include "openvino/op/non_zero.hpp"
|
||||
#include "openvino/op/not_equal.hpp"
|
||||
#include "openvino/op/one_hot.hpp"
|
||||
#include "openvino/op/power.hpp"
|
||||
#include "openvino/op/range.hpp"
|
||||
#include "openvino/op/reduce_logical_and.hpp"
|
||||
#include "openvino/op/reduce_logical_or.hpp"
|
||||
#include "openvino/op/reduce_max.hpp"
|
||||
#include "openvino/op/reduce_mean.hpp"
|
||||
#include "openvino/op/reduce_min.hpp"
|
||||
#include "openvino/op/reduce_prod.hpp"
|
||||
#include "openvino/op/reduce_sum.hpp"
|
||||
#include "openvino/op/relu.hpp"
|
||||
#include "openvino/op/reshape.hpp"
|
||||
#include "openvino/op/reverse.hpp"
|
||||
#include "openvino/op/scatter_elements_update.hpp"
|
||||
#include "openvino/op/select.hpp"
|
||||
#include "openvino/op/shape_of.hpp"
|
||||
#include "openvino/op/split.hpp"
|
||||
#include "openvino/op/sqrt.hpp"
|
||||
#include "openvino/op/squared_difference.hpp"
|
||||
#include "openvino/op/squeeze.hpp"
|
||||
#include "openvino/op/strided_slice.hpp"
|
||||
#include "openvino/op/subtract.hpp"
|
||||
#include "openvino/op/tile.hpp"
|
||||
#include "openvino/op/transpose.hpp"
|
||||
#include "openvino/op/unsqueeze.hpp"
|
||||
#include "openvino/op/variadic_split.hpp"
|
||||
#include "openvino/op/xor.hpp"
|
||||
#include "transformations/common_optimizations/disable_shapeof_constant_folding.hpp"
|
||||
#include "transformations/utils/utils.hpp"
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
#include "helper_ops/sparse_fill_empty_rows.hpp"
|
||||
#include "helper_ops/sparse_segment_ops.hpp"
|
||||
#include "openvino/op/broadcast.hpp"
|
||||
#include "openvino/op/concat.hpp"
|
||||
#include "openvino/op/constant.hpp"
|
||||
#include "openvino/op/convert.hpp"
|
||||
#include "openvino/op/embedding_segments_sum.hpp"
|
||||
|
|
@ -18,8 +17,6 @@
|
|||
#include "openvino/op/greater_eq.hpp"
|
||||
#include "openvino/op/non_zero.hpp"
|
||||
#include "openvino/op/reshape.hpp"
|
||||
#include "openvino/op/select.hpp"
|
||||
#include "openvino/op/shape_of.hpp"
|
||||
#include "openvino/op/split.hpp"
|
||||
#include "openvino/op/squeeze.hpp"
|
||||
#include "openvino/op/strided_slice.hpp"
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@
|
|||
#include "openvino/op/constant.hpp"
|
||||
#include "openvino/op/gru_cell.hpp"
|
||||
#include "openvino/op/shape_of.hpp"
|
||||
#include "openvino/op/slice.hpp"
|
||||
#include "openvino/op/split.hpp"
|
||||
#include "openvino/op/transpose.hpp"
|
||||
#include "openvino/op/variadic_split.hpp"
|
||||
|
|
|
|||
|
|
@ -22,9 +22,6 @@
|
|||
#include "cumulative_compiled_model.hpp"
|
||||
#include "cumulative_schedule.hpp"
|
||||
#include "itt.hpp"
|
||||
#include "openvino/op/fake_quantize.hpp"
|
||||
#include "openvino/op/convolution.hpp"
|
||||
#include "openvino/op/group_conv.hpp"
|
||||
|
||||
namespace {
|
||||
const std::string get_model_precision(const std::shared_ptr<const ov::Model> &model) {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#include <common_test_utils/common_utils.hpp>
|
||||
#include <thread>
|
||||
#include "openvino/op/non_max_suppression.hpp"
|
||||
|
||||
#include "include/auto_unit_test.hpp"
|
||||
|
||||
using DynamicOutputConfigParams = std::tuple<
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@
|
|||
#include "openvino/runtime/threading/istreams_executor.hpp"
|
||||
#include "transformations/utils.hpp"
|
||||
#include "transformations/utils/utils.hpp"
|
||||
#include "openvino/op/fake_quantize.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdio>
|
||||
|
|
|
|||
|
|
@ -19,12 +19,6 @@
|
|||
#include "ov_ops/augru_sequence.hpp"
|
||||
|
||||
#include "openvino/core/node.hpp"
|
||||
#include "openvino/op/lstm_sequence.hpp"
|
||||
#include "openvino/op/rnn_sequence.hpp"
|
||||
#include "openvino/op/gru_sequence.hpp"
|
||||
#include "openvino/op/gru_cell.hpp"
|
||||
#include "openvino/op/rnn_cell.hpp"
|
||||
#include "openvino/op/lstm_cell.hpp"
|
||||
|
||||
#include <oneapi/dnnl/dnnl.hpp>
|
||||
#include <string>
|
||||
|
|
|
|||
|
|
@ -13,8 +13,6 @@
|
|||
#include <memory_desc/cpu_memory_desc_utils.h>
|
||||
#include "utils/ngraph_utils.hpp"
|
||||
#include <partitioned_mem_mgr.h>
|
||||
#include "openvino/op/split.hpp"
|
||||
#include "openvino/op/variadic_split.hpp"
|
||||
|
||||
#define THROW_ERROR(...) OPENVINO_THROW("Split layer with name '", getName(), "' ", __VA_ARGS__)
|
||||
|
||||
|
|
|
|||
|
|
@ -11,8 +11,6 @@
|
|||
#include "transformations/utils/utils.hpp"
|
||||
#include "utils/general_utils.h"
|
||||
#include "utils/debug_capabilities.h"
|
||||
#include "openvino/op/tensor_iterator.hpp"
|
||||
#include "openvino/op/loop.hpp"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
#include "utils.hpp"
|
||||
#include "openvino/opsets/opset1.hpp"
|
||||
#include "openvino/op/gather.hpp"
|
||||
#include "cpu_opset/common/op/fully_connected.hpp"
|
||||
#include "transformations/rt_info/dequantization_node.hpp"
|
||||
#include "transformations/utils/utils.hpp"
|
||||
|
|
@ -55,7 +54,7 @@ bool has_matmul_with_compressed_weights(const std::shared_ptr<const ov::Model>&
|
|||
// \ / /
|
||||
// Gather
|
||||
bool is_gather_with_compressed_weights(const std::shared_ptr<const ov::Node>& node) {
|
||||
if (!ov::is_type<ov::op::v8::Gather>(node)) {
|
||||
if (!ov::is_type<ov::opset8::Gather>(node)) {
|
||||
return false;
|
||||
}
|
||||
if (node->get_input_size() != 3) {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
#pragma once
|
||||
|
||||
#include <cassert>
|
||||
#include "openvino/op/util/op_types.hpp"
|
||||
#include <transformations/utils/utils.hpp>
|
||||
|
||||
#include "transformations/rt_info/primitives_priority_attribute.hpp"
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@
|
|||
#include <openvino/opsets/opset1.hpp>
|
||||
#include <openvino/opsets/opset3.hpp>
|
||||
#include <openvino/opsets/opset7.hpp>
|
||||
#include <openvino/opsets/opset8.hpp>
|
||||
#include <transformations/cpu_opset/arm/pass/convert_group_conv.hpp>
|
||||
#include <transformations/init_node_info.hpp>
|
||||
#include <transformations/utils/utils.hpp>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@
|
|||
#include <openvino/opsets/opset1.hpp>
|
||||
#include <openvino/opsets/opset3.hpp>
|
||||
#include <openvino/opsets/opset7.hpp>
|
||||
#include <openvino/opsets/opset8.hpp>
|
||||
#include <transformations/cpu_opset/arm/pass/convert_group_conv1d.hpp>
|
||||
#include <transformations/init_node_info.hpp>
|
||||
#include <transformations/utils/utils.hpp>
|
||||
|
|
|
|||
|
|
@ -29,11 +29,6 @@
|
|||
#include "intel_gpu/primitives/eltwise.hpp"
|
||||
#include "intel_gpu/primitives/reorder.hpp"
|
||||
#include "intel_gpu/primitives/reshape.hpp"
|
||||
#include "openvino/op/logical_xor.hpp"
|
||||
#include "openvino/op/mod.hpp"
|
||||
#include "openvino/op/is_inf.hpp"
|
||||
#include "openvino/op/is_nan.hpp"
|
||||
#include "openvino/op/is_finite.hpp"
|
||||
|
||||
namespace ov {
|
||||
namespace intel_gpu {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
#include "openvino/op/tensor_iterator.hpp"
|
||||
#include "openvino/op/loop.hpp"
|
||||
#include "openvino/op/add.hpp"
|
||||
#include "openvino/op/constant.hpp"
|
||||
#include "openvino/op/util/sub_graph_base.hpp"
|
||||
#include "transformations/utils/utils.hpp"
|
||||
|
|
|
|||
|
|
@ -9,8 +9,6 @@
|
|||
#include "openvino/op/elu.hpp"
|
||||
#include "openvino/op/sigmoid.hpp"
|
||||
#include "openvino/op/relu.hpp"
|
||||
#include "openvino/op/sqrt.hpp"
|
||||
#include "openvino/op/softsign.hpp"
|
||||
#include "openvino/op/prelu.hpp"
|
||||
#include "openvino/op/clamp.hpp"
|
||||
#include "openvino/op/exp.hpp"
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@
|
|||
#include "openvino/pass/pattern/op/wrap_type.hpp"
|
||||
#include "openvino/pass/pattern/op/or.hpp"
|
||||
#include "transformations/utils/utils.hpp"
|
||||
#include "openvino/op/multiply.hpp"
|
||||
|
||||
namespace ov {
|
||||
namespace intel_gpu {
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@
|
|||
#include "intel_gpu/plugin/common_utils.hpp"
|
||||
|
||||
#include "openvino/core/graph_util.hpp"
|
||||
#include "openvino/op/util/op_types.hpp"
|
||||
#include "openvino/core/node_vector.hpp"
|
||||
#include "openvino/core/rt_info.hpp"
|
||||
#include "openvino/op/gather.hpp"
|
||||
|
|
|
|||
|
|
@ -22,8 +22,6 @@
|
|||
#include "openvino/pass/pattern/op/or.hpp"
|
||||
#include "openvino/pass/visualize_tree.hpp"
|
||||
#include "transformations/utils/utils.hpp"
|
||||
#include "openvino/op/concat.hpp"
|
||||
#include "openvino/op/gather.hpp"
|
||||
|
||||
namespace ov {
|
||||
namespace intel_gpu {
|
||||
|
|
|
|||
|
|
@ -20,8 +20,6 @@
|
|||
#include <transformations/utils/utils.hpp>
|
||||
|
||||
#include "common_test_utils/ov_test_utils.hpp"
|
||||
#include "openvino/op/matmul.hpp"
|
||||
#include "openvino/op/softmax.hpp"
|
||||
|
||||
using namespace testing;
|
||||
using namespace ov::intel_gpu;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@
|
|||
#include "common_test_utils/ov_test_utils.hpp"
|
||||
#include "openvino/core/coordinate_diff.hpp"
|
||||
#include "openvino/core/type/element_type.hpp"
|
||||
#include "openvino/op/pad.hpp"
|
||||
|
||||
using namespace testing;
|
||||
using namespace ov::intel_gpu;
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@
|
|||
#include "openvino/core/node_vector.hpp"
|
||||
#include "openvino/core/partial_shape.hpp"
|
||||
#include "openvino/op/parameter.hpp"
|
||||
#include "openvino/op/gather.hpp"
|
||||
#include "openvino/op/result.hpp"
|
||||
#include "openvino/pass/manager.hpp"
|
||||
|
||||
|
|
|
|||
|
|
@ -19,10 +19,8 @@
|
|||
#include "openvino/core/partial_shape.hpp"
|
||||
#include "openvino/op/parameter.hpp"
|
||||
#include "openvino/op/result.hpp"
|
||||
#include "openvino/op/concat.hpp"
|
||||
#include "openvino/op/sink.hpp"
|
||||
#include "intel_gpu/op/kv_cache.hpp"
|
||||
#include "openvino/op/gather.hpp"
|
||||
|
||||
using namespace testing;
|
||||
using namespace ov::intel_gpu;
|
||||
|
|
|
|||
|
|
@ -509,7 +509,7 @@ std::shared_ptr<ov::Model> MHAWOTransposeOnInputsFunction::initOriginal() const
|
|||
const auto mulConst = ov::test::utils::deprecated::make_constant(precision, ov::Shape({1}), std::vector<float>{1}, true);
|
||||
const auto mul = std::make_shared<ov::op::v1::Multiply>(param1, mulConst);
|
||||
const auto matMul0 = std::make_shared<ov::op::v0::MatMul>(param0, mul, transA, transB);
|
||||
const auto softmax = std::make_shared<ov::op::v8::Softmax>(matMul0, -1);
|
||||
const auto softmax = std::make_shared<ov::opset8::Softmax>(matMul0, -1);
|
||||
const auto matMul1 = std::make_shared<ov::op::v0::MatMul>(softmax, param2, transA, transB);
|
||||
const auto transpose3 = std::make_shared<ov::op::v1::Transpose>(matMul1, transpose3Const);
|
||||
|
||||
|
|
@ -526,7 +526,7 @@ std::shared_ptr<ov::Model> MHAWOTransposeFunction::initOriginal() const {
|
|||
float transA = false;
|
||||
float transB = false;
|
||||
const auto matMul0 = std::make_shared<ov::op::v0::MatMul>(param0, param1, transA, transB);
|
||||
const auto softmax = std::make_shared<ov::op::v8::Softmax>(matMul0, -1);
|
||||
const auto softmax = std::make_shared<ov::opset8::Softmax>(matMul0, -1);
|
||||
const auto matMul1 = std::make_shared<ov::op::v0::MatMul>(softmax, param2, transA, transB);
|
||||
|
||||
ov::ResultVector results{std::make_shared<ov::opset1::Result>(matMul1)};
|
||||
|
|
@ -553,7 +553,7 @@ std::shared_ptr<ov::Model> MHAWOTransposeSplitMFunction::initReference() const {
|
|||
auto data2 = std::make_shared<ov::opset1::Parameter>(precisions[2], reshape2->get_shape());
|
||||
|
||||
const auto matMul0 = std::make_shared<ov::op::v0::MatMul>(data0, data1);
|
||||
const auto softmax = std::make_shared<ov::op::v8::Softmax>(matMul0, -1);
|
||||
const auto softmax = std::make_shared<ov::opset8::Softmax>(matMul0, -1);
|
||||
const auto matMul1 = std::make_shared<ov::op::v0::MatMul>(softmax, data2);
|
||||
|
||||
const auto subgraph = std::make_shared<ov::snippets::op::Subgraph>(ov::NodeVector{reshape0, reshape1, reshape2},
|
||||
|
|
@ -698,7 +698,7 @@ std::shared_ptr<ov::Model> MHAQuantMatMul0Function::initOriginal() const {
|
|||
|
||||
const auto matMul0 = std::make_shared<ov::op::v0::MatMul>(transpose0, fq1);
|
||||
const auto add = std::make_shared<ov::op::v1::Add>(matMul0, addParam);
|
||||
const auto softMax = std::make_shared<ov::op::v8::Softmax>(add, -1);
|
||||
const auto softMax = std::make_shared<ov::opset8::Softmax>(add, -1);
|
||||
|
||||
const auto matMul1 = std::make_shared<ov::op::v0::MatMul>(softMax, transpose2);
|
||||
auto fq2 = ov::test::utils::make_fake_quantize(matMul1, ov::element::f32, 256, {1},
|
||||
|
|
@ -950,7 +950,7 @@ std::shared_ptr<ov::Model> MHATransposedInputFunction::initOriginal() const {
|
|||
}
|
||||
|
||||
const auto matMul0 = std::make_shared<ov::op::v0::MatMul>(param0, matmul0_in1, false, m_transposed_b);
|
||||
const auto softmax = std::make_shared<ov::op::v8::Softmax>(matMul0, -1);
|
||||
const auto softmax = std::make_shared<ov::opset8::Softmax>(matMul0, -1);
|
||||
const auto matMul1 = std::make_shared<ov::op::v0::MatMul>(softmax, param2);
|
||||
|
||||
ov::ResultVector results{std::make_shared<ov::opset1::Result>(matMul1)};
|
||||
|
|
@ -993,7 +993,7 @@ std::shared_ptr<ov::Model> MHATransposedInputFunction::initReference() const {
|
|||
}
|
||||
|
||||
const auto matMul0 = std::make_shared<ov::op::v0::MatMul>(param0, matmul0_in1);
|
||||
const auto softmax = std::make_shared<ov::op::v8::Softmax>(matMul0, -1);
|
||||
const auto softmax = std::make_shared<ov::opset8::Softmax>(matMul0, -1);
|
||||
const auto matMul1 = std::make_shared<ov::op::v0::MatMul>(softmax, param2);
|
||||
|
||||
auto subgraph = std::make_shared<ov::snippets::op::Subgraph>(ov::NodeVector{data0, in1, data2},
|
||||
|
|
@ -1036,7 +1036,7 @@ std::shared_ptr<ov::Model> MHAWithExtractedReshapeFunction::initOriginal() const
|
|||
const auto target_shape_const_2 = ov::opset1::Constant::create(ov::element::i32, ov::Shape{mm_out_shape.size()}, mm_out_shape);
|
||||
const auto reshape_2 = std::make_shared<ov::opset1::Reshape>(add_2, target_shape_const_2, false);
|
||||
|
||||
const auto softmax = std::make_shared<ov::op::v8::Softmax>(reshape_2, -1);
|
||||
const auto softmax = std::make_shared<ov::opset8::Softmax>(reshape_2, -1);
|
||||
const auto matmul_1 = std::make_shared<ov::opset1::MatMul>(softmax, param_4);
|
||||
|
||||
ov::ResultVector results{std::make_shared<ov::opset1::Result>(matmul_1)};
|
||||
|
|
@ -1074,7 +1074,7 @@ std::shared_ptr<ov::Model> MHAWithExtractedReshapeFunction::initReference() cons
|
|||
|
||||
const auto matmul_0 = std::make_shared<ov::op::v0::MatMul>(param_0, param_1);
|
||||
const auto add_internal = std::make_shared<ov::opset1::Add>(matmul_0, param_2);
|
||||
const auto softmax = std::make_shared<ov::op::v8::Softmax>(add_internal, -1);
|
||||
const auto softmax = std::make_shared<ov::opset8::Softmax>(add_internal, -1);
|
||||
const auto matmul_1 = std::make_shared<ov::op::v0::MatMul>(softmax, param_3);
|
||||
|
||||
auto subgraph_model = std::make_shared<ov::Model>(NodeVector{matmul_1}, ov::ParameterVector{param_0, param_1, param_2, param_3});
|
||||
|
|
|
|||
Loading…
Reference in New Issue