From 38f4dcf9de0f95f454bc102c28a3a34d3ab3205d Mon Sep 17 00:00:00 2001 From: Xiuchuan Zhai Date: Mon, 28 Aug 2023 19:05:14 +0800 Subject: [PATCH] rebase to master. fix coding style --- src/frontends/paddle/src/op_table.cpp | 8 -------- src/frontends/paddle/tests/convert_unsupported.cpp | 3 ++- .../paddle/tests/test_models/gen_scripts/generate_cos.py | 2 +- .../paddle/tests/test_models/gen_scripts/generate_sin.py | 2 +- 4 files changed, 4 insertions(+), 11 deletions(-) diff --git a/src/frontends/paddle/src/op_table.cpp b/src/frontends/paddle/src/op_table.cpp index 3ad92820b50299..e3e39ebf2e4ec9 100644 --- a/src/frontends/paddle/src/op_table.cpp +++ b/src/frontends/paddle/src/op_table.cpp @@ -102,8 +102,6 @@ OP_CONVERTER(share_data); OP_CONVERTER(sigmoid); OP_CONVERTER(silu); OP_CONVERTER(sin); -OP_CONVERTER(sigmoid); -OP_CONVERTER(silu); OP_CONVERTER(slice); OP_CONVERTER(softmax); OP_CONVERTER(softplus); @@ -228,16 +226,10 @@ std::map get_supported_ops() { {"select_input", op::select_input}, {"set_value", op::set_value}, {"shape", op::shape}, -<<<<<<< HEAD {"share_data", op::share_data}, {"sigmoid", op::sigmoid}, {"silu", op::silu}, -||||||| parent of 794e619351 (- enable cos) -======= - {"sigmoid", op::sigmoid}, - {"silu", op::silu}, {"sin", op::sin}, ->>>>>>> 794e619351 (- enable cos) {"slice", op::slice}, {"softmax", op::softmax}, {"softplus", op::softplus}, diff --git a/src/frontends/paddle/tests/convert_unsupported.cpp b/src/frontends/paddle/tests/convert_unsupported.cpp index d764167250eac1..e0a6c01667d716 100644 --- a/src/frontends/paddle/tests/convert_unsupported.cpp +++ b/src/frontends/paddle/tests/convert_unsupported.cpp @@ -8,6 +8,7 @@ #include "common_test_utils/ngraph_test_utils.hpp" #include "paddle_utils.hpp" #include "utils.hpp" +#include "openvino/opsets/opset6.hpp" using namespace ngraph; using namespace ov::frontend; @@ -32,7 +33,7 @@ TEST(FrontEndConvertModelTest, test_unsupported_op) { for (auto& node : function->get_ordered_ops()) { if (node->get_friendly_name() == "rxyz_0.tmp_0") { - function->replace_node(node, std::make_shared(node->input(0).get_source_output())); + function->replace_node(node, std::make_shared(node->input(0).get_source_output())); } } ASSERT_NO_THROW(frontEnd->convert(function)); diff --git a/src/frontends/paddle/tests/test_models/gen_scripts/generate_cos.py b/src/frontends/paddle/tests/test_models/gen_scripts/generate_cos.py index 2f97645051cb83..a8dad71f5ce225 100644 --- a/src/frontends/paddle/tests/test_models/gen_scripts/generate_cos.py +++ b/src/frontends/paddle/tests/test_models/gen_scripts/generate_cos.py @@ -32,7 +32,7 @@ def cos(name:str, x): return outs[0] def main(): - x = np.random.uniform((-1000,1000), 8, 24, 32).astype(data_type) + x = np.random.uniform(-1000,1000, (8, 24, 32)).astype(data_type) cos("cos", x) diff --git a/src/frontends/paddle/tests/test_models/gen_scripts/generate_sin.py b/src/frontends/paddle/tests/test_models/gen_scripts/generate_sin.py index f90626ab5265c1..e83405a6c7940d 100644 --- a/src/frontends/paddle/tests/test_models/gen_scripts/generate_sin.py +++ b/src/frontends/paddle/tests/test_models/gen_scripts/generate_sin.py @@ -32,7 +32,7 @@ def sin(name:str, x): return outs[0] def main(): - x = np.random.uniform((-1000,1000), 8, 24, 32).astype(data_type) + x = np.random.uniform(-1000,1000, (8, 24, 32)).astype(data_type) sin("sin", x)