Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
olpipi committed Oct 25, 2022
1 parent 7482679 commit f51ddbe
Show file tree
Hide file tree
Showing 13 changed files with 90 additions and 3,766 deletions.
1 change: 0 additions & 1 deletion src/core/tests/visitors/op/concat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// SPDX-License-Identifier: Apache-2.0
//


#include "gtest/gtest.h"
#include "ngraph/ngraph.hpp"
#include "ngraph/op/util/attr_types.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/core/tests/visitors/op/mish.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ TEST(attributes, mish_op) {
const auto A = make_shared<op::Parameter>(element::f32, Shape{5, 2});

const auto mish = make_shared<opset4::Mish>(A);
NodeBuilder builder(mish,{A});
NodeBuilder builder(mish, {A});
EXPECT_NO_THROW(auto g_mish = ov::as_type_ptr<opset4::Mish>(builder.create()));

const auto expected_attr_count = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/core/tests/visitors/op/split.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ TEST(attributes, split_op) {
auto axis = make_shared<op::Parameter>(element::i32, Shape{});
auto num_splits = 2;
auto split = make_shared<opset1::Split>(data, axis, num_splits);
NodeBuilder builder(split,{data, axis});
NodeBuilder builder(split, {data, axis});
auto g_split = ov::as_type_ptr<opset1::Split>(builder.create());

EXPECT_EQ(g_split->get_num_splits(), split->get_num_splits());
Expand Down
70 changes: 67 additions & 3 deletions src/frontends/ir/tests/frontend_test_basic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1063,7 +1063,7 @@ TEST_F(IRFrontendTests, extension_proposal_network) {
FAIL() << "Custom proposal layer is not an opset6 operation.";
}

TEST_F(IRFrontendTests, ReadModelWithTensorNamesWithSpaces) {
TEST_F(IRFrontendTests, model_with_tensor_names_with_spaces) {
std::string testModel = R"V0G0N(
<net name="graph" version="11">
<layers>
Expand Down Expand Up @@ -1126,7 +1126,6 @@ TEST_F(IRFrontendTests, ReadModelWithTensorNamesWithSpaces) {
</edges>
</net>
)V0G0N";


std::shared_ptr<ov::Model> model;

Expand All @@ -1141,7 +1140,7 @@ TEST_F(IRFrontendTests, ReadModelWithTensorNamesWithSpaces) {
EXPECT_NE(it, names.end());
}

TEST_F(IRFrontendTests, ReadModelWithTensorNamesAddOutput) {
TEST_F(IRFrontendTests, model_with_tensor_names_add_output) {
std::string testModel = R"V0G0N(
<net name="graph" version="11">
<layers>
Expand Down Expand Up @@ -1238,3 +1237,68 @@ TEST_F(IRFrontendTests, ReadModelWithTensorNamesAddOutput) {
auto it = names.find(tensor_name);
EXPECT_NE(it, names.end());
}

TEST_F(IRFrontendTests, name_with_comma) {
std::string testModel = R"V0G0N(
<net name="Network" version="10">
<layers>
<layer name="in1" type="Parameter" id="0" version="opset1">
<data element_type="f32" shape="1,3,22,22"/>
<output>
<port id="0" precision="FP32" names="input">
<dim>1</dim>
<dim>3</dim>
<dim>22</dim>
<dim>22</dim>
</port>
</output>
</layer>
<layer name="activation" id="1" type="ReLU" version="opset1">
<input>
<port id="1" precision="FP32">
<dim>1</dim>
<dim>3</dim>
<dim>22</dim>
<dim>22</dim>
</port>
</input>
<output>
<port id="2" precision="FP32" names="relu\,t, identity_t">
<dim>1</dim>
<dim>3</dim>
<dim>22</dim>
<dim>22</dim>
</port>
</output>
</layer>
<layer name="output" type="Result" id="2" version="opset1">
<input>
<port id="0" precision="FP32">
<dim>1</dim>
<dim>3</dim>
<dim>22</dim>
<dim>22</dim>
</port>
</input>
</layer>
</layers>
<edges>
<edge from-layer="0" from-port="0" to-layer="1" to-port="1"/>
<edge from-layer="1" from-port="2" to-layer="2" to-port="0"/>
</edges>
</net>
)V0G0N";

std::shared_ptr<ov::Model> model;
std::string tensor_name = "relu,t";

ASSERT_NO_THROW(model = core.read_model(testModel, ov::Tensor()));
ASSERT_TRUE(!!model);

model->add_output(tensor_name);
auto outputs = model->outputs();
EXPECT_EQ(outputs.size(), 1);
auto names = outputs.at(0).get_names();
auto it = names.find(tensor_name);
EXPECT_NE(it, names.end());
}
1 change: 0 additions & 1 deletion src/frontends/ir/tests/tensor_iterator_deserialization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,6 @@ TEST_F(IRFrontendTestsTensorIterator, loop_external_port1_is_not_connected) {
ASSERT_TRUE(!!model);
}


TEST_F(IRFrontendTestsTensorIterator, tensor_iterator_resnet_opset4) {
std::string xmlModel = R"V0G0N(
<net name="Resnet" version="10">
Expand Down
1 change: 0 additions & 1 deletion src/tests/functional/inference_engine/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ ie_faster_build(${TARGET_NAME}

file(GLOB_RECURSE legacy_tests
"${CMAKE_CURRENT_SOURCE_DIR}/transformations/legacy/*.cpp" # CVS-55385
"${CMAKE_CURRENT_SOURCE_DIR}/ngraph_reader/*.cpp" # CVS-55365
"${CMAKE_CURRENT_SOURCE_DIR}/cnn_network/cnn_ngraph_impl_tests.cpp" # CVS-55375
)

Expand Down
Loading

0 comments on commit f51ddbe

Please sign in to comment.