Rename CommonTestUtils namespace (#18590)

* Rename CommonTestUtils namespace 1

* Rename CommonTestUtils namespace 2

* Rename CommonTestUtils namespace 3

* Rename CommonTestUtils namespace 4

* Fix1

* Fix2

* Fix3

* Apply comments

* Fix4

* Fix5
This commit is contained in:
Oleg Pipikin 2023-07-26 21:06:50 +02:00 committed by GitHub
parent 2655512b2f
commit ff0b51f3ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1302 changed files with 6585 additions and 6433 deletions

View File

@ -22,7 +22,7 @@ std::string generate_test_xml_file() {
plugin_xml_file << "<ie>\n";
plugin_xml_file << " <plugins>\n";
plugin_xml_file << " <plugin location=\"";
plugin_xml_file << CommonTestUtils::getExecutableDirectory();
plugin_xml_file << ov::test::utils::getExecutableDirectory();
plugin_xml_file << ov::util::FileTraits<char>::file_separator;
plugin_xml_file << ov::util::FileTraits<char>::library_prefix();
plugin_xml_file << "mock_engine";

View File

@ -29,17 +29,17 @@ std::string CanonicalizationTests::getTestCaseName(testing::TestParamInfo<canoni
for (size_t i = 0; i < inputs.size(); i++) {
const auto& blockedshape = std::get<1>(inputs[i]);
// input shape
result << "IS[" << i << "]=" << CommonTestUtils::vec2str(std::get<0>(inputs[i])) << "_";
result << "IS[" << i << "]=" << ov::test::utils::vec2str(std::get<0>(inputs[i])) << "_";
// input blocked shape
result << "IBS[" << i << "]=" << CommonTestUtils::partialShape2str({std::get<0>(blockedshape)}) << "_";
result << "IBS[" << i << "]=" << ov::test::utils::partialShape2str({std::get<0>(blockedshape)}) << "_";
// input blocked order
result << "IBO[" << i << "]=" << CommonTestUtils::vec2str(std::get<1>(blockedshape)) << "_";
result << "IBO[" << i << "]=" << ov::test::utils::vec2str(std::get<1>(blockedshape)) << "_";
}
// output blocked shape
result << "OBS[0]=" << CommonTestUtils::partialShape2str({std::get<0>(output)}) << "_";
result << "OBS[0]=" << ov::test::utils::partialShape2str({std::get<0>(output)}) << "_";
// output blocked order
result << "OBO[0]=" << CommonTestUtils::vec2str(std::get<1>(output)) << "_";
result << "ExpOS[0]=" << CommonTestUtils::vec2str(expectedOutput) << "_";
result << "OBO[0]=" << ov::test::utils::vec2str(std::get<1>(output)) << "_";
result << "ExpOS[0]=" << ov::test::utils::vec2str(expectedOutput) << "_";
return result.str();
}

View File

@ -18,9 +18,9 @@ std::string FuseTransposeBrgemmTests::getTestCaseName(testing::TestParamInfo<fus
size_t transpose_position;
std::tie(input_shapes, master_shape, transpose_position) = obj.param;
std::ostringstream result;
result << "IS[0]=" << CommonTestUtils::partialShape2str({input_shapes[0]}) << "_";
result << "IS[1]=" << CommonTestUtils::partialShape2str({input_shapes[1]}) << "_";
result << "MS=" << CommonTestUtils::partialShape2str({master_shape}) << "_";
result << "IS[0]=" << ov::test::utils::partialShape2str({input_shapes[0]}) << "_";
result << "IS[1]=" << ov::test::utils::partialShape2str({input_shapes[1]}) << "_";
result << "MS=" << ov::test::utils::partialShape2str({master_shape}) << "_";
result << "Pos=" << transpose_position << "_";
return result.str();
}

View File

@ -48,7 +48,7 @@ std::string PrecisionPropagationTest::getTestCaseName(testing::TestParamInfo<Pre
std::ostringstream result;
result << "{";
for (const auto& precisions : precisions_pack) {
result << CommonTestUtils::vec2str(precisions) << "_";
result << ov::test::utils::vec2str(precisions) << "_";
}
result << "}";
return result.str();

View File

@ -80,9 +80,9 @@ public:
std::ostringstream result;
result << "_input_shape_" << testValues.inputPartialShape << "_before_"
<< CommonTestUtils::vec2str(testValues.reshape_before_val) << "_transpose_"
<< CommonTestUtils::vec2str(testValues.transpose_val) << "_after_"
<< CommonTestUtils::vec2str(testValues.reshape_after_val)
<< ov::test::utils::vec2str(testValues.reshape_before_val) << "_transpose_"
<< ov::test::utils::vec2str(testValues.transpose_val) << "_after_"
<< ov::test::utils::vec2str(testValues.reshape_after_val)
<< (testValues.check_values ? "check_reshape_values" : "");
return result.str();

View File

@ -45,12 +45,12 @@ public:
std::tie(data_prec, data_shape, ranges_prec, il_shape, ih_shape, ol_shape, oh_shape, levels) = basic_params;
std::ostringstream result;
result << "DATA=" << CommonTestUtils::vec2str(data_shape) << "_";
result << "DATA=" << ov::test::utils::vec2str(data_shape) << "_";
result << "DATA_PRC=" << ngraph::element::Type(data_prec) << "_";
result << "IL=" << CommonTestUtils::vec2str(il_shape) << "_" << input_ranges_values.first << "_";
result << "IH=" << CommonTestUtils::vec2str(ih_shape) << "_" << input_ranges_values.second << "_";
result << "OL=" << CommonTestUtils::vec2str(ol_shape) << "_";
result << "OH=" << CommonTestUtils::vec2str(oh_shape) << "_";
result << "IL=" << ov::test::utils::vec2str(il_shape) << "_" << input_ranges_values.first << "_";
result << "IH=" << ov::test::utils::vec2str(ih_shape) << "_" << input_ranges_values.second << "_";
result << "OL=" << ov::test::utils::vec2str(ol_shape) << "_";
result << "OH=" << ov::test::utils::vec2str(oh_shape) << "_";
result << "RANGES_PRC=" << ngraph::element::Type(ranges_prec) << "_";
result << "LEVELS=" << levels;
return result.str();

View File

@ -16,7 +16,6 @@
#include "ngraph/ngraph.hpp"
using namespace std;
using namespace ngraph;
class all_close_f_param_test : public testing::TestWithParam<::std::tuple<float, int>> {
protected:
@ -29,7 +28,7 @@ protected:
}
void SetUp() override {
constexpr int mantissa_bits = 24;
uint32_t expected_as_int = test::FloatUnion(expected).i;
uint32_t expected_as_int = ov::test::utils::FloatUnion(expected).i;
// Turn on targeted bit
// e.g. for float with 24 bit mantissa, 2 bit accuracy, and hard-coded 8 bit exponent_bits
@ -40,37 +39,37 @@ protected:
if (expected > 0.f) {
uint32_t upper_bound_as_int = expected_as_int + targeted_bit;
upper_bound = test::FloatUnion(upper_bound_as_int).f;
past_upper_bound = test::FloatUnion(upper_bound_as_int + 1).f;
upper_bound = ov::test::utils::FloatUnion(upper_bound_as_int).f;
past_upper_bound = ov::test::utils::FloatUnion(upper_bound_as_int + 1).f;
min_signal_too_low = expected;
min_signal_enables_passing = test::FloatUnion(upper_bound_as_int + 2).f;
min_signal_enables_passing = ov::test::utils::FloatUnion(upper_bound_as_int + 2).f;
uint32_t lower_bound_as_int = expected_as_int - targeted_bit;
lower_bound = test::FloatUnion(lower_bound_as_int).f;
past_lower_bound = test::FloatUnion(lower_bound_as_int - 1).f;
lower_bound = ov::test::utils::FloatUnion(lower_bound_as_int).f;
past_lower_bound = ov::test::utils::FloatUnion(lower_bound_as_int - 1).f;
} else if (expected < 0.f) {
// Same logic/math as above, but reversed variable name order
uint32_t lower_bound_as_int = expected_as_int + targeted_bit;
lower_bound = test::FloatUnion(lower_bound_as_int).f;
past_lower_bound = test::FloatUnion(lower_bound_as_int + 1).f;
lower_bound = ov::test::utils::FloatUnion(lower_bound_as_int).f;
past_lower_bound = ov::test::utils::FloatUnion(lower_bound_as_int + 1).f;
min_signal_too_low = expected;
min_signal_enables_passing = test::FloatUnion(lower_bound_as_int + 2).f;
min_signal_enables_passing = ov::test::utils::FloatUnion(lower_bound_as_int + 2).f;
uint32_t upper_bound_as_int = expected_as_int - targeted_bit;
upper_bound = test::FloatUnion(upper_bound_as_int).f;
past_upper_bound = test::FloatUnion(upper_bound_as_int - 1).f;
upper_bound = ov::test::utils::FloatUnion(upper_bound_as_int).f;
past_upper_bound = ov::test::utils::FloatUnion(upper_bound_as_int - 1).f;
} else // (expected == 0.f) || (expected == -0.f)
{
// Special handling of 0 / -0 which get same bounds
uint32_t upper_bound_as_int = targeted_bit;
upper_bound = test::FloatUnion(upper_bound_as_int).f;
upper_bound = ov::test::utils::FloatUnion(upper_bound_as_int).f;
uint32_t past_upper_bound_as_int = upper_bound_as_int + 1;
past_upper_bound = test::FloatUnion(past_upper_bound_as_int).f;
past_upper_bound = ov::test::utils::FloatUnion(past_upper_bound_as_int).f;
min_signal_too_low = expected;
min_signal_enables_passing = test::FloatUnion(upper_bound_as_int + 2).f;
min_signal_enables_passing = ov::test::utils::FloatUnion(upper_bound_as_int + 2).f;
lower_bound = test::FloatUnion(upper_bound_as_int | 0x80000000).f;
past_lower_bound = test::FloatUnion(past_upper_bound_as_int | 0x80000000).f;
lower_bound = ov::test::utils::FloatUnion(upper_bound_as_int | 0x80000000).f;
past_lower_bound = ov::test::utils::FloatUnion(past_upper_bound_as_int | 0x80000000).f;
}
}
@ -87,46 +86,52 @@ protected:
TEST_P(all_close_f_param_test, test_boundaries) {
// Format verbose info to only print out in case of test failure
stringstream ss;
ss << "Testing target of: " << expected << " (" << test::float_to_bits(expected) << ")\n";
ss << "Testing target of: " << expected << " (" << ov::test::utils::float_to_bits(expected) << ")\n";
ss << "Matching to targets with: " << tolerance_bits << " tolerance_bits\n";
ss << "upper_bound: " << upper_bound << " (" << test::float_to_bits(upper_bound) << ")\n";
ss << "lower_bound: " << lower_bound << " (" << test::float_to_bits(lower_bound) << ")\n";
ss << "past_upper_bound: " << past_upper_bound << " (" << test::float_to_bits(past_upper_bound) << ")\n";
ss << "past_lower_bound: " << past_lower_bound << " (" << test::float_to_bits(past_lower_bound) << ")\n";
ss << "upper_bound: " << upper_bound << " (" << ov::test::utils::float_to_bits(upper_bound) << ")\n";
ss << "lower_bound: " << lower_bound << " (" << ov::test::utils::float_to_bits(lower_bound) << ")\n";
ss << "past_upper_bound: " << past_upper_bound << " (" << ov::test::utils::float_to_bits(past_upper_bound) << ")\n";
ss << "past_lower_bound: " << past_lower_bound << " (" << ov::test::utils::float_to_bits(past_lower_bound) << ")\n";
EXPECT_TRUE(test::close_f(expected, upper_bound, tolerance_bits)) << ss.str();
EXPECT_TRUE(test::all_close_f(vector<float>({expected}), vector<float>({upper_bound}), tolerance_bits)) << ss.str();
EXPECT_TRUE(test::close_f(expected, lower_bound, tolerance_bits)) << ss.str();
EXPECT_TRUE(test::all_close_f(vector<float>({expected}), vector<float>({lower_bound}), tolerance_bits)) << ss.str();
EXPECT_FALSE(test::close_f(expected, past_upper_bound, tolerance_bits)) << ss.str();
EXPECT_FALSE(test::close_f(expected, past_upper_bound, tolerance_bits, min_signal_too_low)) << ss.str();
EXPECT_TRUE(test::close_f(expected, past_upper_bound, tolerance_bits, min_signal_enables_passing)) << ss.str();
EXPECT_FALSE(test::all_close_f(vector<float>({expected}), vector<float>({past_upper_bound}), tolerance_bits))
EXPECT_TRUE(ov::test::utils::close_f(expected, upper_bound, tolerance_bits)) << ss.str();
EXPECT_TRUE(ov::test::utils::all_close_f(vector<float>({expected}), vector<float>({upper_bound}), tolerance_bits))
<< ss.str();
EXPECT_FALSE(test::all_close_f(vector<float>({expected}),
vector<float>({past_upper_bound}),
tolerance_bits,
min_signal_too_low))
EXPECT_TRUE(ov::test::utils::close_f(expected, lower_bound, tolerance_bits)) << ss.str();
EXPECT_TRUE(ov::test::utils::all_close_f(vector<float>({expected}), vector<float>({lower_bound}), tolerance_bits))
<< ss.str();
EXPECT_TRUE(test::all_close_f(vector<float>({expected}),
vector<float>({past_upper_bound}),
tolerance_bits,
min_signal_enables_passing))
EXPECT_FALSE(ov::test::utils::close_f(expected, past_upper_bound, tolerance_bits)) << ss.str();
EXPECT_FALSE(ov::test::utils::close_f(expected, past_upper_bound, tolerance_bits, min_signal_too_low)) << ss.str();
EXPECT_TRUE(ov::test::utils::close_f(expected, past_upper_bound, tolerance_bits, min_signal_enables_passing))
<< ss.str();
EXPECT_FALSE(test::close_f(expected, past_lower_bound, tolerance_bits)) << ss.str();
EXPECT_FALSE(test::close_f(expected, past_lower_bound, tolerance_bits, min_signal_too_low)) << ss.str();
EXPECT_TRUE(test::close_f(expected, past_lower_bound, tolerance_bits, min_signal_enables_passing)) << ss.str();
EXPECT_FALSE(test::all_close_f(vector<float>({expected}), vector<float>({past_lower_bound}), tolerance_bits))
EXPECT_FALSE(
ov::test::utils::all_close_f(vector<float>({expected}), vector<float>({past_upper_bound}), tolerance_bits))
<< ss.str();
EXPECT_FALSE(test::all_close_f(vector<float>({expected}),
vector<float>({past_lower_bound}),
tolerance_bits,
min_signal_too_low))
EXPECT_FALSE(ov::test::utils::all_close_f(vector<float>({expected}),
vector<float>({past_upper_bound}),
tolerance_bits,
min_signal_too_low))
<< ss.str();
EXPECT_TRUE(test::all_close_f(vector<float>({expected}),
vector<float>({past_lower_bound}),
tolerance_bits,
min_signal_enables_passing))
EXPECT_TRUE(ov::test::utils::all_close_f(vector<float>({expected}),
vector<float>({past_upper_bound}),
tolerance_bits,
min_signal_enables_passing))
<< ss.str();
EXPECT_FALSE(ov::test::utils::close_f(expected, past_lower_bound, tolerance_bits)) << ss.str();
EXPECT_FALSE(ov::test::utils::close_f(expected, past_lower_bound, tolerance_bits, min_signal_too_low)) << ss.str();
EXPECT_TRUE(ov::test::utils::close_f(expected, past_lower_bound, tolerance_bits, min_signal_enables_passing))
<< ss.str();
EXPECT_FALSE(
ov::test::utils::all_close_f(vector<float>({expected}), vector<float>({past_lower_bound}), tolerance_bits))
<< ss.str();
EXPECT_FALSE(ov::test::utils::all_close_f(vector<float>({expected}),
vector<float>({past_lower_bound}),
tolerance_bits,
min_signal_too_low))
<< ss.str();
EXPECT_TRUE(ov::test::utils::all_close_f(vector<float>({expected}),
vector<float>({past_lower_bound}),
tolerance_bits,
min_signal_enables_passing))
<< ss.str();
}
@ -148,7 +153,7 @@ protected:
}
void SetUp() override {
constexpr int mantissa_bits = 53;
uint64_t expected_as_int = test::DoubleUnion(expected).i;
uint64_t expected_as_int = ov::test::utils::DoubleUnion(expected).i;
// Turn on targeted bit
// e.g. for double with 52 bit mantissa, 2 bit accuracy, and hard-coded 11 bit exponent_bits
// tolerance_bit_shift = 64 - (1 + 11 + (52 - 1 ) - 2 )
@ -158,37 +163,37 @@ protected:
if (expected > 0.) {
uint64_t upper_bound_as_int = expected_as_int + targeted_bit;
upper_bound = test::DoubleUnion(upper_bound_as_int).d;
past_upper_bound = test::DoubleUnion(upper_bound_as_int + 1).d;
upper_bound = ov::test::utils::DoubleUnion(upper_bound_as_int).d;
past_upper_bound = ov::test::utils::DoubleUnion(upper_bound_as_int + 1).d;
min_signal_too_low = expected;
min_signal_enables_passing = test::DoubleUnion(upper_bound_as_int + 2).d;
min_signal_enables_passing = ov::test::utils::DoubleUnion(upper_bound_as_int + 2).d;
uint64_t lower_bound_as_int = expected_as_int - targeted_bit;
lower_bound = test::DoubleUnion(lower_bound_as_int).d;
past_lower_bound = test::DoubleUnion(lower_bound_as_int - 1).d;
lower_bound = ov::test::utils::DoubleUnion(lower_bound_as_int).d;
past_lower_bound = ov::test::utils::DoubleUnion(lower_bound_as_int - 1).d;
} else if (expected < 0.) {
// Same logic/math as above, but reversed variable name order
uint64_t lower_bound_as_int = expected_as_int + targeted_bit;
lower_bound = test::DoubleUnion(lower_bound_as_int).d;
past_lower_bound = test::DoubleUnion(lower_bound_as_int + 1).d;
lower_bound = ov::test::utils::DoubleUnion(lower_bound_as_int).d;
past_lower_bound = ov::test::utils::DoubleUnion(lower_bound_as_int + 1).d;
min_signal_too_low = expected;
min_signal_enables_passing = test::DoubleUnion(lower_bound_as_int + 2).d;
min_signal_enables_passing = ov::test::utils::DoubleUnion(lower_bound_as_int + 2).d;
uint64_t upper_bound_as_int = expected_as_int - targeted_bit;
upper_bound = test::DoubleUnion(upper_bound_as_int).d;
past_upper_bound = test::DoubleUnion(upper_bound_as_int - 1).d;
upper_bound = ov::test::utils::DoubleUnion(upper_bound_as_int).d;
past_upper_bound = ov::test::utils::DoubleUnion(upper_bound_as_int - 1).d;
} else // (expected == 0.) || (expected == -0.)
{
// Special handling of 0 / -0 which get same bounds
uint64_t upper_bound_as_int = targeted_bit;
upper_bound = test::DoubleUnion(upper_bound_as_int).d;
upper_bound = ov::test::utils::DoubleUnion(upper_bound_as_int).d;
uint64_t past_upper_bound_as_int = upper_bound_as_int + 1;
past_upper_bound = test::DoubleUnion(past_upper_bound_as_int).d;
past_upper_bound = ov::test::utils::DoubleUnion(past_upper_bound_as_int).d;
min_signal_too_low = expected;
min_signal_enables_passing = test::DoubleUnion(upper_bound_as_int + 2).d;
min_signal_enables_passing = ov::test::utils::DoubleUnion(upper_bound_as_int + 2).d;
lower_bound = test::DoubleUnion(upper_bound_as_int | 0x8000000000000000).d;
past_lower_bound = test::DoubleUnion(past_upper_bound_as_int | 0x8000000000000000).d;
lower_bound = ov::test::utils::DoubleUnion(upper_bound_as_int | 0x8000000000000000).d;
past_lower_bound = ov::test::utils::DoubleUnion(past_upper_bound_as_int | 0x8000000000000000).d;
}
}
@ -205,48 +210,54 @@ protected:
TEST_P(all_close_f_double_param_test, test_boundaries) {
// Format verbose info to only print out in case of test failure
stringstream ss;
ss << "Testing target of: " << expected << " (" << test::double_to_bits(expected) << ")\n";
ss << "Testing target of: " << expected << " (" << ov::test::utils::double_to_bits(expected) << ")\n";
ss << "Matching to targets with: " << tolerance_bits << " tolerance_bits\n";
ss << "upper_bound: " << upper_bound << " (" << test::double_to_bits(upper_bound) << ")\n";
ss << "lower_bound: " << lower_bound << " (" << test::double_to_bits(lower_bound) << ")\n";
ss << "past_upper_bound: " << past_upper_bound << " (" << test::double_to_bits(past_upper_bound) << ")\n";
ss << "past_lower_bound: " << past_lower_bound << " (" << test::double_to_bits(past_lower_bound) << ")\n";
ss << "upper_bound: " << upper_bound << " (" << ov::test::utils::double_to_bits(upper_bound) << ")\n";
ss << "lower_bound: " << lower_bound << " (" << ov::test::utils::double_to_bits(lower_bound) << ")\n";
ss << "past_upper_bound: " << past_upper_bound << " (" << ov::test::utils::double_to_bits(past_upper_bound)
<< ")\n";
ss << "past_lower_bound: " << past_lower_bound << " (" << ov::test::utils::double_to_bits(past_lower_bound)
<< ")\n";
EXPECT_TRUE(test::close_f(expected, upper_bound, tolerance_bits)) << ss.str();
EXPECT_TRUE(test::all_close_f(vector<double>({expected}), vector<double>({upper_bound}), tolerance_bits))
EXPECT_TRUE(ov::test::utils::close_f(expected, upper_bound, tolerance_bits)) << ss.str();
EXPECT_TRUE(ov::test::utils::all_close_f(vector<double>({expected}), vector<double>({upper_bound}), tolerance_bits))
<< ss.str();
EXPECT_TRUE(test::close_f(expected, lower_bound, tolerance_bits)) << ss.str();
EXPECT_TRUE(test::all_close_f(vector<double>({expected}), vector<double>({lower_bound}), tolerance_bits))
EXPECT_TRUE(ov::test::utils::close_f(expected, lower_bound, tolerance_bits)) << ss.str();
EXPECT_TRUE(ov::test::utils::all_close_f(vector<double>({expected}), vector<double>({lower_bound}), tolerance_bits))
<< ss.str();
EXPECT_FALSE(test::close_f(expected, past_upper_bound, tolerance_bits)) << ss.str();
EXPECT_FALSE(test::close_f(expected, past_upper_bound, tolerance_bits, min_signal_too_low)) << ss.str();
EXPECT_TRUE(test::close_f(expected, past_upper_bound, tolerance_bits, min_signal_enables_passing)) << ss.str();
EXPECT_FALSE(test::all_close_f(vector<double>({expected}), vector<double>({past_upper_bound}), tolerance_bits))
EXPECT_FALSE(ov::test::utils::close_f(expected, past_upper_bound, tolerance_bits)) << ss.str();
EXPECT_FALSE(ov::test::utils::close_f(expected, past_upper_bound, tolerance_bits, min_signal_too_low)) << ss.str();
EXPECT_TRUE(ov::test::utils::close_f(expected, past_upper_bound, tolerance_bits, min_signal_enables_passing))
<< ss.str();
EXPECT_FALSE(test::all_close_f(vector<double>({expected}),
vector<double>({past_upper_bound}),
tolerance_bits,
min_signal_too_low))
EXPECT_FALSE(
ov::test::utils::all_close_f(vector<double>({expected}), vector<double>({past_upper_bound}), tolerance_bits))
<< ss.str();
EXPECT_TRUE(test::all_close_f(vector<double>({expected}),
vector<double>({past_upper_bound}),
tolerance_bits,
min_signal_enables_passing))
EXPECT_FALSE(ov::test::utils::all_close_f(vector<double>({expected}),
vector<double>({past_upper_bound}),
tolerance_bits,
min_signal_too_low))
<< ss.str();
EXPECT_FALSE(test::close_f(expected, past_lower_bound, tolerance_bits)) << ss.str();
EXPECT_FALSE(test::close_f(expected, past_lower_bound, tolerance_bits, min_signal_too_low)) << ss.str();
EXPECT_TRUE(test::close_f(expected, past_lower_bound, tolerance_bits, min_signal_enables_passing)) << ss.str();
EXPECT_FALSE(test::all_close_f(vector<double>({expected}), vector<double>({past_lower_bound}), tolerance_bits))
EXPECT_TRUE(ov::test::utils::all_close_f(vector<double>({expected}),
vector<double>({past_upper_bound}),
tolerance_bits,
min_signal_enables_passing))
<< ss.str();
EXPECT_FALSE(test::all_close_f(vector<double>({expected}),
vector<double>({past_lower_bound}),
tolerance_bits,
min_signal_too_low))
EXPECT_FALSE(ov::test::utils::close_f(expected, past_lower_bound, tolerance_bits)) << ss.str();
EXPECT_FALSE(ov::test::utils::close_f(expected, past_lower_bound, tolerance_bits, min_signal_too_low)) << ss.str();
EXPECT_TRUE(ov::test::utils::close_f(expected, past_lower_bound, tolerance_bits, min_signal_enables_passing))
<< ss.str();
EXPECT_TRUE(test::all_close_f(vector<double>({expected}),
vector<double>({past_lower_bound}),
tolerance_bits,
min_signal_enables_passing))
EXPECT_FALSE(
ov::test::utils::all_close_f(vector<double>({expected}), vector<double>({past_lower_bound}), tolerance_bits))
<< ss.str();
EXPECT_FALSE(ov::test::utils::all_close_f(vector<double>({expected}),
vector<double>({past_lower_bound}),
tolerance_bits,
min_signal_too_low))
<< ss.str();
EXPECT_TRUE(ov::test::utils::all_close_f(vector<double>({expected}),
vector<double>({past_lower_bound}),
tolerance_bits,
min_signal_enables_passing))
<< ss.str();
}
@ -297,46 +308,50 @@ TEST(all_close_f, mantissa_8_near_0) {
constexpr int tolerance_bits = (FLOAT_MANTISSA_BITS - BFLOAT_MANTISSA_BITS + 2);
// 0.f, the ground-truth value
float expected = test::bits_to_float("0 00000000 000 0000 0000 0000 0000 0000");
float expected = ov::test::utils::bits_to_float("0 00000000 000 0000 0000 0000 0000 0000");
float computed;
float min_signal_too_low = test::bits_to_float("0 00000000 000 0100 0000 0000 0000 0001");
float min_signal_enables_passing = test::bits_to_float("0 00000000 000 0100 0000 0000 0000 0010");
float min_signal_too_low = ov::test::utils::bits_to_float("0 00000000 000 0100 0000 0000 0000 0001");
float min_signal_enables_passing = ov::test::utils::bits_to_float("0 00000000 000 0100 0000 0000 0000 0010");
// ~3.67342E-40, the exact upper bound
computed = test::bits_to_float("0 00000000 000 0100 0000 0000 0000 0000");
EXPECT_TRUE(test::close_f(expected, computed, tolerance_bits));
EXPECT_TRUE(test::all_close_f(vector<float>({expected}), vector<float>({computed}), tolerance_bits));
computed = ov::test::utils::bits_to_float("0 00000000 000 0100 0000 0000 0000 0000");
EXPECT_TRUE(ov::test::utils::close_f(expected, computed, tolerance_bits));
EXPECT_TRUE(ov::test::utils::all_close_f(vector<float>({expected}), vector<float>({computed}), tolerance_bits));
// ~3.67343E-40, the next representable number bigger than upper bound
computed = test::bits_to_float("0 00000000 000 0100 0000 0000 0000 0001");
EXPECT_FALSE(test::close_f(expected, computed, tolerance_bits));
EXPECT_FALSE(test::close_f(expected, computed, tolerance_bits, min_signal_too_low));
EXPECT_TRUE(test::close_f(expected, computed, tolerance_bits, min_signal_enables_passing));
EXPECT_FALSE(test::all_close_f(vector<float>({expected}), vector<float>({computed}), tolerance_bits));
EXPECT_FALSE(
test::all_close_f(vector<float>({expected}), vector<float>({computed}), tolerance_bits, min_signal_too_low));
EXPECT_TRUE(test::all_close_f(vector<float>({expected}),
vector<float>({computed}),
tolerance_bits,
min_signal_enables_passing));
computed = ov::test::utils::bits_to_float("0 00000000 000 0100 0000 0000 0000 0001");
EXPECT_FALSE(ov::test::utils::close_f(expected, computed, tolerance_bits));
EXPECT_FALSE(ov::test::utils::close_f(expected, computed, tolerance_bits, min_signal_too_low));
EXPECT_TRUE(ov::test::utils::close_f(expected, computed, tolerance_bits, min_signal_enables_passing));
EXPECT_FALSE(ov::test::utils::all_close_f(vector<float>({expected}), vector<float>({computed}), tolerance_bits));
EXPECT_FALSE(ov::test::utils::all_close_f(vector<float>({expected}),
vector<float>({computed}),
tolerance_bits,
min_signal_too_low));
EXPECT_TRUE(ov::test::utils::all_close_f(vector<float>({expected}),
vector<float>({computed}),
tolerance_bits,
min_signal_enables_passing));
// ~-3.67342E-40, the exact lower bound
computed = test::bits_to_float("1 00000000 000 0100 0000 0000 0000 0000");
EXPECT_TRUE(test::close_f(expected, computed, tolerance_bits));
EXPECT_TRUE(test::all_close_f(vector<float>({expected}), vector<float>({computed}), tolerance_bits));
computed = ov::test::utils::bits_to_float("1 00000000 000 0100 0000 0000 0000 0000");
EXPECT_TRUE(ov::test::utils::close_f(expected, computed, tolerance_bits));
EXPECT_TRUE(ov::test::utils::all_close_f(vector<float>({expected}), vector<float>({computed}), tolerance_bits));
// ~-3.67343E-40, the next representable number smaller than lower bound
computed = test::bits_to_float("1 00000000 000 0100 0000 0000 0000 0001");
EXPECT_FALSE(test::close_f(expected, computed, tolerance_bits));
EXPECT_FALSE(test::close_f(expected, computed, tolerance_bits, min_signal_too_low));
EXPECT_TRUE(test::close_f(expected, computed, tolerance_bits, min_signal_enables_passing));
EXPECT_FALSE(test::all_close_f(vector<float>({expected}), vector<float>({computed}), tolerance_bits));
EXPECT_FALSE(
test::all_close_f(vector<float>({expected}), vector<float>({computed}), tolerance_bits, min_signal_too_low));
EXPECT_TRUE(test::all_close_f(vector<float>({expected}),
vector<float>({computed}),
tolerance_bits,
min_signal_enables_passing));
computed = ov::test::utils::bits_to_float("1 00000000 000 0100 0000 0000 0000 0001");
EXPECT_FALSE(ov::test::utils::close_f(expected, computed, tolerance_bits));
EXPECT_FALSE(ov::test::utils::close_f(expected, computed, tolerance_bits, min_signal_too_low));
EXPECT_TRUE(ov::test::utils::close_f(expected, computed, tolerance_bits, min_signal_enables_passing));
EXPECT_FALSE(ov::test::utils::all_close_f(vector<float>({expected}), vector<float>({computed}), tolerance_bits));
EXPECT_FALSE(ov::test::utils::all_close_f(vector<float>({expected}),
vector<float>({computed}),
tolerance_bits,
min_signal_too_low));
EXPECT_TRUE(ov::test::utils::all_close_f(vector<float>({expected}),
vector<float>({computed}),
tolerance_bits,
min_signal_enables_passing));
}
// Test the exact bounds near -0.f
@ -380,46 +395,50 @@ TEST(all_close_f, mantissa_8_near_n0) {
constexpr int tolerance_bits = (FLOAT_MANTISSA_BITS - BFLOAT_MANTISSA_BITS + 2);
// 0.f, the ground-truth value
float expected = test::bits_to_float("1 00000000 000 0000 0000 0000 0000 0000");
float expected = ov::test::utils::bits_to_float("1 00000000 000 0000 0000 0000 0000 0000");
float computed;
float min_signal_too_low = test::bits_to_float("0 00000000 000 0100 0000 0000 0000 0001");
float min_signal_enables_passing = test::bits_to_float("0 00000000 000 0100 0000 0000 0000 0010");
float min_signal_too_low = ov::test::utils::bits_to_float("0 00000000 000 0100 0000 0000 0000 0001");
float min_signal_enables_passing = ov::test::utils::bits_to_float("0 00000000 000 0100 0000 0000 0000 0010");
// ~3.67342E-40, the exact upper bound
computed = test::bits_to_float("0 00000000 000 0100 0000 0000 0000 0000");
EXPECT_TRUE(test::close_f(expected, computed, tolerance_bits));
EXPECT_TRUE(test::all_close_f(vector<float>({expected}), vector<float>({computed}), tolerance_bits));
computed = ov::test::utils::bits_to_float("0 00000000 000 0100 0000 0000 0000 0000");
EXPECT_TRUE(ov::test::utils::close_f(expected, computed, tolerance_bits));
EXPECT_TRUE(ov::test::utils::all_close_f(vector<float>({expected}), vector<float>({computed}), tolerance_bits));
// ~3.67343E-40, the next representable number bigger than upper bound
computed = test::bits_to_float("0 00000000 000 0100 0000 0000 0000 0001");
EXPECT_FALSE(test::close_f(expected, computed, tolerance_bits));
EXPECT_FALSE(test::close_f(expected, computed, tolerance_bits, min_signal_too_low));
EXPECT_TRUE(test::close_f(expected, computed, tolerance_bits, min_signal_enables_passing));
EXPECT_FALSE(test::all_close_f(vector<float>({expected}), vector<float>({computed}), tolerance_bits));
EXPECT_FALSE(
test::all_close_f(vector<float>({expected}), vector<float>({computed}), tolerance_bits, min_signal_too_low));
EXPECT_TRUE(test::all_close_f(vector<float>({expected}),
vector<float>({computed}),
tolerance_bits,
min_signal_enables_passing));
computed = ov::test::utils::bits_to_float("0 00000000 000 0100 0000 0000 0000 0001");
EXPECT_FALSE(ov::test::utils::close_f(expected, computed, tolerance_bits));
EXPECT_FALSE(ov::test::utils::close_f(expected, computed, tolerance_bits, min_signal_too_low));
EXPECT_TRUE(ov::test::utils::close_f(expected, computed, tolerance_bits, min_signal_enables_passing));
EXPECT_FALSE(ov::test::utils::all_close_f(vector<float>({expected}), vector<float>({computed}), tolerance_bits));
EXPECT_FALSE(ov::test::utils::all_close_f(vector<float>({expected}),
vector<float>({computed}),
tolerance_bits,
min_signal_too_low));
EXPECT_TRUE(ov::test::utils::all_close_f(vector<float>({expected}),
vector<float>({computed}),
tolerance_bits,
min_signal_enables_passing));
// ~-3.67342E-40, the exact lower bound
computed = test::bits_to_float("1 00000000 000 0100 0000 0000 0000 0000");
EXPECT_TRUE(test::close_f(expected, computed, tolerance_bits));
EXPECT_TRUE(test::all_close_f(vector<float>({expected}), vector<float>({computed}), tolerance_bits));
computed = ov::test::utils::bits_to_float("1 00000000 000 0100 0000 0000 0000 0000");
EXPECT_TRUE(ov::test::utils::close_f(expected, computed, tolerance_bits));
EXPECT_TRUE(ov::test::utils::all_close_f(vector<float>({expected}), vector<float>({computed}), tolerance_bits));
// ~-3.67343E-40, the next representable number smaller than lower bound
computed = test::bits_to_float("1 00000000 000 0100 0000 0000 0000 0001");
EXPECT_FALSE(test::close_f(expected, computed, tolerance_bits));
EXPECT_FALSE(test::close_f(expected, computed, tolerance_bits, min_signal_too_low));
EXPECT_TRUE(test::close_f(expected, computed, tolerance_bits, min_signal_enables_passing));
EXPECT_FALSE(test::all_close_f(vector<float>({expected}), vector<float>({computed}), tolerance_bits));
EXPECT_FALSE(
test::all_close_f(vector<float>({expected}), vector<float>({computed}), tolerance_bits, min_signal_too_low));
EXPECT_TRUE(test::all_close_f(vector<float>({expected}),
vector<float>({computed}),
tolerance_bits,
min_signal_enables_passing));
computed = ov::test::utils::bits_to_float("1 00000000 000 0100 0000 0000 0000 0001");
EXPECT_FALSE(ov::test::utils::close_f(expected, computed, tolerance_bits));
EXPECT_FALSE(ov::test::utils::close_f(expected, computed, tolerance_bits, min_signal_too_low));
EXPECT_TRUE(ov::test::utils::close_f(expected, computed, tolerance_bits, min_signal_enables_passing));
EXPECT_FALSE(ov::test::utils::all_close_f(vector<float>({expected}), vector<float>({computed}), tolerance_bits));
EXPECT_FALSE(ov::test::utils::all_close_f(vector<float>({expected}),
vector<float>({computed}),
tolerance_bits,
min_signal_too_low));
EXPECT_TRUE(ov::test::utils::all_close_f(vector<float>({expected}),
vector<float>({computed}),
tolerance_bits,
min_signal_enables_passing));
}
// Test the exact bounds near 1.f
@ -457,28 +476,28 @@ TEST(all_close_f, mantissa_8_near_1) {
constexpr int tolerance_bits = (FLOAT_MANTISSA_BITS - BFLOAT_MANTISSA_BITS + 2);
// 1.f, the ground-truth value
float expected = test::bits_to_float("0 01111111 000 0000 0000 0000 0000 0000");
float expected = ov::test::utils::bits_to_float("0 01111111 000 0000 0000 0000 0000 0000");
float computed;
// 1.03125f, the exact upper bound
computed = test::bits_to_float("0 01111111 000 0100 0000 0000 0000 0000");
EXPECT_TRUE(test::close_f(expected, computed, tolerance_bits));
EXPECT_TRUE(test::all_close_f(vector<float>({expected}), vector<float>({computed}), tolerance_bits));
computed = ov::test::utils::bits_to_float("0 01111111 000 0100 0000 0000 0000 0000");
EXPECT_TRUE(ov::test::utils::close_f(expected, computed, tolerance_bits));
EXPECT_TRUE(ov::test::utils::all_close_f(vector<float>({expected}), vector<float>({computed}), tolerance_bits));
// 1.031250119f, the next representable number bigger than upper bound
computed = test::bits_to_float("0 01111111 000 0100 0000 0000 0000 0001");
EXPECT_FALSE(test::close_f(expected, computed, tolerance_bits));
EXPECT_FALSE(test::all_close_f(vector<float>({expected}), vector<float>({computed}), tolerance_bits));
computed = ov::test::utils::bits_to_float("0 01111111 000 0100 0000 0000 0000 0001");
EXPECT_FALSE(ov::test::utils::close_f(expected, computed, tolerance_bits));
EXPECT_FALSE(ov::test::utils::all_close_f(vector<float>({expected}), vector<float>({computed}), tolerance_bits));
// 0.984375f, the exact lower bound
computed = test::bits_to_float("0 01111110 111 1100 0000 0000 0000 0000");
EXPECT_TRUE(test::close_f(expected, computed, tolerance_bits));
EXPECT_TRUE(test::all_close_f(vector<float>({expected}), vector<float>({computed}), tolerance_bits));
computed = ov::test::utils::bits_to_float("0 01111110 111 1100 0000 0000 0000 0000");
EXPECT_TRUE(ov::test::utils::close_f(expected, computed, tolerance_bits));
EXPECT_TRUE(ov::test::utils::all_close_f(vector<float>({expected}), vector<float>({computed}), tolerance_bits));
// 0.9843749404f, the next representable number smaller than lower bound
computed = test::bits_to_float("0 01111110 111 1011 1111 1111 1111 1111");
EXPECT_FALSE(test::close_f(expected, computed, tolerance_bits));
EXPECT_FALSE(test::all_close_f(vector<float>({expected}), vector<float>({computed}), tolerance_bits));
computed = ov::test::utils::bits_to_float("0 01111110 111 1011 1111 1111 1111 1111");
EXPECT_FALSE(ov::test::utils::close_f(expected, computed, tolerance_bits));
EXPECT_FALSE(ov::test::utils::all_close_f(vector<float>({expected}), vector<float>({computed}), tolerance_bits));
}
// Test the exact bounds near -1.f
@ -516,28 +535,28 @@ TEST(all_close_f, mantissa_8_near_n1) {
constexpr int tolerance_bits = (FLOAT_MANTISSA_BITS - BFLOAT_MANTISSA_BITS + 2);
// -1.f, the ground-truth value
float expected = test::bits_to_float("1 01111111 000 0000 0000 0000 0000 0000");
float expected = ov::test::utils::bits_to_float("1 01111111 000 0000 0000 0000 0000 0000");
float computed;
// -0.984375f, the exact upper bound
computed = test::bits_to_float("1 01111110 111 1100 0000 0000 0000 0000");
EXPECT_TRUE(test::close_f(expected, computed, tolerance_bits));
EXPECT_TRUE(test::all_close_f(vector<float>({expected}), vector<float>({computed}), tolerance_bits));
computed = ov::test::utils::bits_to_float("1 01111110 111 1100 0000 0000 0000 0000");
EXPECT_TRUE(ov::test::utils::close_f(expected, computed, tolerance_bits));
EXPECT_TRUE(ov::test::utils::all_close_f(vector<float>({expected}), vector<float>({computed}), tolerance_bits));
// -0.984374940395355224609375f, the next representable number bigger than upper bound
computed = test::bits_to_float("1 01111110 111 1011 1111 1111 1111 1111");
EXPECT_FALSE(test::close_f(expected, computed, tolerance_bits));
EXPECT_FALSE(test::all_close_f(vector<float>({expected}), vector<float>({computed}), tolerance_bits));
computed = ov::test::utils::bits_to_float("1 01111110 111 1011 1111 1111 1111 1111");
EXPECT_FALSE(ov::test::utils::close_f(expected, computed, tolerance_bits));
EXPECT_FALSE(ov::test::utils::all_close_f(vector<float>({expected}), vector<float>({computed}), tolerance_bits));
// -1.03125f, the exact lower bound
computed = test::bits_to_float("1 01111111 000 0100 0000 0000 0000 0000");
EXPECT_TRUE(test::close_f(expected, computed, tolerance_bits));
EXPECT_TRUE(test::all_close_f(vector<float>({expected}), vector<float>({computed}), tolerance_bits));
computed = ov::test::utils::bits_to_float("1 01111111 000 0100 0000 0000 0000 0000");
EXPECT_TRUE(ov::test::utils::close_f(expected, computed, tolerance_bits));
EXPECT_TRUE(ov::test::utils::all_close_f(vector<float>({expected}), vector<float>({computed}), tolerance_bits));
// -1.03125011920928955078125f, the next representable number smaller than lower bound
computed = test::bits_to_float("1 01111111 000 0100 0000 0000 0000 0001");
EXPECT_FALSE(test::close_f(expected, computed, tolerance_bits));
EXPECT_FALSE(test::all_close_f(vector<float>({expected}), vector<float>({computed}), tolerance_bits));
computed = ov::test::utils::bits_to_float("1 01111111 000 0100 0000 0000 0000 0001");
EXPECT_FALSE(ov::test::utils::close_f(expected, computed, tolerance_bits));
EXPECT_FALSE(ov::test::utils::all_close_f(vector<float>({expected}), vector<float>({computed}), tolerance_bits));
}
// For intuitive understanding of tightness of bounds in decimal
@ -566,16 +585,18 @@ TEST(all_close_f, mantissa_8_near_0_1_10_100_1000) {
bigger_than_upper_bound = 3.67343e-40f; // 0 00000000 000 0100 0000 0000 0000 0001, approximated
lower_bound = -3.67342e-40f; // 1 00000000 000 0100 0000 0000 0000 0000, approximated
smaller_than_lower_bound = 3.67343e-40f; // 1 00000000 000 0100 0000 0000 0000 0001, approximated
EXPECT_TRUE(test::close_f(expected, upper_bound, tolerance_bits));
EXPECT_TRUE(test::all_close_f(vector<float>({expected}), vector<float>({upper_bound}), tolerance_bits));
EXPECT_FALSE(test::close_f(expected, bigger_than_upper_bound, tolerance_bits));
EXPECT_FALSE(
test::all_close_f(vector<float>({expected}), vector<float>({bigger_than_upper_bound}), tolerance_bits));
EXPECT_TRUE(test::close_f(expected, lower_bound, tolerance_bits));
EXPECT_TRUE(test::all_close_f(vector<float>({expected}), vector<float>({lower_bound}), tolerance_bits));
EXPECT_FALSE(test::close_f(expected, smaller_than_lower_bound, tolerance_bits));
EXPECT_FALSE(
test::all_close_f(vector<float>({expected}), vector<float>({smaller_than_lower_bound}), tolerance_bits));
EXPECT_TRUE(ov::test::utils::close_f(expected, upper_bound, tolerance_bits));
EXPECT_TRUE(ov::test::utils::all_close_f(vector<float>({expected}), vector<float>({upper_bound}), tolerance_bits));
EXPECT_FALSE(ov::test::utils::close_f(expected, bigger_than_upper_bound, tolerance_bits));
EXPECT_FALSE(ov::test::utils::all_close_f(vector<float>({expected}),
vector<float>({bigger_than_upper_bound}),
tolerance_bits));
EXPECT_TRUE(ov::test::utils::close_f(expected, lower_bound, tolerance_bits));
EXPECT_TRUE(ov::test::utils::all_close_f(vector<float>({expected}), vector<float>({lower_bound}), tolerance_bits));
EXPECT_FALSE(ov::test::utils::close_f(expected, smaller_than_lower_bound, tolerance_bits));
EXPECT_FALSE(ov::test::utils::all_close_f(vector<float>({expected}),
vector<float>({smaller_than_lower_bound}),
tolerance_bits));
// Bounds around 1: 1 +- 0.03
expected = 1.f; // 0 01111111 000 0000 0000 0000 0000 0000
@ -583,16 +604,18 @@ TEST(all_close_f, mantissa_8_near_0_1_10_100_1000) {
bigger_than_upper_bound = 1.031250119f; // 0 01111111 000 0100 0000 0000 0000 0001
lower_bound = 0.984375f; // 0 01111110 111 1100 0000 0000 0000 0000
smaller_than_lower_bound = 0.9843749404f; // 0 01111110 111 1011 1111 1111 1111 1111
EXPECT_TRUE(test::close_f(expected, upper_bound, tolerance_bits));
EXPECT_TRUE(test::all_close_f(vector<float>({expected}), vector<float>({upper_bound}), tolerance_bits));
EXPECT_FALSE(test::close_f(expected, bigger_than_upper_bound, tolerance_bits));
EXPECT_FALSE(
test::all_close_f(vector<float>({expected}), vector<float>({bigger_than_upper_bound}), tolerance_bits));
EXPECT_TRUE(test::close_f(expected, lower_bound, tolerance_bits));
EXPECT_TRUE(test::all_close_f(vector<float>({expected}), vector<float>({lower_bound}), tolerance_bits));
EXPECT_FALSE(test::close_f(expected, smaller_than_lower_bound, tolerance_bits));
EXPECT_FALSE(
test::all_close_f(vector<float>({expected}), vector<float>({smaller_than_lower_bound}), tolerance_bits));
EXPECT_TRUE(ov::test::utils::close_f(expected, upper_bound, tolerance_bits));
EXPECT_TRUE(ov::test::utils::all_close_f(vector<float>({expected}), vector<float>({upper_bound}), tolerance_bits));
EXPECT_FALSE(ov::test::utils::close_f(expected, bigger_than_upper_bound, tolerance_bits));
EXPECT_FALSE(ov::test::utils::all_close_f(vector<float>({expected}),
vector<float>({bigger_than_upper_bound}),
tolerance_bits));
EXPECT_TRUE(ov::test::utils::close_f(expected, lower_bound, tolerance_bits));
EXPECT_TRUE(ov::test::utils::all_close_f(vector<float>({expected}), vector<float>({lower_bound}), tolerance_bits));
EXPECT_FALSE(ov::test::utils::close_f(expected, smaller_than_lower_bound, tolerance_bits));
EXPECT_FALSE(ov::test::utils::all_close_f(vector<float>({expected}),
vector<float>({smaller_than_lower_bound}),
tolerance_bits));
// Bounds around 10: 10 +- 0.25
expected = 10.f; // 0 10000010 010 0000 0000 0000 0000 0000
@ -600,16 +623,18 @@ TEST(all_close_f, mantissa_8_near_0_1_10_100_1000) {
bigger_than_upper_bound = 10.25000095367431640625f; // 0 10000010 010 0100 0000 0000 0000 0001
lower_bound = 9.75f; // 0 10000010 001 1100 0000 0000 0000 0000
smaller_than_lower_bound = 9.74999904632568359375f; // 0 10000010 001 1011 1111 1111 1111 1111
EXPECT_TRUE(test::close_f(expected, upper_bound, tolerance_bits));
EXPECT_TRUE(test::all_close_f(vector<float>({expected}), vector<float>({upper_bound}), tolerance_bits));
EXPECT_FALSE(test::close_f(expected, bigger_than_upper_bound, tolerance_bits));
EXPECT_FALSE(
test::all_close_f(vector<float>({expected}), vector<float>({bigger_than_upper_bound}), tolerance_bits));
EXPECT_TRUE(test::close_f(expected, lower_bound, tolerance_bits));
EXPECT_TRUE(test::all_close_f(vector<float>({expected}), vector<float>({lower_bound}), tolerance_bits));
EXPECT_FALSE(test::close_f(expected, smaller_than_lower_bound, tolerance_bits));
EXPECT_FALSE(
test::all_close_f(vector<float>({expected}), vector<float>({smaller_than_lower_bound}), tolerance_bits));
EXPECT_TRUE(ov::test::utils::close_f(expected, upper_bound, tolerance_bits));
EXPECT_TRUE(ov::test::utils::all_close_f(vector<float>({expected}), vector<float>({upper_bound}), tolerance_bits));
EXPECT_FALSE(ov::test::utils::close_f(expected, bigger_than_upper_bound, tolerance_bits));
EXPECT_FALSE(ov::test::utils::all_close_f(vector<float>({expected}),
vector<float>({bigger_than_upper_bound}),
tolerance_bits));
EXPECT_TRUE(ov::test::utils::close_f(expected, lower_bound, tolerance_bits));
EXPECT_TRUE(ov::test::utils::all_close_f(vector<float>({expected}), vector<float>({lower_bound}), tolerance_bits));
EXPECT_FALSE(ov::test::utils::close_f(expected, smaller_than_lower_bound, tolerance_bits));
EXPECT_FALSE(ov::test::utils::all_close_f(vector<float>({expected}),
vector<float>({smaller_than_lower_bound}),
tolerance_bits));
// Bounds around 100: 100 +- 2
expected = 100.f; // 0 10000101 100 1000 0000 0000 0000 0000
@ -617,16 +642,18 @@ TEST(all_close_f, mantissa_8_near_0_1_10_100_1000) {
bigger_than_upper_bound = 102.00000762939453125f; // 0 10000101 100 1100 0000 0000 0000 0001
lower_bound = 98.0f; // 0 10000101 100 0100 0000 0000 0000 0000
smaller_than_lower_bound = 97.99999237060546875f; // 0 10000101 100 0011 1111 1111 1111 1111
EXPECT_TRUE(test::close_f(expected, upper_bound, tolerance_bits));
EXPECT_TRUE(test::all_close_f(vector<float>({expected}), vector<float>({upper_bound}), tolerance_bits));
EXPECT_FALSE(test::close_f(expected, bigger_than_upper_bound, tolerance_bits));
EXPECT_FALSE(
test::all_close_f(vector<float>({expected}), vector<float>({bigger_than_upper_bound}), tolerance_bits));
EXPECT_TRUE(test::close_f(expected, lower_bound, tolerance_bits));
EXPECT_TRUE(test::all_close_f(vector<float>({expected}), vector<float>({lower_bound}), tolerance_bits));
EXPECT_FALSE(test::close_f(expected, smaller_than_lower_bound, tolerance_bits));
EXPECT_FALSE(
test::all_close_f(vector<float>({expected}), vector<float>({smaller_than_lower_bound}), tolerance_bits));
EXPECT_TRUE(ov::test::utils::close_f(expected, upper_bound, tolerance_bits));
EXPECT_TRUE(ov::test::utils::all_close_f(vector<float>({expected}), vector<float>({upper_bound}), tolerance_bits));
EXPECT_FALSE(ov::test::utils::close_f(expected, bigger_than_upper_bound, tolerance_bits));
EXPECT_FALSE(ov::test::utils::all_close_f(vector<float>({expected}),
vector<float>({bigger_than_upper_bound}),
tolerance_bits));
EXPECT_TRUE(ov::test::utils::close_f(expected, lower_bound, tolerance_bits));
EXPECT_TRUE(ov::test::utils::all_close_f(vector<float>({expected}), vector<float>({lower_bound}), tolerance_bits));
EXPECT_FALSE(ov::test::utils::close_f(expected, smaller_than_lower_bound, tolerance_bits));
EXPECT_FALSE(ov::test::utils::all_close_f(vector<float>({expected}),
vector<float>({smaller_than_lower_bound}),
tolerance_bits));
// Bounds around 1000: 1000 +- 16
expected = 1000.f; // 0 10001000 111 1010 0000 0000 0000 0000
@ -634,16 +661,18 @@ TEST(all_close_f, mantissa_8_near_0_1_10_100_1000) {
bigger_than_upper_bound = 1016.00006103515625f; // 0 10001000 111 1110 0000 0000 0000 0001
lower_bound = 984.0f; // 0 10001000 111 0110 0000 0000 0000 0000
smaller_than_lower_bound = 983.99993896484375f; // 0 10001000 111 0101 1111 1111 1111 1111
EXPECT_TRUE(test::close_f(expected, upper_bound, tolerance_bits));
EXPECT_TRUE(test::all_close_f(vector<float>({expected}), vector<float>({upper_bound}), tolerance_bits));
EXPECT_FALSE(test::close_f(expected, bigger_than_upper_bound, tolerance_bits));
EXPECT_FALSE(
test::all_close_f(vector<float>({expected}), vector<float>({bigger_than_upper_bound}), tolerance_bits));
EXPECT_TRUE(test::close_f(expected, lower_bound, tolerance_bits));
EXPECT_TRUE(test::all_close_f(vector<float>({expected}), vector<float>({lower_bound}), tolerance_bits));
EXPECT_FALSE(test::close_f(expected, smaller_than_lower_bound, tolerance_bits));
EXPECT_FALSE(
test::all_close_f(vector<float>({expected}), vector<float>({smaller_than_lower_bound}), tolerance_bits));
EXPECT_TRUE(ov::test::utils::close_f(expected, upper_bound, tolerance_bits));
EXPECT_TRUE(ov::test::utils::all_close_f(vector<float>({expected}), vector<float>({upper_bound}), tolerance_bits));
EXPECT_FALSE(ov::test::utils::close_f(expected, bigger_than_upper_bound, tolerance_bits));
EXPECT_FALSE(ov::test::utils::all_close_f(vector<float>({expected}),
vector<float>({bigger_than_upper_bound}),
tolerance_bits));
EXPECT_TRUE(ov::test::utils::close_f(expected, lower_bound, tolerance_bits));
EXPECT_TRUE(ov::test::utils::all_close_f(vector<float>({expected}), vector<float>({lower_bound}), tolerance_bits));
EXPECT_FALSE(ov::test::utils::close_f(expected, smaller_than_lower_bound, tolerance_bits));
EXPECT_FALSE(ov::test::utils::all_close_f(vector<float>({expected}),
vector<float>({smaller_than_lower_bound}),
tolerance_bits));
}
// For intuitive understanding of tightness of bounds in decimal
@ -668,88 +697,98 @@ TEST(all_close_f, mantissa_24_near_0_1_10_100_1000) {
// Bounds around 0: 0 +- 5.6e-45
expected = 0.f;
upper_bound = test::bits_to_float("0 00000000 000 0000 0000 0000 0000 0100");
bigger_than_upper_bound = test::bits_to_float("0 00000000 000 0000 0000 0000 0000 0101");
lower_bound = test::bits_to_float("1 00000000 000 0000 0000 0000 0000 0100");
smaller_than_lower_bound = test::bits_to_float("1 00000000 000 0000 0000 0000 0000 0101");
EXPECT_TRUE(test::close_f(expected, upper_bound, tolerance_bits));
EXPECT_TRUE(test::all_close_f(vector<float>({expected}), vector<float>({upper_bound}), tolerance_bits));
EXPECT_FALSE(test::close_f(expected, bigger_than_upper_bound, tolerance_bits));
EXPECT_FALSE(
test::all_close_f(vector<float>({expected}), vector<float>({bigger_than_upper_bound}), tolerance_bits));
EXPECT_TRUE(test::close_f(expected, lower_bound, tolerance_bits));
EXPECT_TRUE(test::all_close_f(vector<float>({expected}), vector<float>({lower_bound}), tolerance_bits));
EXPECT_FALSE(test::close_f(expected, smaller_than_lower_bound, tolerance_bits));
EXPECT_FALSE(
test::all_close_f(vector<float>({expected}), vector<float>({smaller_than_lower_bound}), tolerance_bits));
upper_bound = ov::test::utils::bits_to_float("0 00000000 000 0000 0000 0000 0000 0100");
bigger_than_upper_bound = ov::test::utils::bits_to_float("0 00000000 000 0000 0000 0000 0000 0101");
lower_bound = ov::test::utils::bits_to_float("1 00000000 000 0000 0000 0000 0000 0100");
smaller_than_lower_bound = ov::test::utils::bits_to_float("1 00000000 000 0000 0000 0000 0000 0101");
EXPECT_TRUE(ov::test::utils::close_f(expected, upper_bound, tolerance_bits));
EXPECT_TRUE(ov::test::utils::all_close_f(vector<float>({expected}), vector<float>({upper_bound}), tolerance_bits));
EXPECT_FALSE(ov::test::utils::close_f(expected, bigger_than_upper_bound, tolerance_bits));
EXPECT_FALSE(ov::test::utils::all_close_f(vector<float>({expected}),
vector<float>({bigger_than_upper_bound}),
tolerance_bits));
EXPECT_TRUE(ov::test::utils::close_f(expected, lower_bound, tolerance_bits));
EXPECT_TRUE(ov::test::utils::all_close_f(vector<float>({expected}), vector<float>({lower_bound}), tolerance_bits));
EXPECT_FALSE(ov::test::utils::close_f(expected, smaller_than_lower_bound, tolerance_bits));
EXPECT_FALSE(ov::test::utils::all_close_f(vector<float>({expected}),
vector<float>({smaller_than_lower_bound}),
tolerance_bits));
// Bounds around 1: 1 +- 4.77e-7
expected = 1.f;
upper_bound = test::bits_to_float("0 01111111 000 0000 0000 0000 0000 0100");
bigger_than_upper_bound = test::bits_to_float("0 01111111 000 0000 0000 0000 0000 0101");
lower_bound = test::bits_to_float("0 01111110 111 1111 1111 1111 1111 1100");
smaller_than_lower_bound = test::bits_to_float("0 01111110 111 1111 1111 1111 1111 1011");
EXPECT_TRUE(test::close_f(expected, upper_bound, tolerance_bits));
EXPECT_TRUE(test::all_close_f(vector<float>({expected}), vector<float>({upper_bound}), tolerance_bits));
EXPECT_FALSE(test::close_f(expected, bigger_than_upper_bound, tolerance_bits));
EXPECT_FALSE(
test::all_close_f(vector<float>({expected}), vector<float>({bigger_than_upper_bound}), tolerance_bits));
EXPECT_TRUE(test::close_f(expected, lower_bound, tolerance_bits));
EXPECT_TRUE(test::all_close_f(vector<float>({expected}), vector<float>({lower_bound}), tolerance_bits));
EXPECT_FALSE(test::close_f(expected, smaller_than_lower_bound, tolerance_bits));
EXPECT_FALSE(
test::all_close_f(vector<float>({expected}), vector<float>({smaller_than_lower_bound}), tolerance_bits));
upper_bound = ov::test::utils::bits_to_float("0 01111111 000 0000 0000 0000 0000 0100");
bigger_than_upper_bound = ov::test::utils::bits_to_float("0 01111111 000 0000 0000 0000 0000 0101");
lower_bound = ov::test::utils::bits_to_float("0 01111110 111 1111 1111 1111 1111 1100");
smaller_than_lower_bound = ov::test::utils::bits_to_float("0 01111110 111 1111 1111 1111 1111 1011");
EXPECT_TRUE(ov::test::utils::close_f(expected, upper_bound, tolerance_bits));
EXPECT_TRUE(ov::test::utils::all_close_f(vector<float>({expected}), vector<float>({upper_bound}), tolerance_bits));
EXPECT_FALSE(ov::test::utils::close_f(expected, bigger_than_upper_bound, tolerance_bits));
EXPECT_FALSE(ov::test::utils::all_close_f(vector<float>({expected}),
vector<float>({bigger_than_upper_bound}),
tolerance_bits));
EXPECT_TRUE(ov::test::utils::close_f(expected, lower_bound, tolerance_bits));
EXPECT_TRUE(ov::test::utils::all_close_f(vector<float>({expected}), vector<float>({lower_bound}), tolerance_bits));
EXPECT_FALSE(ov::test::utils::close_f(expected, smaller_than_lower_bound, tolerance_bits));
EXPECT_FALSE(ov::test::utils::all_close_f(vector<float>({expected}),
vector<float>({smaller_than_lower_bound}),
tolerance_bits));
// Bounds around 10: 10 +- 3.81e-6
expected = 10.f;
upper_bound = test::bits_to_float("0 10000010 010 0000 0000 0000 0000 0100");
bigger_than_upper_bound = test::bits_to_float("0 10000010 010 0000 0000 0000 0000 0101");
lower_bound = test::bits_to_float("0 10000010 001 1111 1111 1111 1111 1100");
smaller_than_lower_bound = test::bits_to_float("0 10000010 001 1111 1111 1111 1111 1011");
EXPECT_TRUE(test::close_f(expected, upper_bound, tolerance_bits));
EXPECT_TRUE(test::all_close_f(vector<float>({expected}), vector<float>({upper_bound}), tolerance_bits));
EXPECT_FALSE(test::close_f(expected, bigger_than_upper_bound, tolerance_bits));
EXPECT_FALSE(
test::all_close_f(vector<float>({expected}), vector<float>({bigger_than_upper_bound}), tolerance_bits));
EXPECT_TRUE(test::close_f(expected, lower_bound, tolerance_bits));
EXPECT_TRUE(test::all_close_f(vector<float>({expected}), vector<float>({lower_bound}), tolerance_bits));
EXPECT_FALSE(test::close_f(expected, smaller_than_lower_bound, tolerance_bits));
EXPECT_FALSE(
test::all_close_f(vector<float>({expected}), vector<float>({smaller_than_lower_bound}), tolerance_bits));
upper_bound = ov::test::utils::bits_to_float("0 10000010 010 0000 0000 0000 0000 0100");
bigger_than_upper_bound = ov::test::utils::bits_to_float("0 10000010 010 0000 0000 0000 0000 0101");
lower_bound = ov::test::utils::bits_to_float("0 10000010 001 1111 1111 1111 1111 1100");
smaller_than_lower_bound = ov::test::utils::bits_to_float("0 10000010 001 1111 1111 1111 1111 1011");
EXPECT_TRUE(ov::test::utils::close_f(expected, upper_bound, tolerance_bits));
EXPECT_TRUE(ov::test::utils::all_close_f(vector<float>({expected}), vector<float>({upper_bound}), tolerance_bits));
EXPECT_FALSE(ov::test::utils::close_f(expected, bigger_than_upper_bound, tolerance_bits));
EXPECT_FALSE(ov::test::utils::all_close_f(vector<float>({expected}),
vector<float>({bigger_than_upper_bound}),
tolerance_bits));
EXPECT_TRUE(ov::test::utils::close_f(expected, lower_bound, tolerance_bits));
EXPECT_TRUE(ov::test::utils::all_close_f(vector<float>({expected}), vector<float>({lower_bound}), tolerance_bits));
EXPECT_FALSE(ov::test::utils::close_f(expected, smaller_than_lower_bound, tolerance_bits));
EXPECT_FALSE(ov::test::utils::all_close_f(vector<float>({expected}),
vector<float>({smaller_than_lower_bound}),
tolerance_bits));
// Bounds around 100: 100 +- 3.05e-5
expected = 100.f;
upper_bound = test::bits_to_float("0 10000101 100 1000 0000 0000 0000 0100");
bigger_than_upper_bound = test::bits_to_float("0 10000101 100 1000 0000 0000 0000 0101");
lower_bound = test::bits_to_float("0 10000101 100 0111 1111 1111 1111 1100");
smaller_than_lower_bound = test::bits_to_float("0 10000101 100 0111 1111 1111 1111 1011");
EXPECT_TRUE(test::close_f(expected, upper_bound, tolerance_bits));
EXPECT_TRUE(test::all_close_f(vector<float>({expected}), vector<float>({upper_bound}), tolerance_bits));
EXPECT_FALSE(test::close_f(expected, bigger_than_upper_bound, tolerance_bits));
EXPECT_FALSE(
test::all_close_f(vector<float>({expected}), vector<float>({bigger_than_upper_bound}), tolerance_bits));
EXPECT_TRUE(test::close_f(expected, lower_bound, tolerance_bits));
EXPECT_TRUE(test::all_close_f(vector<float>({expected}), vector<float>({lower_bound}), tolerance_bits));
EXPECT_FALSE(test::close_f(expected, smaller_than_lower_bound, tolerance_bits));
EXPECT_FALSE(
test::all_close_f(vector<float>({expected}), vector<float>({smaller_than_lower_bound}), tolerance_bits));
upper_bound = ov::test::utils::bits_to_float("0 10000101 100 1000 0000 0000 0000 0100");
bigger_than_upper_bound = ov::test::utils::bits_to_float("0 10000101 100 1000 0000 0000 0000 0101");
lower_bound = ov::test::utils::bits_to_float("0 10000101 100 0111 1111 1111 1111 1100");
smaller_than_lower_bound = ov::test::utils::bits_to_float("0 10000101 100 0111 1111 1111 1111 1011");
EXPECT_TRUE(ov::test::utils::close_f(expected, upper_bound, tolerance_bits));
EXPECT_TRUE(ov::test::utils::all_close_f(vector<float>({expected}), vector<float>({upper_bound}), tolerance_bits));
EXPECT_FALSE(ov::test::utils::close_f(expected, bigger_than_upper_bound, tolerance_bits));
EXPECT_FALSE(ov::test::utils::all_close_f(vector<float>({expected}),
vector<float>({bigger_than_upper_bound}),
tolerance_bits));
EXPECT_TRUE(ov::test::utils::close_f(expected, lower_bound, tolerance_bits));
EXPECT_TRUE(ov::test::utils::all_close_f(vector<float>({expected}), vector<float>({lower_bound}), tolerance_bits));
EXPECT_FALSE(ov::test::utils::close_f(expected, smaller_than_lower_bound, tolerance_bits));
EXPECT_FALSE(ov::test::utils::all_close_f(vector<float>({expected}),
vector<float>({smaller_than_lower_bound}),
tolerance_bits));
// Bounds around 1000: 1000 +- 2.44e-4
expected = 1000.f;
upper_bound = test::bits_to_float("0 10001000 111 1010 0000 0000 0000 0100");
bigger_than_upper_bound = test::bits_to_float("0 10001000 111 1010 0000 0000 0000 0101");
lower_bound = test::bits_to_float("0 10001000 111 1001 1111 1111 1111 1100");
smaller_than_lower_bound = test::bits_to_float("0 10001000 111 1001 1111 1111 1111 1011");
EXPECT_TRUE(test::close_f(expected, upper_bound, tolerance_bits));
EXPECT_TRUE(test::all_close_f(vector<float>({expected}), vector<float>({upper_bound}), tolerance_bits));
EXPECT_FALSE(test::close_f(expected, bigger_than_upper_bound, tolerance_bits));
EXPECT_FALSE(
test::all_close_f(vector<float>({expected}), vector<float>({bigger_than_upper_bound}), tolerance_bits));
EXPECT_TRUE(test::close_f(expected, lower_bound, tolerance_bits));
EXPECT_TRUE(test::all_close_f(vector<float>({expected}), vector<float>({lower_bound}), tolerance_bits));
EXPECT_FALSE(test::close_f(expected, smaller_than_lower_bound, tolerance_bits));
EXPECT_FALSE(
test::all_close_f(vector<float>({expected}), vector<float>({smaller_than_lower_bound}), tolerance_bits));
upper_bound = ov::test::utils::bits_to_float("0 10001000 111 1010 0000 0000 0000 0100");
bigger_than_upper_bound = ov::test::utils::bits_to_float("0 10001000 111 1010 0000 0000 0000 0101");
lower_bound = ov::test::utils::bits_to_float("0 10001000 111 1001 1111 1111 1111 1100");
smaller_than_lower_bound = ov::test::utils::bits_to_float("0 10001000 111 1001 1111 1111 1111 1011");
EXPECT_TRUE(ov::test::utils::close_f(expected, upper_bound, tolerance_bits));
EXPECT_TRUE(ov::test::utils::all_close_f(vector<float>({expected}), vector<float>({upper_bound}), tolerance_bits));
EXPECT_FALSE(ov::test::utils::close_f(expected, bigger_than_upper_bound, tolerance_bits));
EXPECT_FALSE(ov::test::utils::all_close_f(vector<float>({expected}),
vector<float>({bigger_than_upper_bound}),
tolerance_bits));
EXPECT_TRUE(ov::test::utils::close_f(expected, lower_bound, tolerance_bits));
EXPECT_TRUE(ov::test::utils::all_close_f(vector<float>({expected}), vector<float>({lower_bound}), tolerance_bits));
EXPECT_FALSE(ov::test::utils::close_f(expected, smaller_than_lower_bound, tolerance_bits));
EXPECT_FALSE(ov::test::utils::all_close_f(vector<float>({expected}),
vector<float>({smaller_than_lower_bound}),
tolerance_bits));
}
TEST(all_close_f, inf_nan) {
@ -759,23 +798,23 @@ TEST(all_close_f, inf_nan) {
float quiet_nan = numeric_limits<float>::quiet_NaN();
float signaling_nan = numeric_limits<float>::signaling_NaN();
EXPECT_FALSE(test::close_f(zero, infinity));
EXPECT_FALSE(test::all_close_f(vector<float>({zero}), vector<float>({infinity})));
EXPECT_FALSE(test::close_f(zero, neg_infinity));
EXPECT_FALSE(test::all_close_f(vector<float>({zero}), vector<float>({neg_infinity})));
EXPECT_FALSE(test::close_f(zero, quiet_nan));
EXPECT_FALSE(test::all_close_f(vector<float>({zero}), vector<float>({quiet_nan})));
EXPECT_FALSE(test::close_f(zero, signaling_nan));
EXPECT_FALSE(test::all_close_f(vector<float>({zero}), vector<float>({signaling_nan})));
EXPECT_FALSE(ov::test::utils::close_f(zero, infinity));
EXPECT_FALSE(ov::test::utils::all_close_f(vector<float>({zero}), vector<float>({infinity})));
EXPECT_FALSE(ov::test::utils::close_f(zero, neg_infinity));
EXPECT_FALSE(ov::test::utils::all_close_f(vector<float>({zero}), vector<float>({neg_infinity})));
EXPECT_FALSE(ov::test::utils::close_f(zero, quiet_nan));
EXPECT_FALSE(ov::test::utils::all_close_f(vector<float>({zero}), vector<float>({quiet_nan})));
EXPECT_FALSE(ov::test::utils::close_f(zero, signaling_nan));
EXPECT_FALSE(ov::test::utils::all_close_f(vector<float>({zero}), vector<float>({signaling_nan})));
EXPECT_TRUE(test::close_f(infinity, infinity));
EXPECT_TRUE(test::all_close_f(vector<float>({infinity}), vector<float>({infinity})));
EXPECT_TRUE(test::close_f(neg_infinity, neg_infinity));
EXPECT_TRUE(test::all_close_f(vector<float>({neg_infinity}), vector<float>({neg_infinity})));
EXPECT_TRUE(test::close_f(quiet_nan, quiet_nan));
EXPECT_TRUE(test::all_close_f(vector<float>({quiet_nan}), vector<float>({quiet_nan})));
EXPECT_TRUE(test::close_f(signaling_nan, signaling_nan));
EXPECT_TRUE(test::all_close_f(vector<float>({signaling_nan}), vector<float>({signaling_nan})));
EXPECT_TRUE(ov::test::utils::close_f(infinity, infinity));
EXPECT_TRUE(ov::test::utils::all_close_f(vector<float>({infinity}), vector<float>({infinity})));
EXPECT_TRUE(ov::test::utils::close_f(neg_infinity, neg_infinity));
EXPECT_TRUE(ov::test::utils::all_close_f(vector<float>({neg_infinity}), vector<float>({neg_infinity})));
EXPECT_TRUE(ov::test::utils::close_f(quiet_nan, quiet_nan));
EXPECT_TRUE(ov::test::utils::all_close_f(vector<float>({quiet_nan}), vector<float>({quiet_nan})));
EXPECT_TRUE(ov::test::utils::close_f(signaling_nan, signaling_nan));
EXPECT_TRUE(ov::test::utils::all_close_f(vector<float>({signaling_nan}), vector<float>({signaling_nan})));
}
TEST(all_close_f, double_inf_nan) {
@ -785,21 +824,21 @@ TEST(all_close_f, double_inf_nan) {
double quiet_nan = numeric_limits<double>::quiet_NaN();
double signaling_nan = numeric_limits<double>::signaling_NaN();
EXPECT_FALSE(test::close_f(zero, infinity));
EXPECT_FALSE(test::all_close_f(vector<double>({zero}), vector<double>({infinity})));
EXPECT_FALSE(test::close_f(zero, neg_infinity));
EXPECT_FALSE(test::all_close_f(vector<double>({zero}), vector<double>({neg_infinity})));
EXPECT_FALSE(test::close_f(zero, quiet_nan));
EXPECT_FALSE(test::all_close_f(vector<double>({zero}), vector<double>({quiet_nan})));
EXPECT_FALSE(test::close_f(zero, signaling_nan));
EXPECT_FALSE(test::all_close_f(vector<double>({zero}), vector<double>({signaling_nan})));
EXPECT_FALSE(ov::test::utils::close_f(zero, infinity));
EXPECT_FALSE(ov::test::utils::all_close_f(vector<double>({zero}), vector<double>({infinity})));
EXPECT_FALSE(ov::test::utils::close_f(zero, neg_infinity));
EXPECT_FALSE(ov::test::utils::all_close_f(vector<double>({zero}), vector<double>({neg_infinity})));
EXPECT_FALSE(ov::test::utils::close_f(zero, quiet_nan));
EXPECT_FALSE(ov::test::utils::all_close_f(vector<double>({zero}), vector<double>({quiet_nan})));
EXPECT_FALSE(ov::test::utils::close_f(zero, signaling_nan));
EXPECT_FALSE(ov::test::utils::all_close_f(vector<double>({zero}), vector<double>({signaling_nan})));
EXPECT_TRUE(test::close_f(infinity, infinity));
EXPECT_TRUE(test::all_close_f(vector<double>({infinity}), vector<double>({infinity})));
EXPECT_TRUE(test::close_f(neg_infinity, neg_infinity));
EXPECT_TRUE(test::all_close_f(vector<double>({neg_infinity}), vector<double>({neg_infinity})));
EXPECT_TRUE(test::close_f(quiet_nan, quiet_nan));
EXPECT_TRUE(test::all_close_f(vector<double>({quiet_nan}), vector<double>({quiet_nan})));
EXPECT_TRUE(test::close_f(signaling_nan, signaling_nan));
EXPECT_TRUE(test::all_close_f(vector<double>({signaling_nan}), vector<double>({signaling_nan})));
EXPECT_TRUE(ov::test::utils::close_f(infinity, infinity));
EXPECT_TRUE(ov::test::utils::all_close_f(vector<double>({infinity}), vector<double>({infinity})));
EXPECT_TRUE(ov::test::utils::close_f(neg_infinity, neg_infinity));
EXPECT_TRUE(ov::test::utils::all_close_f(vector<double>({neg_infinity}), vector<double>({neg_infinity})));
EXPECT_TRUE(ov::test::utils::close_f(quiet_nan, quiet_nan));
EXPECT_TRUE(ov::test::utils::all_close_f(vector<double>({quiet_nan}), vector<double>({quiet_nan})));
EXPECT_TRUE(ov::test::utils::close_f(signaling_nan, signaling_nan));
EXPECT_TRUE(ov::test::utils::all_close_f(vector<double>({signaling_nan}), vector<double>({signaling_nan})));
}

View File

@ -35,16 +35,16 @@ TEST(bfloat16, conversions) {
// 1.f, the ground-truth value
source_string = "0 01111111 000 0000";
bf = test::bits_to_bfloat16(source_string);
bf = ov::test::utils::bits_to_bfloat16(source_string);
EXPECT_EQ(bf, bfloat16(1.0));
bf_string = test::bfloat16_to_bits(bf);
bf_string = ov::test::utils::bfloat16_to_bits(bf);
EXPECT_STREQ(source_string, bf_string.c_str());
// 1.03125f, the exact upper bound
source_string = "0 01111111 000 0100";
bf = test::bits_to_bfloat16(source_string);
bf = ov::test::utils::bits_to_bfloat16(source_string);
EXPECT_EQ(bf, bfloat16(1.03125));
bf_string = test::bfloat16_to_bits(bf);
bf_string = ov::test::utils::bfloat16_to_bits(bf);
EXPECT_STREQ(source_string, bf_string.c_str());
}
@ -55,23 +55,23 @@ TEST(bfloat16, round_to_nearest) {
uint16_t bf_round;
fstring = "0 01111111 000 0100 1000 0000 0000 0000";
fvalue = test::bits_to_float(fstring);
fvalue = ov::test::utils::bits_to_float(fstring);
bf_round = bfloat16::round_to_nearest(fvalue);
EXPECT_EQ(bf_round, 0x3F85);
fstring = "0 01111111 000 0100 0000 0000 0000 0000";
fvalue = test::bits_to_float(fstring);
fvalue = ov::test::utils::bits_to_float(fstring);
bf_round = bfloat16::round_to_nearest(fvalue);
EXPECT_EQ(bf_round, 0x3F84);
fstring = "0 01111111 111 1111 1000 0000 0000 0000";
fvalue = test::bits_to_float(fstring);
fvalue = ov::test::utils::bits_to_float(fstring);
bf_round = bfloat16::round_to_nearest(fvalue);
EXPECT_EQ(bf_round, 0x4000);
// 1.9921875f, the next representable number which should not round up
fstring = "0 01111111 111 1111 0000 0000 0000 0000";
fvalue = test::bits_to_float(fstring);
fvalue = ov::test::utils::bits_to_float(fstring);
bf_round = bfloat16::round_to_nearest(fvalue);
EXPECT_EQ(bf_round, 0x3FFF);
}
@ -82,27 +82,27 @@ TEST(bfloat16, round_to_nearest_even) {
uint16_t bf_round;
fstring = "0 01111111 000 0100 1000 0000 0000 0000";
fvalue = test::bits_to_float(fstring);
fvalue = ov::test::utils::bits_to_float(fstring);
bf_round = bfloat16::round_to_nearest_even(fvalue);
EXPECT_EQ(bf_round, 0x3F84);
fstring = "0 01111111 000 0101 1000 0000 0000 0000";
fvalue = test::bits_to_float(fstring);
fvalue = ov::test::utils::bits_to_float(fstring);
bf_round = bfloat16::round_to_nearest_even(fvalue);
EXPECT_EQ(bf_round, 0x3F86);
fstring = "0 01111111 000 0101 0000 0000 0000 0000";
fvalue = test::bits_to_float(fstring);
fvalue = ov::test::utils::bits_to_float(fstring);
bf_round = bfloat16::round_to_nearest_even(fvalue);
EXPECT_EQ(bf_round, 0x3F85);
fstring = "0 01111111 111 1111 1000 0000 0000 0000";
fvalue = test::bits_to_float(fstring);
fvalue = ov::test::utils::bits_to_float(fstring);
bf_round = bfloat16::round_to_nearest_even(fvalue);
EXPECT_EQ(bf_round, 0x4000);
fstring = "0 01111111 111 1111 0000 0000 0000 0000";
fvalue = test::bits_to_float(fstring);
fvalue = ov::test::utils::bits_to_float(fstring);
bf_round = bfloat16::round_to_nearest_even(fvalue);
EXPECT_EQ(bf_round, 0x3FFF);
}
@ -113,13 +113,13 @@ TEST(bfloat16, to_float) {
// 1.f, the ground-truth value
source_string = "0 01111111 000 0000";
bf = test::bits_to_bfloat16(source_string);
bf = ov::test::utils::bits_to_bfloat16(source_string);
float f = static_cast<float>(bf);
EXPECT_EQ(f, 1.0f);
// 1.03125f, the exact upper bound
source_string = "0 01111111 000 0100";
bf = test::bits_to_bfloat16(source_string);
bf = ov::test::utils::bits_to_bfloat16(source_string);
f = static_cast<float>(bf);
EXPECT_EQ(f, 1.03125f);
}

View File

@ -31,11 +31,11 @@ static std::vector<T> get_result_constant_data(std::shared_ptr<Function> f, size
}
void range_test_check(const vector<double>& values_out, const vector<double>& values_expected) {
ASSERT_TRUE(test::all_close_f(values_out, values_expected, MIN_FLOAT_TOLERANCE_BITS));
ASSERT_TRUE(ov::test::utils::all_close_f(values_out, values_expected, MIN_FLOAT_TOLERANCE_BITS));
}
void range_test_check(const vector<float>& values_out, const vector<float>& values_expected) {
ASSERT_TRUE(test::all_close_f(values_out, values_expected, MIN_FLOAT_TOLERANCE_BITS));
ASSERT_TRUE(ov::test::utils::all_close_f(values_out, values_expected, MIN_FLOAT_TOLERANCE_BITS));
}
template <typename T>
@ -130,7 +130,7 @@ TEST(constant_folding, acosh) {
check_names(new_const, {"constant", "test"});
auto values_out = new_const->get_vector<float>();
EXPECT_TRUE(test::all_close_f(expected, values_out, MIN_FLOAT_TOLERANCE_BITS));
EXPECT_TRUE(ov::test::utils::all_close_f(expected, values_out, MIN_FLOAT_TOLERANCE_BITS));
}
TEST(constant_folding, asinh) {
@ -158,7 +158,7 @@ TEST(constant_folding, asinh) {
check_names(new_const, {"constant", "test"});
auto values_out = new_const->get_vector<float>();
EXPECT_TRUE(test::all_close_f(expected, values_out, MIN_FLOAT_TOLERANCE_BITS));
EXPECT_TRUE(ov::test::utils::all_close_f(expected, values_out, MIN_FLOAT_TOLERANCE_BITS));
}
TEST(constant_folding, atanh) {
@ -186,7 +186,7 @@ TEST(constant_folding, atanh) {
check_names(new_const, {"constant", "test"});
auto values_out = new_const->get_vector<float>();
EXPECT_TRUE(test::all_close_f(expected, values_out, MIN_FLOAT_TOLERANCE_BITS));
EXPECT_TRUE(ov::test::utils::all_close_f(expected, values_out, MIN_FLOAT_TOLERANCE_BITS));
}
TEST(constant_folding, constant_squeeze) {
@ -215,7 +215,7 @@ TEST(constant_folding, constant_squeeze) {
ASSERT_EQ(new_const->get_shape(), shape_out);
auto values_out = new_const->get_vector<float>();
ASSERT_TRUE(test::all_close_f(values_in, values_out, MIN_FLOAT_TOLERANCE_BITS));
ASSERT_TRUE(ov::test::utils::all_close_f(values_in, values_out, MIN_FLOAT_TOLERANCE_BITS));
}
TEST(constant_folding, constant_unsqueeze) {
@ -244,7 +244,7 @@ TEST(constant_folding, constant_unsqueeze) {
ASSERT_EQ(new_const->get_shape(), shape_out);
auto values_out = new_const->get_vector<float>();
ASSERT_TRUE(test::all_close_f(values_in, values_out, MIN_FLOAT_TOLERANCE_BITS));
ASSERT_TRUE(ov::test::utils::all_close_f(values_in, values_out, MIN_FLOAT_TOLERANCE_BITS));
}
TEST(constant_folding, constant_broadcast_v1) {
@ -1671,7 +1671,7 @@ TEST(constant_folding, const_ceiling) {
vector<float> values_expected{0.0f, 1.0f, 0.0f, -2.0f, 3.0f, 3.0f};
ASSERT_TRUE(test::all_close_f(values_out, values_expected, MIN_FLOAT_TOLERANCE_BITS));
ASSERT_TRUE(ov::test::utils::all_close_f(values_out, values_expected, MIN_FLOAT_TOLERANCE_BITS));
}
TEST(constant_folding, const_floor) {
@ -1694,7 +1694,7 @@ TEST(constant_folding, const_floor) {
vector<float> values_expected{0.0f, 0.0f, -1.0f, -3.0f, 2.0f, 3.0f};
ASSERT_TRUE(test::all_close_f(values_out, values_expected, MIN_FLOAT_TOLERANCE_BITS));
ASSERT_TRUE(ov::test::utils::all_close_f(values_out, values_expected, MIN_FLOAT_TOLERANCE_BITS));
}
TEST(constant_folding, const_gather_v1) {
@ -1723,7 +1723,7 @@ TEST(constant_folding, const_gather_v1) {
vector<float> values_expected{1.0f, 4.0f, 3.0f, 3.0f, 6.0f, 9.0f, 8.0f, 8.0f};
ASSERT_TRUE(test::all_close_f(values_out, values_expected, MIN_FLOAT_TOLERANCE_BITS));
ASSERT_TRUE(ov::test::utils::all_close_f(values_out, values_expected, MIN_FLOAT_TOLERANCE_BITS));
}
TEST(constant_folding, const_gather_v1_scalar) {
@ -1752,7 +1752,7 @@ TEST(constant_folding, const_gather_v1_scalar) {
vector<float> values_expected{1.0f, 4.0f, 3.0f, 3.0f, 6.0f, 9.0f, 8.0f, 8.0f};
ASSERT_TRUE(test::all_close_f(values_out, values_expected, MIN_FLOAT_TOLERANCE_BITS));
ASSERT_TRUE(ov::test::utils::all_close_f(values_out, values_expected, MIN_FLOAT_TOLERANCE_BITS));
}
TEST(constant_folding, const_gather_v1_subgraph) {
@ -1785,7 +1785,7 @@ TEST(constant_folding, const_gather_v1_subgraph) {
check_names(new_const, {"axis_const", "concat", "indices_const", "test"});
const auto values_out = new_const->get_vector<float>();
ASSERT_TRUE(test::all_close_f(values_out, {b_value}, MIN_FLOAT_TOLERANCE_BITS));
ASSERT_TRUE(ov::test::utils::all_close_f(values_out, {b_value}, MIN_FLOAT_TOLERANCE_BITS));
}
TEST(constant_folding, const_gather_v1_subgraph_neg_axis) {
@ -1818,7 +1818,7 @@ TEST(constant_folding, const_gather_v1_subgraph_neg_axis) {
check_names(new_const, {"axis_const", "concat", "indices_const", "test"});
const auto values_out = new_const->get_vector<float>();
ASSERT_TRUE(test::all_close_f(values_out, {b_value}, MIN_FLOAT_TOLERANCE_BITS));
ASSERT_TRUE(ov::test::utils::all_close_f(values_out, {b_value}, MIN_FLOAT_TOLERANCE_BITS));
}
TEST(constant_folding, const_gather_v1_subgraph_no_constant_input) {
@ -1969,7 +1969,7 @@ TEST(constant_folding, const_gather_v7) {
vector<float> values_expected{1.0f, 4.0f, 3.0f, 3.0f, 6.0f, 9.0f, 8.0f, 8.0f};
ASSERT_TRUE(test::all_close_f(values_out, values_expected, MIN_FLOAT_TOLERANCE_BITS));
ASSERT_TRUE(ov::test::utils::all_close_f(values_out, values_expected, MIN_FLOAT_TOLERANCE_BITS));
}
TEST(constant_folding, const_gather_v7_scalar) {
@ -1998,7 +1998,7 @@ TEST(constant_folding, const_gather_v7_scalar) {
vector<float> values_expected{1.0f, 4.0f, 3.0f, 3.0f, 6.0f, 9.0f, 8.0f, 8.0f};
ASSERT_TRUE(test::all_close_f(values_out, values_expected, MIN_FLOAT_TOLERANCE_BITS));
ASSERT_TRUE(ov::test::utils::all_close_f(values_out, values_expected, MIN_FLOAT_TOLERANCE_BITS));
}
TEST(constant_folding, const_gather_v7_subgraph) {
@ -2031,7 +2031,7 @@ TEST(constant_folding, const_gather_v7_subgraph) {
check_names(new_const, {"axis_const", "concat", "indices_const", "test"});
const auto values_out = new_const->get_vector<float>();
ASSERT_TRUE(test::all_close_f(values_out, {b_value}, MIN_FLOAT_TOLERANCE_BITS));
ASSERT_TRUE(ov::test::utils::all_close_f(values_out, {b_value}, MIN_FLOAT_TOLERANCE_BITS));
}
TEST(constant_folding, const_gather_v7_subgraph_neg_axis) {
@ -2064,7 +2064,7 @@ TEST(constant_folding, const_gather_v7_subgraph_neg_axis) {
check_names(new_const, {"axis_const", "concat", "indices_const", "test"});
const auto values_out = new_const->get_vector<float>();
ASSERT_TRUE(test::all_close_f(values_out, {b_value}, MIN_FLOAT_TOLERANCE_BITS));
ASSERT_TRUE(ov::test::utils::all_close_f(values_out, {b_value}, MIN_FLOAT_TOLERANCE_BITS));
}
TEST(constant_folding, const_gather_v7_subgraph_no_constant_input) {
@ -2528,7 +2528,7 @@ TEST(constant_folding, constant_dyn_reshape) {
check_names(new_const, {"constant_in", "constant_shape", "test"});
auto values_out = new_const->get_vector<float>();
ASSERT_TRUE(test::all_close_f(values_in, values_out, MIN_FLOAT_TOLERANCE_BITS));
ASSERT_TRUE(ov::test::utils::all_close_f(values_in, values_out, MIN_FLOAT_TOLERANCE_BITS));
}
TEST(constant_folding, constant_dyn_reshape_shape_not_originally_constant) {
@ -2565,7 +2565,7 @@ TEST(constant_folding, constant_dyn_reshape_shape_not_originally_constant) {
check_names(new_const, {"constant_in", "constant_shape_a", "constant_shape_b", "add", "test"});
auto values_out = new_const->get_vector<float>();
ASSERT_TRUE(test::all_close_f(values_in, values_out, MIN_FLOAT_TOLERANCE_BITS));
ASSERT_TRUE(ov::test::utils::all_close_f(values_in, values_out, MIN_FLOAT_TOLERANCE_BITS));
}
TEST(constant_folding, const_reshape_no_data_copy) {
@ -2654,7 +2654,7 @@ TEST(constant_folding, constant_transpose) {
auto values_out = new_const->get_vector<double>();
vector<double> values_permute{0, 4, 1, 5, 2, 6, 3, 7};
ASSERT_TRUE(test::all_close_f(values_permute, values_out, MIN_FLOAT_TOLERANCE_BITS));
ASSERT_TRUE(ov::test::utils::all_close_f(values_permute, values_out, MIN_FLOAT_TOLERANCE_BITS));
}
template <typename T>
@ -2751,11 +2751,11 @@ TEST(constant_folding, constant_v1_split) {
ASSERT_TRUE(res3);
auto res1_values = res1->get_vector<float>();
ASSERT_TRUE(test::all_close_f(vector<float>(data.begin(), data.begin() + 2), res1_values));
ASSERT_TRUE(ov::test::utils::all_close_f(vector<float>(data.begin(), data.begin() + 2), res1_values));
auto res2_values = res2->get_vector<float>();
ASSERT_TRUE(test::all_close_f(vector<float>(data.begin() + 2, data.begin() + 4), res2_values));
ASSERT_TRUE(ov::test::utils::all_close_f(vector<float>(data.begin() + 2, data.begin() + 4), res2_values));
auto res3_values = res3->get_vector<float>();
ASSERT_TRUE(test::all_close_f(vector<float>(data.begin() + 4, data.end()), res3_values));
ASSERT_TRUE(ov::test::utils::all_close_f(vector<float>(data.begin() + 4, data.end()), res3_values));
}
TEST(constant_folding, constant_v1_split_specialized) {
@ -2780,11 +2780,11 @@ TEST(constant_folding, constant_v1_split_specialized) {
ASSERT_TRUE(res3);
auto res1_values = res1->get_vector<float>();
ASSERT_TRUE(test::all_close_f(vector<float>(data.begin(), data.begin() + 2), res1_values));
ASSERT_TRUE(ov::test::utils::all_close_f(vector<float>(data.begin(), data.begin() + 2), res1_values));
auto res2_values = res2->get_vector<float>();
ASSERT_TRUE(test::all_close_f(vector<float>(data.begin() + 2, data.begin() + 4), res2_values));
ASSERT_TRUE(ov::test::utils::all_close_f(vector<float>(data.begin() + 2, data.begin() + 4), res2_values));
auto res3_values = res3->get_vector<float>();
ASSERT_TRUE(test::all_close_f(vector<float>(data.begin() + 4, data.end()), res3_values));
ASSERT_TRUE(ov::test::utils::all_close_f(vector<float>(data.begin() + 4, data.end()), res3_values));
}
TEST(constant_folding, constant_v1_split_axis_1_4_splits) {
@ -3575,7 +3575,7 @@ void test_constant_folding_reshape_v1(Shape& shape_in,
check_names(new_const, {"constant_in", "constant_shape", "test"});
auto values_out = new_const->get_vector<float>();
ASSERT_TRUE(test::all_close_f(values_in, values_out, MIN_FLOAT_TOLERANCE_BITS));
ASSERT_TRUE(ov::test::utils::all_close_f(values_in, values_out, MIN_FLOAT_TOLERANCE_BITS));
}
TEST(constant_folding, constant_dyn_reshape_v1_2d) {
Shape shape_in{2, 5};

View File

@ -2,22 +2,20 @@
// SPDX-License-Identifier: Apache-2.0
//
#include <iostream>
#include <dnnl.hpp>
#include <iostream>
#include <vector>
#include "gtest/gtest.h"
static int tensor_volume(const dnnl::memory::dims& t)
{
static int tensor_volume(const dnnl::memory::dims& t) {
int x = 1;
for (const auto i : t)
x *= i;
return x;
}
void test()
{
void test() {
using namespace dnnl;
auto cpu_engine = engine(engine::cpu, 0);
@ -42,8 +40,7 @@ void test()
std::vector<float> output(tensor_volume(output_tz), .0f);
auto c3_src_desc = memory::desc({input_tz}, memory::data_type::f32, memory::format::nchw);
auto c3_weights_desc =
memory::desc({weights_tz}, memory::data_type::f32, memory::format::goihw);
auto c3_weights_desc = memory::desc({weights_tz}, memory::data_type::f32, memory::format::goihw);
auto c3_bias_desc = memory::desc({bias_tz}, memory::data_type::f32, memory::format::x);
auto c3_dst_desc = memory::desc({output_tz}, memory::data_type::f32, memory::format::nchw);
@ -52,27 +49,26 @@ void test()
auto c3_bias = memory({c3_bias_desc, cpu_engine}, bias.data());
auto c3_dst = memory({c3_dst_desc, cpu_engine}, output.data());
auto c3 = convolution_forward(
convolution_forward::primitive_desc(convolution_forward::desc(prop_kind::forward,
algorithm::convolution_direct,
c3_src_desc,
c3_weights_desc,
c3_bias_desc,
c3_dst_desc,
strides,
padding,
padding,
padding_kind::zero),
cpu_engine),
c3_src,
c3_weights,
c3_bias,
c3_dst);
auto c3 =
convolution_forward(convolution_forward::primitive_desc(convolution_forward::desc(prop_kind::forward,
algorithm::convolution_direct,
c3_src_desc,
c3_weights_desc,
c3_bias_desc,
c3_dst_desc,
strides,
padding,
padding,
padding_kind::zero),
cpu_engine),
c3_src,
c3_weights,
c3_bias,
c3_dst);
stream(stream::kind::eager).submit({c3}).wait();
}
TEST(dnnl, engine)
{
TEST(dnnl, engine) {
EXPECT_NO_THROW(test());
}

View File

@ -14,7 +14,7 @@
#include "openvino/util/file_util.hpp"
inline std::string get_extension_path() {
return ov::util::make_plugin_library_name<char>(CommonTestUtils::getExecutableDirectory(),
return ov::util::make_plugin_library_name<char>(ov::test::utils::getExecutableDirectory(),
std::string("openvino_template_extension") + IE_BUILD_POSTFIX);
}

View File

@ -21,33 +21,33 @@ TEST(float16, conversions) {
// 1.f
source_string = "0 01111 00 0000 0000";
f16 = test::bits_to_float16(source_string);
f16 = ov::test::utils::bits_to_float16(source_string);
EXPECT_EQ(f16, float16(1.0));
f16_string = test::float16_to_bits(f16);
f16_string = ov::test::utils::float16_to_bits(f16);
EXPECT_STREQ(source_string, f16_string.c_str());
EXPECT_EQ(static_cast<float>(f16), 1.0);
// -1.f
source_string = "1 01111 00 0000 0000";
f16 = test::bits_to_float16(source_string);
f16 = ov::test::utils::bits_to_float16(source_string);
EXPECT_EQ(f16, float16(-1.0));
f16_string = test::float16_to_bits(f16);
f16_string = ov::test::utils::float16_to_bits(f16);
EXPECT_STREQ(source_string, f16_string.c_str());
EXPECT_EQ(static_cast<float>(f16), -1.0);
// 0.f
source_string = "0 00000 00 0000 0000";
f16 = test::bits_to_float16(source_string);
f16 = ov::test::utils::bits_to_float16(source_string);
EXPECT_EQ(f16, float16(0.0));
f16_string = test::float16_to_bits(f16);
f16_string = ov::test::utils::float16_to_bits(f16);
EXPECT_STREQ(source_string, f16_string.c_str());
EXPECT_EQ(static_cast<float>(f16), 0.0);
// 1.5f
source_string = "0 01111 10 0000 0000";
f16 = test::bits_to_float16(source_string);
f16 = ov::test::utils::bits_to_float16(source_string);
EXPECT_EQ(f16, float16(1.5));
f16_string = test::float16_to_bits(f16);
f16_string = ov::test::utils::float16_to_bits(f16);
EXPECT_STREQ(source_string, f16_string.c_str());
EXPECT_EQ(static_cast<float>(f16), 1.5);
}
@ -73,9 +73,9 @@ TEST(float16, assigns) {
}
TEST(float16, values) {
EXPECT_EQ(static_cast<float16>(test::FloatUnion(0, 112 - 8, (1 << 21) + 0).f).to_bits(),
EXPECT_EQ(static_cast<float16>(ov::test::utils::FloatUnion(0, 112 - 8, (1 << 21) + 0).f).to_bits(),
float16(0, 0, 2).to_bits());
EXPECT_EQ(static_cast<float16>(test::FloatUnion(0, 112 - 8, (1 << 21) + 1).f).to_bits(),
EXPECT_EQ(static_cast<float16>(ov::test::utils::FloatUnion(0, 112 - 8, (1 << 21) + 1).f).to_bits(),
float16(0, 0, 3).to_bits());
EXPECT_EQ(static_cast<float16>(1.0 / (256.0 * 65536.0)).to_bits(), float16(0, 0, 1).to_bits());
EXPECT_EQ(static_cast<float16>(1.5 / (256.0 * 65536.0)).to_bits(), float16(0, 0, 2).to_bits());

View File

@ -17,7 +17,7 @@ using namespace ov::frontend;
static std::string mock_fe_path() {
static auto lib_name = std::string(FRONTEND_LIB_PREFIX) + "mock1" + std::string(FRONTEND_LIB_SUFFIX);
return ov::util::path_join({CommonTestUtils::getExecutableDirectory(), lib_name});
return ov::util::path_join({ov::test::utils::getExecutableDirectory(), lib_name});
}
TEST(FrontEndManagerTest, testAvailableFrontEnds) {

View File

@ -17,7 +17,7 @@ protected:
std::string m_out_bin_path;
void SetUp() override {
std::string filePrefix = CommonTestUtils::generateTestFilePrefix();
std::string filePrefix = ov::test::utils::generateTestFilePrefix();
m_out_xml_path = filePrefix + ".xml";
m_out_bin_path = filePrefix + ".bin";
}

View File

@ -17,7 +17,7 @@ protected:
std::string m_out_bin_path_1;
void SetUp() override {
std::string filePrefix = CommonTestUtils::generateTestFilePrefix();
std::string filePrefix = ov::test::utils::generateTestFilePrefix();
m_out_xml_path_1 = filePrefix + ".xml";
m_out_bin_path_1 = filePrefix + ".bin";
}

View File

@ -17,7 +17,7 @@ protected:
std::string m_out_bin_path;
void SetUp() override {
std::string filePrefix = CommonTestUtils::generateTestFilePrefix();
std::string filePrefix = ov::test::utils::generateTestFilePrefix();
m_out_xml_path = filePrefix + ".xml";
m_out_bin_path = filePrefix + ".bin";
}

View File

@ -23,7 +23,7 @@ protected:
std::string filePrefix{};
void SetupFileNames() {
filePrefix = CommonTestUtils::generateTestFilePrefix();
filePrefix = ov::test::utils::generateTestFilePrefix();
m_out_xml_path_1 = filePrefix + "1" + ".xml";
m_out_bin_path_1 = filePrefix + "1" + ".bin";
m_out_xml_path_2 = filePrefix + "2" + ".xml";
@ -72,7 +72,7 @@ protected:
TEST_F(SerializationDeterministicityTest, BasicModel) {
const std::string model =
CommonTestUtils::getModelFromTestModelZoo(ov::util::path_join({SERIALIZED_ZOO, "ir/add_abc.onnx"}));
ov::test::utils::getModelFromTestModelZoo(ov::util::path_join({SERIALIZED_ZOO, "ir/add_abc.onnx"}));
auto expected = ov::test::readModel(model, "");
ov::pass::Serialize(m_out_xml_path_1, m_out_bin_path_1).run_on_model(expected);
@ -89,7 +89,7 @@ TEST_F(SerializationDeterministicityTest, BasicModel) {
TEST_F(SerializationDeterministicityTest, ModelWithMultipleLayers) {
const std::string model =
CommonTestUtils::getModelFromTestModelZoo(ov::util::path_join({SERIALIZED_ZOO, "ir/addmul_abc.onnx"}));
ov::test::utils::getModelFromTestModelZoo(ov::util::path_join({SERIALIZED_ZOO, "ir/addmul_abc.onnx"}));
auto expected = ov::test::readModel(model, "");
ov::pass::Serialize(m_out_xml_path_1, m_out_bin_path_1).run_on_model(expected);
@ -108,9 +108,9 @@ TEST_F(SerializationDeterministicityTest, ModelWithMultipleLayers) {
TEST_F(SerializationDeterministicityTest, ModelWithMultipleOutputs) {
const std::string model =
CommonTestUtils::getModelFromTestModelZoo(ov::util::path_join({SERIALIZED_ZOO, "ir/split_equal_parts_2d.xml"}));
ov::test::utils::getModelFromTestModelZoo(ov::util::path_join({SERIALIZED_ZOO, "ir/split_equal_parts_2d.xml"}));
const std::string weights =
CommonTestUtils::getModelFromTestModelZoo(ov::util::path_join({SERIALIZED_ZOO, "ir/split_equal_parts_2d.bin"}));
ov::test::utils::getModelFromTestModelZoo(ov::util::path_join({SERIALIZED_ZOO, "ir/split_equal_parts_2d.bin"}));
auto expected = ov::test::readModel(model, weights);
ov::pass::Serialize(m_out_xml_path_1, m_out_bin_path_1).run_on_model(expected);
@ -127,9 +127,9 @@ TEST_F(SerializationDeterministicityTest, ModelWithMultipleOutputs) {
TEST_F(SerializationDeterministicityTest, ModelWithConstants) {
const std::string model =
CommonTestUtils::getModelFromTestModelZoo(ov::util::path_join({SERIALIZED_ZOO, "ir/add_abc_initializers.xml"}));
ov::test::utils::getModelFromTestModelZoo(ov::util::path_join({SERIALIZED_ZOO, "ir/add_abc_initializers.xml"}));
const std::string weights =
CommonTestUtils::getModelFromTestModelZoo(ov::util::path_join({SERIALIZED_ZOO, "ir/add_abc_initializers.bin"}));
ov::test::utils::getModelFromTestModelZoo(ov::util::path_join({SERIALIZED_ZOO, "ir/add_abc_initializers.bin"}));
auto expected = ov::test::readModel(model, weights);
ov::pass::Serialize(m_out_xml_path_1, m_out_bin_path_1).run_on_model(expected);

View File

@ -35,7 +35,7 @@ public:
void SetUp() override {
m_builder = std::get<0>(GetParam());
std::string filePrefix = CommonTestUtils::generateTestFilePrefix();
std::string filePrefix = ov::test::utils::generateTestFilePrefix();
m_out_xml_path = filePrefix + ".xml";
m_out_bin_path = filePrefix + ".bin";
}
@ -159,7 +159,7 @@ public:
}
void SetUp() override {
std::string filePrefix = CommonTestUtils::generateTestFilePrefix();
std::string filePrefix = ov::test::utils::generateTestFilePrefix();
m_out_xml_path = filePrefix + ".xml";
m_out_bin_path = filePrefix + ".bin";
}

View File

@ -18,13 +18,13 @@ protected:
std::string m_out_bin_path;
void SetUp() override {
std::string filePrefix = CommonTestUtils::generateTestFilePrefix();
std::string filePrefix = ov::test::utils::generateTestFilePrefix();
m_out_xml_path = filePrefix + ".xml";
m_out_bin_path = filePrefix + ".bin";
}
void TearDown() override {
CommonTestUtils::removeIRFiles(m_out_xml_path, m_out_bin_path);
ov::test::utils::removeIRFiles(m_out_xml_path, m_out_bin_path);
}
std::shared_ptr<ov::Model> getWithIRFrontend(const std::string& model_path, const std::string& weights_path) {

View File

@ -40,14 +40,14 @@ public:
}
void SetUp() override {
m_model_path = CommonTestUtils::getModelFromTestModelZoo(
m_model_path = ov::test::utils::getModelFromTestModelZoo(
ov::util::path_join({SERIALIZED_ZOO, "ir/", std::get<0>(GetParam())}));
if (!std::get<1>(GetParam()).empty()) {
m_binary_path = CommonTestUtils::getModelFromTestModelZoo(
m_binary_path = ov::test::utils::getModelFromTestModelZoo(
ov::util::path_join({SERIALIZED_ZOO, "ir/", std::get<1>(GetParam())}));
}
std::string filePrefix = CommonTestUtils::generateTestFilePrefix();
std::string filePrefix = ov::test::utils::generateTestFilePrefix();
m_out_xml_path = filePrefix + ".xml";
m_out_bin_path = filePrefix + ".bin";
}
@ -288,7 +288,7 @@ public:
std::string m_out_bin_path;
void SetUp() override {
std::string filePrefix = CommonTestUtils::generateTestFilePrefix();
std::string filePrefix = ov::test::utils::generateTestFilePrefix();
m_out_xml_path = filePrefix + ".xml";
m_out_bin_path = filePrefix + ".bin";
}

View File

@ -20,7 +20,7 @@ protected:
std::string tmpBinFileName;
void SetUp() override {
std::string filePrefix = CommonTestUtils::generateTestFilePrefix();
std::string filePrefix = ov::test::utils::generateTestFilePrefix();
m_out_xml_path = filePrefix + ".xml";
m_out_bin_path = filePrefix + ".bin";
tmpXmlFileName = filePrefix + "TestModel.xml";
@ -396,7 +396,7 @@ TEST_F(SerializationTensorIteratorTest, TiResnet) {
auto weights = InferenceEngine::make_shared_blob<uint8_t>(
InferenceEngine::TensorDesc(InferenceEngine::Precision::U8, {weights_size}, InferenceEngine::Layout::C));
weights->allocate();
CommonTestUtils::fill_data(weights->buffer().as<float*>(), weights->size() / sizeof(float));
ov::test::utils::fill_data(weights->buffer().as<float*>(), weights->size() / sizeof(float));
auto* data = weights->buffer().as<int64_t*>();
data[0] = 1;

View File

@ -17,7 +17,7 @@ protected:
std::string m_out_bin_path;
void SetUp() override {
std::string filePrefix = CommonTestUtils::generateTestFilePrefix();
std::string filePrefix = ov::test::utils::generateTestFilePrefix();
m_out_xml_path = filePrefix + ".xml";
m_out_bin_path = filePrefix + ".bin";
}

View File

@ -22,7 +22,7 @@ protected:
void createTemporalModelFile(std::string xmlFileContent,
std::vector<unsigned char> binFileContent = std::vector<unsigned char>()) {
ASSERT_TRUE(xmlFileContent.size() > 0);
auto filePrefix = CommonTestUtils::generateTestFilePrefix();
auto filePrefix = ov::test::utils::generateTestFilePrefix();
xmlFileName = filePrefix + "_IrFrontendTestModel.xml";
binFileName = filePrefix + "_IrFrontendTestModel.bin";

View File

@ -394,7 +394,7 @@ TEST_F(MetaData, get_meta_data_as_map) {
TEST_F(MetaData, get_meta_data_from_removed_file) {
std::string file_path = InferenceEngine::getIELibraryPath() + ov::util::FileTraits<char>::file_separator +
CommonTestUtils::generateTestFilePrefix() + "_test_model.xml";
ov::test::utils::generateTestFilePrefix() + "_test_model.xml";
// Create file
{
std::ofstream ir(file_path);

View File

@ -68,7 +68,7 @@ TEST(ONNXConversionExtensionTest, custom_op_with_custom_domain) {
auto fe = std::make_shared<ov::frontend::onnx::FrontEnd>();
fe->add_extension(ext);
const auto input_model = fe->load(CommonTestUtils::getModelFromTestModelZoo(
const auto input_model = fe->load(ov::test::utils::getModelFromTestModelZoo(
ov::util::path_join({TEST_ONNX_MODELS_DIRNAME, "missing_op_domain.onnx"})));
std::shared_ptr<ov::Model> model;
@ -96,7 +96,7 @@ TEST(ONNXConversionExtensionTest, custom_op_with_incorrect_numer_of_outputs_exce
auto fe = std::make_shared<ov::frontend::onnx::FrontEnd>();
fe->add_extension(ext);
const auto input_model = fe->load(CommonTestUtils::getModelFromTestModelZoo(
const auto input_model = fe->load(ov::test::utils::getModelFromTestModelZoo(
ov::util::path_join({TEST_ONNX_MODELS_DIRNAME, "missing_op_domain.onnx"})));
std::shared_ptr<ov::Model> model;

View File

@ -36,7 +36,7 @@ std::shared_ptr<ov::op::util::FrameworkNode> get_framework_node_with_out_name(co
} // namespace
TEST(ONNXFeConvertPartially, insert_framework_node_if_unsupported) {
const auto path = CommonTestUtils::getModelFromTestModelZoo(std::string(ONNX_TEST_MODELS) +
const auto path = ov::test::utils::getModelFromTestModelZoo(std::string(ONNX_TEST_MODELS) +
"unsupported_ops/add_unsupported.onnx");
std::shared_ptr<ov::Model> model;
ASSERT_NO_THROW(model = convert_partially(path));
@ -50,7 +50,7 @@ TEST(ONNXFeConvertPartially, insert_framework_node_if_unsupported) {
}
TEST(ONNXFeConvertPartially, insert_more_framework_nodes_if_unsupported) {
const auto path = CommonTestUtils::getModelFromTestModelZoo(std::string(ONNX_TEST_MODELS) +
const auto path = ov::test::utils::getModelFromTestModelZoo(std::string(ONNX_TEST_MODELS) +
"unsupported_ops/two_unsupported_nodes.onnx");
std::shared_ptr<ov::Model> model;
ASSERT_NO_THROW(model = convert_partially(path));
@ -69,7 +69,7 @@ TEST(ONNXFeConvertPartially, insert_more_framework_nodes_if_unsupported) {
// validation error - onnx/instance_norm_bad_scale_type.onnx
TEST(ONNXFeConvertPartially, insert_framework_node_if_onnx_validation_exception) {
const auto path =
CommonTestUtils::getModelFromTestModelZoo(std::string(ONNX_TEST_MODELS) + "instance_norm_bad_scale_type.onnx");
ov::test::utils::getModelFromTestModelZoo(std::string(ONNX_TEST_MODELS) + "instance_norm_bad_scale_type.onnx");
std::shared_ptr<ov::Model> model;
ASSERT_NO_THROW(model = convert_partially(path));
ASSERT_TRUE(model);
@ -81,7 +81,7 @@ TEST(ONNXFeConvertPartially, insert_framework_node_if_onnx_validation_exception)
TEST(ONNXFeConvertPartially, insert_framework_node_if_other_translation_exception) {
const auto path =
CommonTestUtils::getModelFromTestModelZoo(std::string(ONNX_TEST_MODELS) + "depth_to_space_bad_mode.onnx");
ov::test::utils::getModelFromTestModelZoo(std::string(ONNX_TEST_MODELS) + "depth_to_space_bad_mode.onnx");
std::shared_ptr<ov::Model> model;
ASSERT_NO_THROW(model = convert_partially(path));
ASSERT_TRUE(model);
@ -92,7 +92,7 @@ TEST(ONNXFeConvertPartially, insert_framework_node_if_other_translation_exceptio
}
TEST(ONNXFeConvertPartially, insert_framework_nodes_if_both_unsupported_and_other_translation_exception) {
const auto path = CommonTestUtils::getModelFromTestModelZoo(
const auto path = ov::test::utils::getModelFromTestModelZoo(
std::string(ONNX_TEST_MODELS) + "unsupported_ops/unsupported_add_and_incorrect_dts.onnx");
std::shared_ptr<ov::Model> model;
ASSERT_NO_THROW(model = convert_partially(path));

View File

@ -20,7 +20,7 @@ void convert(const std::string& path) {
} // namespace
TEST(ONNXFeConvertException, exception_if_node_unsupported) {
const auto path = CommonTestUtils::getModelFromTestModelZoo(std::string(ONNX_TEST_MODELS) +
const auto path = ov::test::utils::getModelFromTestModelZoo(std::string(ONNX_TEST_MODELS) +
"unsupported_ops/add_unsupported.onnx");
OV_EXPECT_THROW(
@ -30,7 +30,7 @@ TEST(ONNXFeConvertException, exception_if_node_unsupported) {
}
TEST(ONNXFeConvertException, exception_if_more_nodes_unsupported) {
const auto path = CommonTestUtils::getModelFromTestModelZoo(std::string(ONNX_TEST_MODELS) +
const auto path = ov::test::utils::getModelFromTestModelZoo(std::string(ONNX_TEST_MODELS) +
"unsupported_ops/two_unsupported_nodes.onnx");
OV_EXPECT_THROW(
@ -41,7 +41,7 @@ TEST(ONNXFeConvertException, exception_if_more_nodes_unsupported) {
TEST(ONNXFeConvertException, exception_if_onnx_validation_exception) {
const auto path =
CommonTestUtils::getModelFromTestModelZoo(std::string(ONNX_TEST_MODELS) + "instance_norm_bad_scale_type.onnx");
ov::test::utils::getModelFromTestModelZoo(std::string(ONNX_TEST_MODELS) + "instance_norm_bad_scale_type.onnx");
OV_EXPECT_THROW(convert(path),
ov::AssertFailure,
@ -51,13 +51,13 @@ TEST(ONNXFeConvertException, exception_if_onnx_validation_exception) {
TEST(ONNXFeConvertException, exception_if_other_translation_exception) {
const auto path =
CommonTestUtils::getModelFromTestModelZoo(std::string(ONNX_TEST_MODELS) + "depth_to_space_bad_mode.onnx");
ov::test::utils::getModelFromTestModelZoo(std::string(ONNX_TEST_MODELS) + "depth_to_space_bad_mode.onnx");
OV_EXPECT_THROW(convert(path), ov::AssertFailure, testing::EndsWith("only 'DCR' and 'CRD' modes are supported\n"));
}
TEST(ONNXFeConvertException, exception_if_both_unsupported_and_other_translation_exception) {
const auto path = CommonTestUtils::getModelFromTestModelZoo(
const auto path = ov::test::utils::getModelFromTestModelZoo(
std::string(ONNX_TEST_MODELS) + "unsupported_ops/unsupported_add_and_incorrect_dts.onnx");
OV_EXPECT_THROW(
@ -68,7 +68,7 @@ TEST(ONNXFeConvertException, exception_if_both_unsupported_and_other_translation
}
TEST(ONNXFeConvertException, exception_if_both_unsupported_onnx_validation_exception_and_other_exception) {
const auto path = CommonTestUtils::getModelFromTestModelZoo(
const auto path = ov::test::utils::getModelFromTestModelZoo(
std::string(ONNX_TEST_MODELS) + "unsupported_ops/unsupported_add_incorrect_dts_and_inst_norm_bad_scale.onnx");
OV_EXPECT_THROW(

View File

@ -27,7 +27,7 @@ static LoadFromFEParam getTestData() {
TEST_P(FrontEndLoadFromTest, testLoadFromStreamAndPassPath) {
NGRAPH_SUPPRESS_DEPRECATED_START
const auto path = file_util::path_join(CommonTestUtils::getExecutableDirectory(),
const auto path = file_util::path_join(ov::test::utils::getExecutableDirectory(),
TEST_ONNX_MODELS_DIRNAME,
"external_data/external_data.onnx");
NGRAPH_SUPPRESS_DEPRECATED_END

View File

@ -15,7 +15,7 @@ std::string model_path(const char* model) {
std::string path = ONNX_TEST_MODELS;
path += "support_test/";
path += model;
return CommonTestUtils::getModelFromTestModelZoo(path);
return ov::test::utils::getModelFromTestModelZoo(path);
}
} // namespace

File diff suppressed because it is too large Load Diff

View File

@ -19,21 +19,21 @@ using namespace ngraph::test;
static std::string s_manifest = "${MANIFEST}";
OPENVINO_TEST(onnx_editor, topological_sort_two_nodes_swap) {
ONNXModelEditor editor{ov::util::path_join({CommonTestUtils::getExecutableDirectory(),
ONNXModelEditor editor{ov::util::path_join({ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/model_editor/topological_sort/two_nodes_swap.onnx"})};
ASSERT_NO_THROW(editor.get_function());
}
OPENVINO_TEST(onnx_editor, topological_sort_completely_unsorted) {
ONNXModelEditor editor{ov::util::path_join({CommonTestUtils::getExecutableDirectory(),
ONNXModelEditor editor{ov::util::path_join({ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/model_editor/topological_sort/completely_unsorted.onnx"})};
ASSERT_NO_THROW(editor.get_function());
}
OPENVINO_TEST(onnx_editor, topological_sort_completely_unsorted_2) {
ONNXModelEditor editor{ov::util::path_join({CommonTestUtils::getExecutableDirectory(),
ONNXModelEditor editor{ov::util::path_join({ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/model_editor/topological_sort/completely_unsorted_2.onnx"})};
ASSERT_NO_THROW(editor.get_function());
@ -42,7 +42,7 @@ OPENVINO_TEST(onnx_editor, topological_sort_completely_unsorted_2) {
OPENVINO_TEST(onnx_editor, topological_sort_constant_node_in_the_graph) {
const std::string rel_path_to_model = "onnx/model_editor/topological_sort/add_abc_const_node_unsorted.onnx";
ONNXModelEditor editor{
ov::util::path_join({CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, rel_path_to_model})};
ov::util::path_join({ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, rel_path_to_model})};
ASSERT_NO_THROW(editor.get_function());
}
@ -50,7 +50,7 @@ OPENVINO_TEST(onnx_editor, topological_sort_constant_node_in_the_graph) {
OPENVINO_TEST(onnx_editor, topological_sort_multioutput_node) {
const std::string rel_path_to_model = "onnx/model_editor/topological_sort/multioutput_split_unsorted.onnx";
ONNXModelEditor editor{
ov::util::path_join({CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, rel_path_to_model})};
ov::util::path_join({ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, rel_path_to_model})};
ASSERT_NO_THROW(editor.get_function());
}
@ -59,11 +59,11 @@ OPENVINO_TEST(onnx_editor, topological_sort_graph_not_changed_if_the_same_name_o
const std::string rel_path_to_model =
"onnx/model_editor/topological_sort/same_name_of_unsorted_node_and_initializer.onnx";
ONNXModelEditor editor{
ov::util::path_join({CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, rel_path_to_model})};
ov::util::path_join({ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, rel_path_to_model})};
// topological sorting is called only via Editor importing
const auto ref_model =
ov::util::path_join({CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, rel_path_to_model});
ov::util::path_join({ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, rel_path_to_model});
const auto result = compare_onnx_models(editor.model_string(), ref_model);
EXPECT_TRUE(result.is_ok) << result.error_message;
@ -72,11 +72,11 @@ OPENVINO_TEST(onnx_editor, topological_sort_graph_not_changed_if_the_same_name_o
OPENVINO_TEST(onnx_editor, topological_sort_graph_not_changed_if_empty_input_name) {
const std::string rel_path_to_model = "onnx/model_editor/topological_sort/empty_input_name.onnx";
ONNXModelEditor editor{
ov::util::path_join({CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, rel_path_to_model})};
ov::util::path_join({ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, rel_path_to_model})};
// topological sorting is called only via Editor importing
const auto ref_model =
ov::util::path_join({CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, rel_path_to_model});
ov::util::path_join({ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, rel_path_to_model});
const auto result = compare_onnx_models(editor.model_string(), ref_model);
EXPECT_TRUE(result.is_ok) << result.error_message;

File diff suppressed because it is too large Load Diff

View File

@ -28,7 +28,7 @@ static std::string s_manifest = "${MANIFEST}";
static std::string s_device = test::backend_name_to_device("${BACKEND_NAME}");
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_bias_gelu) {
const auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
const auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/com.microsoft/bias_gelu.onnx"));
@ -59,7 +59,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_bias_gelu) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_skip_layer_normalization_with_gamma_beta_bias) {
const auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/com.microsoft/skip_layer_normalization_with_gamma_beta_bias.onnx"));
@ -87,7 +87,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_skip_layer_normalization_with_gamma_be
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_skip_layer_normalization_with_gamma_beta) {
const auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/com.microsoft/skip_layer_normalization_with_gamma_beta.onnx"));
@ -115,7 +115,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_skip_layer_normalization_with_gamma_be
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_skip_layer_normalization_with_gamma) {
const auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/com.microsoft/skip_layer_normalization_with_gamma.onnx"));
@ -143,7 +143,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_skip_layer_normalization_with_gamma) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_skip_layer_normalization_dynamic_shapes) {
const auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/com.microsoft/skip_layer_normalization_dynamic_shapes.onnx"));
@ -193,7 +193,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_skip_layer_normalization_dynamic_shape
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_embed_layer_normalization) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/com.microsoft/embed_layer_normalization.onnx"));
@ -226,7 +226,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_embed_layer_normalization) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_embed_layer_normalization_with_segment_embedding) {
const auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/com.microsoft/embed_layer_normalization_with_segment_embedding.onnx"));
@ -270,7 +270,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_embed_layer_normalization_with_segment
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_embed_layer_normalization_with_segment_embedding_and_mask) {
const auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/com.microsoft/embed_layer_normalization_with_segment_embedding_and_mask.onnx"));
@ -317,7 +317,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_embed_layer_normalization_with_segment
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_embed_layer_normalization_dynamic_shapes) {
const auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/com.microsoft/embed_layer_normalization_dynamic_shapes.onnx"));
@ -416,7 +416,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_embed_layer_normalization_dynamic_shap
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_embed_layer_normalization_diff_seq_len_pos_embed_len) {
const auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/com.microsoft/embed_layer_normalization_dynamic_shapes.onnx"));
@ -516,7 +516,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_embed_layer_normalization_diff_seq_len
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_embed_layer_normalization_with_position_ids) {
const auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/com.microsoft/embed_layer_normalization_dynamic_shapes_with_position_ids.onnx"));
@ -619,7 +619,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_embed_layer_normalization_with_positio
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_attention) {
const auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
const auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/com.microsoft/attention.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -643,7 +643,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_attention) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_attention_qkv_hidden_sizes) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/com.microsoft/attention_qkv_hidden_sizes.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -671,7 +671,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_attention_qkv_hidden_sizes) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_attention_unidirectional) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/com.microsoft/attention_unidirectional.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -706,7 +706,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_attention_unidirectional) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_attention_mask_index_1f) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/com.microsoft/attention_mask_index_1.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -746,7 +746,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_attention_mask_index_1f) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_attention_mask_index_2) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/com.microsoft/attention_mask_index_2.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -788,7 +788,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_attention_mask_index_2) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_attention_mask_index_3) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/com.microsoft/attention_mask_index_3.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -834,7 +834,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_attention_mask_index_3) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_attention_mask_index_4) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/com.microsoft/attention_mask_index_4.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -873,7 +873,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_attention_mask_index_4) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_attention_past) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/com.microsoft/attention_past.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -952,7 +952,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_attention_past) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_attention_extra_add) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/com.microsoft/attention_extra_add.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -1009,7 +1009,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_attention_extra_add) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_attention_dynamic_shapes) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/com.microsoft/attention_dynamic_shapes.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -1110,7 +1110,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_attention_dynamic_shapes) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_fusedgemm_abc) {
const auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
const auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/com.microsoft/fusedgemm.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -1182,7 +1182,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_fusedgemm_abc) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_com_microsoft_fused_conv_hard_sigmoid) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/com.microsoft/fused_conv_hard_sigmoid.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -1199,7 +1199,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_com_microsoft_fused_conv_hard_sigmoid) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_com_microsoft_fused_conv_relu) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/com.microsoft/fused_conv_relu.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -1216,7 +1216,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_com_microsoft_fused_conv_relu) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_com_microsoft_fused_conv_tanh) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/com.microsoft/fused_conv_tanh.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -1233,7 +1233,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_com_microsoft_fused_conv_tanh) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_com_microsoft_fused_conv_sigmoid) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/com.microsoft/fused_conv_sigmoid.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -1250,7 +1250,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_com_microsoft_fused_conv_sigmoid) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_com_microsoft_fused_conv_clip) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/com.microsoft/fused_conv_clip.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -1267,7 +1267,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_com_microsoft_fused_conv_clip) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_com_microsoft_fused_conv_leaky_relu) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/com.microsoft/fused_conv_leaky_relu.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -1284,7 +1284,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_com_microsoft_fused_conv_leaky_relu) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_com_microsoft_fused_conv_relu_z_input) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/com.microsoft/fused_conv_relu_z_input.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -1304,7 +1304,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_com_microsoft_fused_conv_relu_z_input) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_com_microsoft_trilu_lower) {
const auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
const auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/com.microsoft/trilu_lower.onnx"));

View File

@ -37,7 +37,7 @@ void test_constant_folding(std::shared_ptr<ngraph::Function> ng_function,
const auto folded_node = ov::as_type_ptr<default_opset::Constant>(ng_node);
const auto output_values = folded_node->cast_vector<T>();
EXPECT_TRUE(ngraph::test::all_close(expected_output, output_values));
EXPECT_TRUE(ov::test::utils::all_close(expected_output, output_values));
if (expected_shape.is_static()) {
EXPECT_EQ(folded_node->get_output_shape(0), expected_shape.to_shape());
@ -52,7 +52,7 @@ void test_constant_folding(std::shared_ptr<ngraph::Function> ng_function,
} // namespace
OPENVINO_TEST(${BACKEND_NAME}, onnx_const_folding_model_scatter_elements) {
const auto fn = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
const auto fn = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/scatter_elements_opset11.onnx"));
@ -61,28 +61,28 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_const_folding_model_scatter_elements) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_const_folding_model_non_zero_scalar) {
const auto fn = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/non_zero_scalar.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/non_zero_scalar.onnx"));
test_constant_folding<int64_t>(fn, {0}, Shape{1, 1});
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_const_folding_model_non_zero_1d) {
const auto fn = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/non_zero_1d.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/non_zero_1d.onnx"));
test_constant_folding<int64_t>(fn, {1, 2, 4}, Shape{1, 3});
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_const_folding_model_non_zero_1d_float) {
const auto fn = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/non_zero_1d_float.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/non_zero_1d_float.onnx"));
test_constant_folding<int64_t>(fn, {0, 1, 3, 4, 5, 6, 7, 8, 9});
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_const_folding_model_non_zero_3d) {
const auto fn = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/non_zero_3d.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/non_zero_3d.onnx"));
// Vertical slices are 3D indices of non-zero elements in the input tensor
// {0, 0, 0, 1, 1, 2, 2}
@ -93,7 +93,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_const_folding_model_non_zero_3d) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_const_folding_model_non_zero_2d_bool) {
const auto fn = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/non_zero_2d_bool.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/non_zero_2d_bool.onnx"));
test_constant_folding<int64_t>(fn, {0, 1, 1, 0});
}

View File

@ -32,7 +32,7 @@ static std::string s_device = test::backend_name_to_device("${BACKEND_NAME}");
// cond = ...; // ignored
// }
OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_add) {
const auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
const auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/controlflow/loop_2d_add.onnx"));
@ -68,7 +68,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_add) {
// }
OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_no_identity_termination_cond) {
const auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/controlflow/loop_2d_add_no_identity_termination_cond.onnx"));
@ -85,7 +85,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_no_identity_termination_
OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_trip_count_max_int) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/controlflow/loop_2d_add_trip_count_max_int.onnx"));
@ -102,7 +102,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_trip_count_max_int) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_no_identity_termination_cond_static_shapes) {
const auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/controlflow/loop_2d_add_no_identity_termination_cond_static_shapes.onnx"));
@ -120,7 +120,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_no_identity_termination_
// input ("", cond) // Note this is analogous to a while loop
OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_no_identity_termination_cond_false) {
const auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/controlflow/loop_2d_add_no_identity_termination_cond_false.onnx"));
@ -140,7 +140,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_no_identity_termination_
// }
OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_const_no_identity_termination_cond) {
const auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/controlflow/loop_2d_add_const_no_identity_termination_cond.onnx"));
@ -155,7 +155,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_const_no_identity_termin
OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_const_no_identity_termination_cond_static_shapes) {
const auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/controlflow/loop_2d_add_const_no_identity_termination_cond_static_shapes.onnx"));
@ -175,7 +175,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_const_no_identity_termin
// }
OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_both_cond_and_trip_count_as_inputs) {
const auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/controlflow/loop_2d_add_cond_and_trip_count_as_inputs.onnx"));
@ -196,7 +196,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_both_cond_and_trip_count
OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_both_cond_and_trip_count_as_inputs_static_shapes) {
const auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/controlflow/loop_2d_add_cond_and_trip_count_as_inputs_static_shapes.onnx"));
@ -218,7 +218,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_both_cond_and_trip_count
OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_add_initializer_from_parent_scope) {
const auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/controlflow/loop_2d_add_initializer_from_parent_scope.onnx"));
@ -234,7 +234,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_add_initializer_from_parent
OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_add_node_from_parent_scope) {
const auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/controlflow/loop_2d_add_node_from_parent_scope.onnx"));
@ -249,7 +249,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_add_node_from_parent_scope)
OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_add_node_from_parent_scope_used_in_parent_and_in_body) {
const auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/controlflow/loop_add_node_from_parent_scope_used_in_parent_and_in_body.onnx"));
@ -268,7 +268,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_add_node_from_parent_scope_
OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_add_value_access_to_body_scope_exception) {
try {
const auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/controlflow/loop_2d_add_incorrect_access_body_scope.onnx"));
FAIL() << "Incorrect access to body scope not detected";
@ -282,7 +282,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_add_value_access_to_body_sc
OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_add_value_the_same_node_from_parent_and_subgraph) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/controlflow/loop_2d_add_the_same_name.onnx"));
@ -297,7 +297,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_add_value_the_same_node_fro
OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_add_input_from_parent_graph) {
const auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/controlflow/loop_2d_add_input_from_parent_graph.onnx"));
@ -314,7 +314,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_add_input_from_parent_graph
OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_the_proper_opset_in_subgraph) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/controlflow/loop_2d_mul_opset1.onnx"));
@ -334,7 +334,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_the_proper_opset_in_subgrap
OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_scalars) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/controlflow/loop_scalars_add.onnx"));
@ -349,7 +349,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_scalars) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_add_const_cond) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/controlflow/loop_2d_add_const_cond.onnx"));
@ -364,7 +364,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_add_const_cond) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_trip_count_dynamic) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/controlflow/loop_2d_add_trip_count_dynamic.onnx"));
@ -382,7 +382,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_trip_count_dynamic) {
// ~~~~~~~~SUBGRAPH TYPES INFERENCE:~~~~~~~~
OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_infer_types) {
const auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/controlflow/onnx_controlflow_loop_2d_infer_types.onnx"));
@ -402,7 +402,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_infer_types) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_add_node_from_parent_scope_infer_types) {
const auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/controlflow/loop_add_node_from_parent_scope_infer_types.onnx"));
@ -422,7 +422,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_add_node_from_parent_scope_
OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_concat_values) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/controlflow/loop_concat_values.onnx"));
@ -448,7 +448,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_concat_values) {
// }
OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_trip_count_and_cond_skipped_shape_inference) {
const auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/controlflow/loop_2d_add_trip_count_and_cond_skipped.onnx"));
@ -465,7 +465,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_trip_count_and_cond_skip
// infinitive loop execution
OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_infinite) {
const auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
const auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/controlflow/loop_infinite.onnx"));
@ -488,7 +488,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_infinite) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_no_variadic_inputs_and_outputs) {
const auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/controlflow/loop_no_variadic_inputs_and_outputs.onnx"));
@ -504,7 +504,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_no_variadic_inputs_and_outp
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_controlflow_loop_power) {
const auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
const auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/controlflow/loop_pow.onnx"));
@ -530,7 +530,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_if_branches_with_same_inputs) {
}
*/
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/controlflow/if_branches_with_same_inputs.onnx"));
@ -570,7 +570,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_if_branches_with_different_inputs) {
}
*/
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/controlflow/if_branches_with_different_inputs.onnx"));
@ -610,7 +610,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_if_branches_without_inputs) {
}
*/
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/controlflow/if_branches_without_inputs.onnx"));
@ -639,7 +639,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_if_inside_if) {
sub(x, y)
}
*/
const auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
const auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/controlflow/if_inside_if.onnx"));
@ -695,7 +695,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_if_branches_with_multiple_outputs) {
}
*/
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/controlflow/if_branches_with_multiple_outputs.onnx"));
@ -735,7 +735,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_if_inside_loop) {
a = a * b
}
*/
const auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
const auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/controlflow/if_inside_loop.onnx"));
@ -761,7 +761,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_if_with_only_indentity_in_else_branch) {
output = add(input, if_output)
*/
const auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/controlflow/if_with_only_indentity_in_else_branch.onnx"));
@ -792,7 +792,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_if_inside_if_inside_loop) {
*/
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/controlflow/if_inside_if_inside_loop.onnx"));
@ -814,7 +814,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_if_dynamic_inputs) {
}
*/
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/controlflow/if_dynamic_inputs.onnx"));
@ -846,7 +846,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_if_dynamic_inputs) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_if_negative_missing_branches) {
try {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/controlflow/if_missing_then_branch.onnx"));
FAIL() << "Model import succeed, but it shouldn't";
@ -858,7 +858,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_if_negative_missing_branches) {
try {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/controlflow/if_missing_else_branch.onnx"));
FAIL() << "Model import succeed, but it shouldn't";
@ -872,7 +872,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_if_negative_missing_branches) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_if_negative_mismatch_between_branches_output) {
try {
const auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/controlflow/if_negative_mismatch_between_branches_output.onnx"));
FAIL() << "Model import succeed, but it shouldn't";

View File

@ -36,7 +36,7 @@ using Outputs = std::vector<std::vector<float>>;
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_conv2d_strides_padding) {
// Convolution with strides=2 and padding=1
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/conv_with_strides_padding.onnx"));
@ -68,7 +68,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_conv2d_strides_padding) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_conv2d_strides_no_padding) {
// Convolution with strides=2 and padding=1
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/conv_with_strides_no_padding.onnx"));
@ -98,7 +98,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_conv2d_strides_no_padding) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_conv2d_strides_assymetric_padding) {
// Convolution with strides=2 and padding=1
auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/conv_with_strides_and_asymmetric_padding.onnx"));
@ -128,7 +128,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_conv2d_strides_assymetric_padding) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_conv2d_dilation_assymetric_pads_strides) {
auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/conv2d_dilation_assym_pads_strides.onnx"));
@ -168,7 +168,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_conv2d_dilation_assymetric_pads_stride
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_conv3d_bias) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/conv3d_bias.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/conv3d_bias.onnx"));
// "", // auto_pad
// vector<int64_t>{2, 2, 2}, // dilations
@ -271,7 +271,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_conv3d_bias) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_conv_transpose_w_groups) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/conv_transpose_w_groups.onnx"));
@ -293,7 +293,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_conv_transpose_w_groups) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_average_pool_2d) {
// Pooling with strides=2 and no padding
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/average_pool_2d.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/average_pool_2d.onnx"));
// input data shape (1, 1, 4, 4)
Inputs inputs;
@ -313,7 +313,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_average_pool_2d) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_average_pool_2d_pads) {
// Pooling with strides=2 and padding=1
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/average_pool_2d_pads.onnx"));
@ -335,7 +335,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_average_pool_2d_pads) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_average_pool_empty_auto_pad) {
const auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
const auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/average_pool_empty_auto_pad.onnx"));
@ -348,7 +348,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_average_pool_empty_auto_pad) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_max_pool_empty_auto_pad) {
const auto model = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
const auto model = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/max_pool_empty_auto_pad.onnx"));
@ -365,7 +365,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_max_pool_empty_auto_pad) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_max_pool_2d_pads) {
// Pooling with strides=2 and padding=1
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/max_pool_2d_pads.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/max_pool_2d_pads.onnx"));
// input data shape (1, 1, 4, 4)
Inputs inputs;
@ -386,7 +386,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_max_pool_2d_pads) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_global_lp_pool_p0) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/global_lp_pool_p0.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/global_lp_pool_p0.onnx"));
std::vector<std::int64_t> input{1, 0, -4, 0, 2, 1, -6, 1, 0, 0, 0, 0, -7, 1, -1, 0, -1, 8, 0, 10, 9, 0, 0, 5};
@ -400,7 +400,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_global_lp_pool_p0) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_global_lp_pool_p1) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/global_lp_pool_p1.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/global_lp_pool_p1.onnx"));
Inputs inputs{std::vector<float>(2 * 3 * 4)};
std::iota(std::begin(inputs.front()), std::end(inputs.front()), 0.f);
@ -415,7 +415,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_global_lp_pool_p1) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_global_lp_pool_p2) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/global_lp_pool_p2.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/global_lp_pool_p2.onnx"));
Inputs inputs{std::vector<float>(2 * 3 * 4)};
std::iota(std::begin(inputs.front()), std::end(inputs.front()), 0.f);
@ -430,7 +430,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_global_lp_pool_p2) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_global_lp_pool_p3) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/global_lp_pool_p3.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/global_lp_pool_p3.onnx"));
Inputs inputs{std::vector<float>(2 * 3 * 4)};
std::iota(std::begin(inputs.front()), std::end(inputs.front()), 0.f);
@ -444,20 +444,20 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_global_lp_pool_p3) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_convtranspose_output_shape) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/convtranspose_output_shape.onnx"));
auto test_case = test::TestCase(function, s_device);
test_case.add_input_from_file<float>(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
test_case.add_input_from_file<float>(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/files/convtranspose_output_shape/x.bin"));
test_case.add_input_from_file<float>(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
test_case.add_input_from_file<float>(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/files/convtranspose_output_shape/w.bin"));
test_case.add_expected_output_from_file<float>({1, 2, 10, 8},
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/files/convtranspose_output_shape/y.bin"));
@ -466,7 +466,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_convtranspose_output_shape) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_convtranspose_output_shape_auto_pads_same_upper) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/convtranspose_output_shape_auto_pads_same_upper.onnx"));
@ -493,7 +493,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_convtranspose_output_shape_auto_pads_s
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_convtranspose_output_shape_auto_pads_same_lower) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/convtranspose_output_shape_auto_pads_same_lower.onnx"));
@ -519,7 +519,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_convtranspose_output_shape_auto_pads_s
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_convtranspose_groups_w_pads) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/convtranspose_groups_w_pads.onnx"));
@ -572,7 +572,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_convtranspose_groups_w_pads) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_convtranspose_groups_pads_bias) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/convtranspose_groups_pads_bias.onnx"));

View File

@ -33,7 +33,7 @@ static std::string s_device = test::backend_name_to_device("${BACKEND_NAME}");
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_affine) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/affine.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/affine.onnx"));
// input/output shape (1, 3)
auto input = test::NDArray<float, 2>{{{0.f, 1.f, 2.f}}}.get_vector();
@ -47,7 +47,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_affine) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_crop) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/crop.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/crop.onnx"));
// input shape (1, 1, 4, 4)
auto input = test::NDArray<float, 4>({{{{19.f, 20.f, 21.f, 22.f},
@ -67,7 +67,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_crop) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_crop_with_scale) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/crop_with_scale.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/crop_with_scale.onnx"));
// input shape (1, 1, 4, 4)
auto input = test::NDArray<float, 4>({{{{19.f, 20.f, 21.f, 22.f},

View File

@ -38,7 +38,7 @@ static std::string s_device = test::backend_name_to_device("${BACKEND_NAME}");
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_onnx_dynamic_dims_to_ngraph_dynamic_dims) {
// the model represents a linear function A * x + B
// where all 3 operands are model inputs (no initializers)
const auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
const auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/ab_plus_c.onnx"));
@ -72,7 +72,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_onnx_dynamic_dims_to_ngraph_dynam
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_ab_plus_c_inference) {
const auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
const auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/ab_plus_c.onnx"));
@ -112,7 +112,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_scalar_initializers_shape_check)
// initializers defined witout the "dims" field should produce Constants with an empty Shape
// initializers with "dims: 0" should be have the same way (Shape{} not Shape{0})
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/scalar_initializers.onnx"));
@ -126,7 +126,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_scalar_initializers_shape_check)
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_dynamic_rank_input_check) {
// the model contains a single Add operation that takes a fully dynamic input and a scalar
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/a_plus_b_dyn_rank.onnx"));
@ -151,7 +151,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_dynamic_rank_input_check) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_dynamic_rank_input_inference) {
// the model contains a single Add operation that takes a fully dynamic input and a scalar
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/a_plus_b_dyn_rank.onnx"));
@ -179,7 +179,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_dynamic_rank_input_inference) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_acosh_1_3) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/acosh_dyn_shape.onnx"));
@ -191,7 +191,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_acosh_1_3) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_acosh_3_2) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/acosh_dyn_shape.onnx"));
@ -203,7 +203,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_acosh_3_2) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_asinh_1_3) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/asinh_dyn_shape.onnx"));
@ -215,7 +215,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_asinh_1_3) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_asinh_3_2) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/asinh_dyn_shape.onnx"));
@ -227,7 +227,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_asinh_3_2) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_atanh_1_3) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/atanh_dyn_shape.onnx"));
@ -239,7 +239,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_atanh_1_3) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_atanh_3_2) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/atanh_dyn_shape.onnx"));
@ -253,7 +253,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_atanh_3_2) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_conv_with_dynamic_batch) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/conv_with_dynamic_batch.onnx"));
@ -277,7 +277,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_conv_with_dynamic_batch) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_conv_with_dynamic_bias) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/conv_with_dynamic_bias.onnx"));
@ -301,7 +301,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_conv_with_dynamic_bias) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_avg_pool_dyn_shape) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/average_pool_2d_dyn.onnx"));
@ -322,7 +322,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_avg_pool_dyn_shape) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_max_pool_dyn_shape) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/max_pool_2d_dyn.onnx"));
@ -343,7 +343,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_max_pool_dyn_shape) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_max_pool_with_indices_output) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/max_pool_with_indices_output.onnx"));
@ -367,7 +367,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_max_pool_with_indices_output) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_global_avg_pool_dyn_shape) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/global_average_pool_dyn.onnx"));
@ -388,7 +388,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_global_avg_pool_dyn_shape) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_global_max_pool_dyn_shape) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/global_max_pool_dyn.onnx"));
@ -408,7 +408,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_global_max_pool_dyn_shape) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_arg_max_dyn_shape) {
const auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
const auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/argmax_dyn.onnx"));
@ -429,7 +429,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_arg_max_dyn_shape) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_arg_min_no_keep_dims_dyn_shape) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/argmin_no_keep_dims_dyn.onnx"));
@ -450,7 +450,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_arg_min_no_keep_dims_dyn_shape) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_constant_of_shape_float_zeros) {
auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/constant_of_shape_float_zeros.onnx"));
@ -466,7 +466,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_constant_of_shape_float_zeros) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_constant_of_shape_int_ones) {
auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/constant_of_shape_int_ones.onnx"));
@ -481,7 +481,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_constant_of_shape_int_ones) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_expand_1_dyn_shape) {
const auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
const auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/expand_dyn.onnx"));
@ -499,7 +499,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_expand_1_dyn_shape) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_expand_2_dyn_shape) {
const auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
const auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/expand_dyn.onnx"));
@ -516,7 +516,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_expand_2_dyn_shape) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_expand_3_dyn_shape) {
const auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
const auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/expand_dyn.onnx"));
@ -532,7 +532,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_expand_3_dyn_shape) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_expand_4_dyn_shape) {
const auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
const auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/expand_dyn.onnx"));
@ -548,7 +548,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_expand_4_dyn_shape) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_expand_5_dyn_shape) {
const auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
const auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/expand_dyn.onnx"));
@ -565,7 +565,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_expand_5_dyn_shape) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_expand_6_dyn_shape) {
const auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
const auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/expand_dyn.onnx"));
@ -583,7 +583,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_expand_6_dyn_shape) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_expand_uint16_dyn_shape) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/expand_uint16_dyn.onnx"));
@ -600,7 +600,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_expand_uint16_dyn_shape) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_tile) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/tile.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/tile.onnx"));
auto test_case = test::TestCase(function, s_device);
test_case.add_input<std::int16_t>({0, 1, 2, 3, 4, 5}); // input
@ -611,7 +611,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_tile) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_tile_static) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/tile_static.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/tile_static.onnx"));
auto test_case = test::TestCase(function, s_device);
test_case.add_input<std::int16_t>({0, 1, 2, 3, 4, 5}); // input
@ -621,7 +621,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_tile_static) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_convtranspose_dyn_data) {
auto ct_fn = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto ct_fn = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/convtranspose_dyn_data.onnx"));
@ -663,7 +663,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_convtranspose_dyn_data) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_convtranspose_dyn_filters) {
auto ct_fn = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto ct_fn = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/convtranspose_dyn_filters.onnx"));
@ -705,7 +705,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_convtranspose_dyn_filters)
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_transpose) {
const auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
const auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/transpose.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -742,7 +742,7 @@ Shape get_flattened_shape(const Shape& in_shape, size_t axis) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_flatten_axis_0) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/flatten_dyn_shape_axis0.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -769,7 +769,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_flatten_axis_0) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_flatten_axis) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/flatten_dyn_shape_axis.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -796,7 +796,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_flatten_axis) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_flatten_neg_axis) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/flatten_dyn_shape_neg_axis.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -823,7 +823,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_flatten_neg_axis) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_flatten) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/flatten.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/flatten.onnx"));
std::vector<float> data{1, 2, 3, 4, 5, 6, 7, 8};
auto test_case = test::TestCase(function, s_device);
@ -834,7 +834,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_flatten) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_global_lp_dynamic_hw) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/global_lp_pool_dynamic_hw.onnx"));
@ -847,7 +847,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_global_lp_dynamic_hw) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_2d_input) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/slice_2d_input.onnx"));
@ -862,7 +862,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_2d_input) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_default_steps) {
auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/slice_default_steps.onnx"));
@ -876,7 +876,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_default_steps) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_slice_2d_default_steps_dyn_begin_end) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/slice_2d_default_steps_dyn_begin_end.onnx"));
@ -890,7 +890,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_slice_2d_default_steps_d
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_clamp_neg_ends) {
auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/slice_default_steps.onnx"));
@ -903,7 +903,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_clamp_neg_ends) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_3d_input) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/slice_3d_input.onnx"));
@ -922,7 +922,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_3d_input) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_3d_input_neg_axes) {
auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/slice_3d_input_neg_axes.onnx"));
@ -941,7 +941,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_3d_input_neg_axes) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_3d_input_12_axes) {
auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/slice_3d_input_12_axes.onnx"));
@ -959,7 +959,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_3d_input_12_axes) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_3d_input_20_axes) {
auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/slice_3d_input_20_axes.onnx"));
@ -978,7 +978,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_3d_input_20_axes) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_4d_input_23_axes) {
auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/slice_4d_input_23_axes.onnx"));
@ -996,7 +996,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_4d_input_23_axes) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_4d_input_0231_axes_ends_max) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/slice_4d_input_0231_axes_ends_max.onnx"));
@ -1017,7 +1017,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_4d_input_0231_axes_ends_
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_4d_input_2103_axes_ends_max) {
auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/slice_4d_input_2103_axes.onnx"));
@ -1039,7 +1039,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_4d_input_2103_axes_ends_
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_4d_input_23_axes_21_steps) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/slice_4d_input_23_axes_21_steps.onnx"));
@ -1056,7 +1056,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_4d_input_23_axes_21_step
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_default_axes) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/slice_default_axes.onnx"));
@ -1073,7 +1073,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_default_axes) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_the_same_output_same) {
auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/slice_2d_the_same_out_shape.onnx"));
@ -1086,7 +1086,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_the_same_output_same) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_model_hardmax) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/hardmax.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/hardmax.onnx"));
auto test_case = test::TestCase(function, s_device);
test_case.add_input<float>(
@ -1117,7 +1117,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_model_hardmax) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_model_softmax_axis_2) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/softmax_axis_2.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/softmax_axis_2.onnx"));
const std::vector<float> input = {
2.75793882f, -0.50841322f, 0.82013929f, -0.62409912f, -0.96136118f, 0.21004745f, 1.38337255f,
@ -1154,7 +1154,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_model_softmax_axis_2) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_range_positive_step) {
const auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/range.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/range.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -1168,7 +1168,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_range_positive_step) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_range_negative_step) {
const auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/range.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/range.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -1182,7 +1182,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_range_negative_step) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_instance_normalization_dyn_shape) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/instance_norm_dyn_shape.onnx"));
@ -1205,7 +1205,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_instance_normalization_dyn_shape) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_instance_normalization_dyn_shape2) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/instance_norm_dyn_shape2.onnx"));
@ -1229,7 +1229,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_instance_normalization_dyn_shape2) {
// OPENVINO_TEST(${BACKEND_NAME}, onnx_upsample9_scales_input_nearest_infer)
// {
// const auto function = onnx_import::import_onnx_model(
// file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO,
// file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO,
// "onnx/upsample9_scales_input_nearest.onnx"));
//
// // Input data shape (1, 1, 2, 2)
@ -1247,7 +1247,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_instance_normalization_dyn_shape2) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_1_2d_input) {
auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/slice_2d_input_opset1.onnx"));
@ -1259,7 +1259,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_1_2d_input) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_1_clamp_neg_ends) {
auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/slice_2d_clamp_neg_ends_opset1.onnx"));
@ -1271,7 +1271,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_1_clamp_neg_ends) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_1_3d_input_21_axes_ends_max) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/slice_3d_input_21_axes_ends_max_opset1.onnx"));
@ -1288,7 +1288,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_1_3d_input_21_axes_ends_max
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_reduce_max_dynamic_input_rank_negative_axis) {
// the ReduceMax node has a fully dynamic input and the reduction axis is -1
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/reduce_max_dynamic_input_rank_negative_axis.onnx"));
@ -1299,7 +1299,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_reduce_max_dynamic_input_rank_neg
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_size_dyn_op) {
const auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
const auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/size_op_dyn.onnx"));
@ -1311,7 +1311,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_size_dyn_op) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_max_pool_dyn_rank_without_default_attrs) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/max_pool_dyn_rank_without_default_attrs.onnx"));
@ -1326,7 +1326,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_max_pool_dyn_rank_without_default_attr
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_depth_to_space_dynamic_input) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/depth_to_space.onnx"));
@ -1344,7 +1344,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_depth_to_space_dynamic_input) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_space_to_depth_dynamic_input) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/space_to_depth.onnx"));
@ -1364,7 +1364,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_space_to_depth_dynamic_input) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_eye_like_dyn_shape) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/eye_like_dyn_shape.onnx"));
@ -1377,7 +1377,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_eye_like_dyn_shape) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_eye_like_dyn_rank) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/eye_like_dyn_rank.onnx"));

View File

@ -17,7 +17,7 @@ OPENVINO_SUPPRESS_DEPRECATED_START
using namespace ngraph;
TEST(onnx_importer, exception_throws_ngraph_error) {
EXPECT_THROW(onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
EXPECT_THROW(onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/depth_to_space_bad_blocksize.onnx")),
ngraph_error);
@ -25,7 +25,7 @@ TEST(onnx_importer, exception_throws_ngraph_error) {
TEST(onnx_importer, exception_msg_ngraph_error) {
try {
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/depth_to_space_bad_blocksize.onnx"));
// Should have thrown, so fail if it didn't
@ -39,7 +39,7 @@ TEST(onnx_importer, exception_msg_ngraph_error) {
TEST(onnx_importer, exception_msg_onnx_node_validation_failure) {
try {
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/instance_norm_bad_scale_type.onnx"));
// Should have thrown, so fail if it didn't
@ -60,7 +60,7 @@ TEST(onnx_importer, exception_msg_onnx_node_validation_failure) {
// This test should throw a std error because of attempt to access shape from dynamic tensor.
TEST(onnx_importer, exception_msg_std_err_wrapped) {
try {
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/eye_like_wrong_shape.onnx"));
// Should have thrown, so fail if it didn't

View File

@ -51,7 +51,7 @@ using Outputs = std::vector<std::vector<float>>;
OPENVINO_TEST(${BACKEND_NAME}, onnx_prior_box) {
const auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/prior_box.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/prior_box.onnx"));
auto test_case = test::TestCase(function, s_device);
std::vector<float> A(3 * 2 * 2);
std::vector<float> B(3 * 6 * 6);
@ -72,7 +72,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_prior_box) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_priorbox_clustered) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/priorbox_clustered.onnx"));
@ -91,7 +91,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_priorbox_clustered) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_priorbox_clustered_most_attrs_default) {
auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/priorbox_clustered_most_attrs_default.onnx"));
@ -125,7 +125,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_priorbox_clustered_most_attrs_default) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_priorbox_clustered_first_input_bad_shape) {
try {
auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/priorbox_clustered_first_input_bad_shape.onnx"));
FAIL() << "Expected exception was not thrown";
@ -139,7 +139,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_priorbox_clustered_first_input_bad_shape) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_priorbox_clustered_second_input_bad_shape) {
try {
auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/priorbox_clustered_second_input_bad_shape.onnx"));
FAIL() << "Expected exception was not thrown";
@ -152,7 +152,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_priorbox_clustered_second_input_bad_shape) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_detection_output) {
const auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/detection_output.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/detection_output.onnx"));
auto test_case = test::TestCase(function, s_device);
auto gen_vector = [](size_t size, float min, float max) -> std::vector<float> {
@ -184,7 +184,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_detection_output) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_group_norm) {
const auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/group_norm.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/group_norm.onnx"));
auto test_case = test::TestCase(function, s_device);
Shape shape{2, 8, 2, 2};
const auto size = shape_size(shape);
@ -208,7 +208,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_group_norm) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_group_norm_squeeze_bias_and_scale) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/group_norm_4D_bias_and_scale.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -234,7 +234,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_group_norm_squeeze_bias_and_scale) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_group_norm_5d) {
const auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/group_norm_5d.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/group_norm_5d.onnx"));
auto test_case = test::TestCase(function, s_device);
Shape shape{2, 8, 1, 2, 1};
const auto size = shape_size(shape);
@ -255,7 +255,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_group_norm_5d) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_normalize) {
const auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/normalize.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/normalize.onnx"));
auto test_case = test::TestCase(function, s_device);
std::vector<float> data(12);
std::iota(data.begin(), data.end(), 1.f);
@ -280,7 +280,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_normalize) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_swish_with_beta) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/swish_with_beta.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/swish_with_beta.onnx"));
const Shape expected_output_shape{3};
auto test_case = test::TestCase(function, s_device);
@ -292,7 +292,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_swish_with_beta) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_swish_without_beta) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/swish_without_beta.onnx"));
@ -307,7 +307,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_swish_without_beta) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_experimental_detectron_detection_output) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/org.openvinotoolkit/experimental_detectron/detection_output.onnx"));
@ -367,7 +367,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_experimental_detectron_detection_outpu
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_experimental_detectron_detection_output_most_attrs_default) {
auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/org.openvinotoolkit/experimental_detectron/"
"detection_output_most_attrs_default.onnx"));
@ -410,7 +410,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_experimental_detectron_detection_outpu
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_experimental_detectron_generate_proposals_single_image) {
auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/org.openvinotoolkit/experimental_detectron/"
"generate_proposals_single_image.onnx"));
@ -460,7 +460,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_experimental_detectron_generate_propos
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_experimental_detectron_group_norm) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/org.openvinotoolkit/experimental_detectron/group_norm.onnx"));
@ -487,7 +487,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_experimental_detectron_group_norm) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_experimental_detectron_prior_grid_generator) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/org.openvinotoolkit/experimental_detectron/prior_grid_generator.onnx"));
@ -514,7 +514,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_experimental_detectron_prior_grid_gene
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_experimental_detectron_roi_feature_extractor) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/org.openvinotoolkit/experimental_detectron/roi_feature_extractor.onnx"));
@ -573,7 +573,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_experimental_detectron_roi_feature_ext
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_experimental_detectron_topk_rios) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/org.openvinotoolkit/experimental_detectron/topk_rios.onnx"));
@ -588,7 +588,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_experimental_detectron_topk_rios) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_deformable_conv_2d) {
auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/org.openvinotoolkit/deformable_conv_2d.onnx"));
@ -621,7 +621,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_deformable_conv_2d) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_generate_proposals) {
auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/org.openvinotoolkit/generate_proposals.onnx"));
@ -674,7 +674,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_generate_proposals) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_generate_proposals_batch) {
auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/org.openvinotoolkit/generate_proposals_batch2.onnx"));

View File

@ -29,7 +29,7 @@ static std::string s_device = test::backend_name_to_device("${BACKEND_NAME}");
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_adaptive_avg_pooling2d_nchw) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/org.pytorch/adaptive_avg_pooling2d_nchw.onnx"));
@ -56,7 +56,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_adaptive_avg_pooling2d_nchw) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_adaptive_avg_pooling2d_chw) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/org.pytorch/adaptive_avg_pooling2d_chw.onnx"));

View File

@ -35,7 +35,7 @@ using Inputs = std::vector<std::vector<float>>;
using Outputs = std::vector<std::vector<float>>;
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_quantize_linear_const_scale_const_zero_p) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/quantize_linear_const.onnx"));
@ -48,7 +48,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_quantize_linear_const_scale_const_zero
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_quantize_linear) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/quantize_linear.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/quantize_linear.onnx"));
auto test_case = test::TestCase(function, s_device);
test_case.add_input(std::vector<float>{32.25f, 48.34f, 50.f, 83.f});
@ -59,7 +59,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_quantize_linear) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_quantize_linear_zero_point) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/quantize_linear_zero_point.onnx"));
@ -73,7 +73,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_quantize_linear_zero_point) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_quantize_linear_axis_zero) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/quantize_linear_axis_zero.onnx"));
@ -91,7 +91,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_quantize_linear_axis_zero) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_quantize_linear_axis_negative) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/quantize_linear_axis_negative.onnx"));
@ -110,7 +110,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_quantize_linear_axis_negative) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_quantize_linear_scalar_ignore_axis) {
auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/quantize_linear_scalar_ignore_axis.onnx"));
@ -125,7 +125,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_quantize_linear_scalar_ignore_axis) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/dequant_lin.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/dequant_lin.onnx"));
auto test_case = test::TestCase(function, s_device);
test_case.add_input(std::vector<std::uint8_t>{19, 210, 21, 10});
@ -136,7 +136,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_scalar_scale_and_zero_point) {
auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dequantize_linear_scalar_scale_and_zero_point.onnx"));
@ -150,7 +150,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_scalar_scale_and_zer
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_scalar_scale) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dequantize_linear_scalar_scale.onnx"));
@ -164,7 +164,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_scalar_scale) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_scalar_inputs) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dequantize_linear_scalar_inputs.onnx"));
@ -179,7 +179,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_scalar_inputs) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_scalar_zero_point) {
auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dequantize_linear_scalar_zero_point.onnx"));
@ -193,7 +193,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_scalar_zero_point) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_no_zero_point) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dequantize_linear_no_zero_point.onnx"));
@ -206,7 +206,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_no_zero_point) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_scalar_zero_scale_uint8) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dequantize_linear_0.onnx"));
@ -220,7 +220,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_scalar_zero_scale_ui
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_scalar_zero_scale_int8) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dequantize_linear_1.onnx"));
@ -235,7 +235,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_scalar_zero_scale_in
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_1d_zero_scale_uint8) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dequantize_linear_2.onnx"));
@ -252,7 +252,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_1d_zero_scale_uint8)
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_1d_zero_scale_int8) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dequantize_linear_3.onnx"));
@ -269,7 +269,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_1d_zero_scale_int8)
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_1d_zero_scale_int8_4d_dynamic) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dequantize_linear_4_dynamic.onnx"));
@ -294,7 +294,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_1d_zero_scale_int8_4
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_1d_zero_scale_int8_4d) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dequantize_linear_4.onnx"));
@ -317,7 +317,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_1d_zero_scale_int8_4
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_1d_zero_scale_uint8_negative_axis) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dequantize_linear_5.onnx"));
@ -335,7 +335,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_1d_zero_scale_uint8_
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_scalar_ignore_axis) {
auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dequantize_linear_scalar_ignore_axis.onnx"));
@ -350,7 +350,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_scalar_ignore_axis)
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dynamic_quantize_linear) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/quantization/dynamic_quantize_linear.onnx"));
@ -364,7 +364,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dynamic_quantize_linear) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dynamic_quantize_linear_255) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/quantization/dynamic_quantize_linear.onnx"));
@ -378,7 +378,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dynamic_quantize_linear_255) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dynamic_quantize_linear_3x4) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/quantization/dynamic_quantize_linear_3x4.onnx"));
@ -401,7 +401,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dynamic_quantize_linear_3x4) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_quant_conv_linear) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/quant_conv_lin.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/quant_conv_lin.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -432,12 +432,12 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_quant_conv_linear) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_quant_conv_linear_2d) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/qlinear_conv_2d.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/qlinear_conv_2d.onnx"));
auto test_case = test::TestCase(function, s_device);
test_case.add_input_from_file<uint8_t>(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/files/qlinearconv2d/x.bin"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/files/qlinearconv2d/x.bin"));
test_case.add_input(std::vector<float>{0.00369204697199166f}); // x_scale
test_case.add_input(std::vector<uint8_t>{132}); // x_zero_point
test_case.add_input(std::vector<uint8_t>{0}); // w
@ -447,13 +447,13 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_quant_conv_linear_2d) {
test_case.add_input(std::vector<uint8_t>{123}); // y_zero_point
test_case.add_expected_output_from_file<uint8_t>({1, 1, 7, 7},
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/files/qlinearconv2d/y.bin"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/files/qlinearconv2d/y.bin"));
test_case.run();
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_quant_conv_linear_3d) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/qlinear_conv_3d.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/qlinear_conv_3d.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -512,7 +512,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_quant_conv_linear_3d) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_quant_conv_linear_onnx_example) {
auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/quantization/quant_conv_linear_onnx_example.onnx"));
@ -548,7 +548,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_quant_conv_linear_onnx_example) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_qlinear_matmul_2d) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/qlinear_matmul.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/qlinear_matmul.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -567,7 +567,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_qlinear_matmul_2d) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_matmul_integer_2d_simple_zero_point) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/matmul_integer.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/matmul_integer.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -592,7 +592,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_matmul_integer_2d_simple_zero_point) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_matmul_integer_int8) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/matmul_integer_int8.onnx"));
@ -617,7 +617,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_matmul_integer_int8) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_matmul_integer_vectorized_zero_point) {
auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/matmul_integer_vectorized_zero_point.onnx"));
@ -646,7 +646,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_matmul_integer_vectorized_zero_point)
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_matmul_integer_no_zero_point) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/matmul_integer_no_zero_point.onnx"));
@ -673,7 +673,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_matmul_integer_no_zero_point) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_matmul_integer_2d_x_3d) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/matmul_integer_2d_x_3d.onnx"));
@ -704,7 +704,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_matmul_integer_2d_x_3d) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_matmul_integer_3d_x_2d) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/matmul_integer_3d_x_2d.onnx"));
@ -735,7 +735,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_matmul_integer_3d_x_2d) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_matmul_integer_3d) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/matmul_integer_3d.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/matmul_integer_3d.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -770,7 +770,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_matmul_integer_3d) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_matmul_integer_4d) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/matmul_integer_4d.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/matmul_integer_4d.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -809,7 +809,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_matmul_integer_4d) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_matmul_integer_4d_zero_point) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/matmul_integer_4d.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/matmul_integer_4d.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -846,7 +846,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_matmul_integer_4d_zero_point) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_matmul_integer_matrix_zero_point) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/matmul_integer_matrix_zero_point.onnx"));
@ -888,7 +888,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_matmul_integer_matrix_zero_point) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_qlinear_matmul_3d) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/qlinear_matmul_3d.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/qlinear_matmul_3d.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -910,7 +910,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_qlinear_matmul_3d) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_conv_integer_simple_zero_point) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/conv_integer.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/conv_integer.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -931,7 +931,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_conv_integer_simple_zero_point) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_conv_integer_scalar_zp) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/conv_integer_scalar_zp.onnx"));
@ -954,7 +954,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_conv_integer_scalar_zp) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_conv_integer_int8) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/conv_integer_int8.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/conv_integer_int8.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -975,7 +975,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_conv_integer_int8) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_conv_integer_no_zero_point) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/conv_integer_no_zero_point.onnx"));
@ -996,7 +996,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_conv_integer_no_zero_point) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_conv_integer_vector_w_zero_point) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/conv_integer_vector_w_zero_point.onnx"));
@ -1041,7 +1041,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_conv_integer_vector_w_zero_point) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_conv_integer_overload) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/conv_integer_overload.onnx"));
@ -1065,7 +1065,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_conv_integer_overload) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_fake_quantize_import_only) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/quantization/fake_quantize_const_inputs.onnx"));
@ -1078,7 +1078,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_fake_quantize_import_only) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_fake_quantize_const_inputs_infer) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/quantization/fake_quantize_const_inputs.onnx"));
@ -1098,7 +1098,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_fake_quantize_const_inputs_infer) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_fake_quantize_nonconst_inputs_infer) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/quantization/fake_quantize_nonconst_inputs.onnx"));
@ -1126,7 +1126,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_fake_quantize_nonconst_inputs_infer) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_quantize_linear_opset10) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/quantize_linear_opset10.onnx"));
@ -1141,7 +1141,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_quantize_linear_opset10) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_quantize_linear_opsets_10_and_13_axis0) {
auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/quantize_linear_opsets_10_and_13_axis0.onnx"));
@ -1156,7 +1156,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_quantize_linear_opsets_10_and_13_axis0
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_quantize_linear_opsets_10_and_13_axis1) {
auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/quantize_linear_opsets_10_and_13_axis1.onnx"));

View File

@ -35,7 +35,7 @@ using Inputs = std::vector<std::vector<float>>;
using Outputs = std::vector<std::vector<float>>;
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_reshape_reduced_dims) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/reshape_reduced_dims.onnx"));
@ -56,7 +56,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_reshape_reduced_dims) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_reshape_reordered_dims) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/reshape_reordered_dims.onnx"));
@ -79,7 +79,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_reshape_reordered_dims) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_reshape_extended_dims) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/reshape_extended_dims.onnx"));
@ -101,7 +101,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_reshape_extended_dims) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_reshape_single_dim) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/reshape_single_dim.onnx"));
@ -123,7 +123,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_reshape_single_dim) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_reshape_negative_dim) {
// the model contains the target shape in the initializers: [2, -1, 2]
const auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
const auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/reshape_negative_dim.onnx"));
@ -160,7 +160,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_reshape_negative_dim) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_reshape_negative_with_zero_dim) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/reshape_negative_with_zero_dims.onnx"));
@ -181,7 +181,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_reshape_negative_with_zero_dim) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_reshape_output_shape_as_input) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/reshape_output_shape_as_input.onnx"));
@ -203,7 +203,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_reshape_output_shape_as_input) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_depth_to_space) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/depth_to_space.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/depth_to_space.onnx"));
std::vector<float> input(32);
std::iota(input.begin(), input.end(), 0.f);
@ -220,7 +220,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_depth_to_space) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_depth_to_space_v1) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/depth_to_space_v1.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/depth_to_space_v1.onnx"));
std::vector<float> input(32);
std::iota(input.begin(), input.end(), 0.f);
@ -236,7 +236,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_depth_to_space_v1) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_depth_to_space_crd) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/depth_to_space_crd.onnx"));
@ -256,7 +256,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_depth_to_space_crd) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_depth_to_space_bad_blocksize) {
// This model fails to import since the depth channel length must be a multiple of the
// `blocksize` attribute value.
EXPECT_THROW(onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
EXPECT_THROW(onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/depth_to_space_bad_blocksize.onnx")),
std::runtime_error);
@ -264,7 +264,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_depth_to_space_bad_blocksize) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_depth_to_space_no_blocksize) {
// This model fails to import since it lacks of required parameter `blocksize`.
EXPECT_THROW(onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
EXPECT_THROW(onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/depth_to_space_no_blocksize.onnx")),
std::runtime_error);
@ -272,7 +272,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_depth_to_space_no_blocksize) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_depth_to_space_bad_mode) {
try {
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/depth_to_space_bad_mode.onnx"));
FAIL() << "The onnx_importer did not throw for unknown mode to DepthToSpace op";
@ -286,7 +286,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_depth_to_space_bad_mode) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_depth_to_space_bad_input_shape) {
try {
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/depth_to_space_bad_input_shape.onnx"));
FAIL() << "The onnx_importer did not throw for invalid input shape to DepthToSpace op";
@ -300,7 +300,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_depth_to_space_bad_input_shape) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_space_to_depth) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/space_to_depth.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/space_to_depth.onnx"));
std::vector<float> input(32);
std::iota(input.begin(), input.end(), 0.f);
@ -318,7 +318,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_space_to_depth) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_space_to_depth_invalid_input_shape) {
try {
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/space_to_depth_invalid_input_shape.onnx"));
FAIL() << "Expected ngraph_error exception, but no exception was thrown";
@ -334,7 +334,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_space_to_depth_invalid_input_shape) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_space_to_depth_bad_blocksize) {
// This model fails to import since the depth channel length must be a multiple of the
// `blocksize` attribute value.
EXPECT_THROW(onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
EXPECT_THROW(onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/space_to_depth_bad_blocksize.onnx")),
std::runtime_error);
@ -342,7 +342,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_space_to_depth_bad_blocksize) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_space_to_depth_no_blocksize) {
// This model fails to import since it lacks of required `blocksize` attribute.
EXPECT_THROW(onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
EXPECT_THROW(onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/space_to_depth_no_blocksize.onnx")),
std::runtime_error);
@ -350,7 +350,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_space_to_depth_no_blocksize) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_squeeze) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/squeeze.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/squeeze.onnx"));
// {1, 4, 1, 1, 2}
auto input = test::NDArray<float, 5>({{{{{1.0f, 2.0f}}}, {{{3.0f, 4.0f}}}, {{{5.0f, 6.0f}}}, {{{7.0f, 8.0f}}}}})
@ -367,7 +367,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_squeeze) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_squeeze_empty_axes_attribute) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/squeeze_empty_axes_attribute.onnx"));
@ -379,7 +379,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_squeeze_empty_axes_attribute) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_squeeze_opset13_no_axes) {
const auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
const auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/squeeze_opset13_no_axes.onnx"));
@ -392,7 +392,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_squeeze_opset13_no_axes) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_unsqueeze) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/unsqueeze.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/unsqueeze.onnx"));
auto input = test::NDArray<float, 3>({{{1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}},
{{1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}},
@ -412,7 +412,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_unsqueeze) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_unsqueeze_negative_axes) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/unsqueeze_negative_axes.onnx"));
@ -435,7 +435,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_unsqueeze_negative_axes) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_concat) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/concat.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/concat.onnx"));
Inputs inputs;
@ -451,7 +451,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_concat) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_concat_negative_axis) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/concat_negative_axis.onnx"));
@ -469,7 +469,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_concat_negative_axis) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_split_equal_parts_default) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/split_equal_parts_default.onnx"));
@ -486,7 +486,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_split_equal_parts_default) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_split_equal_parts_2d) {
// Split into 2 equal parts along axis=1
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/split_equal_parts_2d.onnx"));
@ -499,7 +499,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_split_equal_parts_2d) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_split_variable_parts_2d) {
// Split into variable parts {2, 4} along axis=1
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/split_variable_parts_2d.onnx"));
@ -511,7 +511,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_split_variable_parts_2d) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_expand_static_shape) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/expand_static_shape.onnx"));

View File

@ -33,7 +33,7 @@ static std::string s_device = test::backend_name_to_device("${BACKEND_NAME}");
// ONNX LSTM tests (implemented by nGraph LSTMCell and LSTMSequence)
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_lstm_fwd_default_const) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/lstm_fwd_default_const.onnx"));
@ -49,7 +49,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_lstm_fwd_default_const) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_lstm_reverse_const) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/lstm_reverse_const.onnx"));
@ -66,7 +66,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_lstm_reverse_const) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_lstm_bidir_const) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/lstm_bidir_const.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/lstm_bidir_const.onnx"));
auto test_case = test::TestCase(function, s_device);
test_case.add_input<float>({0.68172926f, 1.1405563f, -0.03931177f, -0.03759607f}); // X
@ -89,7 +89,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_lstm_bidir_const) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_lstm_fwd_with_clip_const) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/lstm_fwd_clip_const.onnx"));
@ -105,7 +105,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_lstm_fwd_with_clip_const) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_lstm_fwd_mixed_seq_const) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/lstm_fwd_mixed_seq_const.onnx"));
@ -136,7 +136,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_lstm_fwd_mixed_seq_const) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_lstm_reverse_mixed_seq_const) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/lstm_reverse_mixed_seq_const.onnx"));
@ -167,7 +167,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_lstm_reverse_mixed_seq_const) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_lstm_bidir_mixed_seq_const) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/lstm_bidir_mixed_seq_const.onnx"));
@ -215,7 +215,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_lstm_bidir_mixed_seq_const) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_lstm_fwd_with_clip_peepholes) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/lstm_fwd_with_clip_peepholes.onnx"));
@ -283,7 +283,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_lstm_fwd_with_clip_peepholes) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_lstm_fwd_mixed_seq) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/lstm_fwd_mixed_seq.onnx"));
@ -321,7 +321,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_lstm_fwd_mixed_seq) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_lstm_fwd_hardsigmoid_activation) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/lstm_fwd_hardsigmoid_activation.onnx"));
@ -376,7 +376,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_lstm_fwd_hardsigmoid_activation) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_lstm_fwd_large_batch_no_clip) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/lstm_fwd_large_batch_no_clip.onnx"));
@ -418,7 +418,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_lstm_fwd_large_batch_no_clip) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_lstm_bdir_short_input_seq_peepholes) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/lstm_bdir_short_input_seq.onnx"));
@ -464,7 +464,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_lstm_bdir_short_input_seq_peepholes) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_lstm_mixed_seq_reverse) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/lstm_mixed_seq_reverse.onnx"));
@ -507,7 +507,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_lstm_mixed_seq_reverse) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_import_only_lstm_dynamic_batch_seq_all_inputs) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/lstm_dyn_batch_seq.onnx"));
@ -529,7 +529,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_import_only_lstm_dynamic_batch_seq_all
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_import_only_lstm_dynamic_batch_seq_3_inputs) {
auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/lstm_dyn_batch_seq_3_inputs.onnx"));
@ -551,7 +551,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_import_only_lstm_dynamic_batch_seq_3_i
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_lstm_dynamic_batch_size_and_seq_len) {
auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/lstm_dynamic_batch_size_and_seq_len.onnx"));
@ -666,7 +666,7 @@ protected:
};
OPENVINO_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_defaults_fwd_const) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/gru_defaults_fwd_const.onnx"));
@ -711,7 +711,7 @@ OPENVINO_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_defaults_fwd_cons
OPENVINO_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_defaults_fwd) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/gru_defaults_fwd.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/gru_defaults_fwd.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -758,7 +758,7 @@ OPENVINO_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_defaults_fwd) {
OPENVINO_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_fwd_activations_const) {
// activations: relu, sigmoid
auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/gru_fwd_activations_relu_sigmoid_const.onnx"));
@ -800,7 +800,7 @@ OPENVINO_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_fwd_activations_c
OPENVINO_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_fwd_activations_relu_hardsigmoid) {
// activations: relu, hardsigmoid
auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/gru_fwd_activations_relu_hardsigmoid.onnx"));
@ -846,7 +846,7 @@ OPENVINO_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_fwd_activations_r
}
OPENVINO_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_fwd_mixed_seq_len) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/gru_fwd_mixed_seq_len.onnx"));
@ -896,7 +896,7 @@ OPENVINO_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_fwd_mixed_seq_len
}
OPENVINO_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_fwd_mixed_seq_len_const) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/gru_fwd_mixed_seq_len_const.onnx"));
@ -938,7 +938,7 @@ OPENVINO_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_fwd_mixed_seq_len
}
OPENVINO_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_reverse_mixed_seq_len_const) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/gru_reverse_mixed_seq_len_const.onnx"));
@ -980,7 +980,7 @@ OPENVINO_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_reverse_mixed_seq
}
OPENVINO_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_bidir_mixed_seq_len_const) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/gru_bidir_mixed_seq_len_const.onnx"));
@ -1023,7 +1023,7 @@ OPENVINO_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_bidir_mixed_seq_l
OPENVINO_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_rev_clip) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/gru_rev_clip.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/gru_rev_clip.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -1068,7 +1068,7 @@ OPENVINO_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_rev_clip) {
}
OPENVINO_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_rev_clip_const) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/gru_rev_clip_const.onnx"));
@ -1113,7 +1113,7 @@ OPENVINO_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_rev_clip_const) {
OPENVINO_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_reverse_const) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/gru_reverse_const.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/gru_reverse_const.onnx"));
auto test_case = test::TestCase(function, s_device);
test_case.add_input<float>(in_X);
@ -1156,7 +1156,7 @@ OPENVINO_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_reverse_const) {
OPENVINO_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_reverse) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/gru_reverse.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/gru_reverse.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -1201,7 +1201,7 @@ OPENVINO_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_reverse) {
}
OPENVINO_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_fwd_bias_initial_h_const) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/gru_fwd_bias_initial_h_const.onnx"));
@ -1245,7 +1245,7 @@ OPENVINO_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_fwd_bias_initial_
}
OPENVINO_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_fwd_bias_initial_h) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/gru_fwd_bias_initial_h.onnx"));
@ -1294,7 +1294,7 @@ OPENVINO_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_fwd_bias_initial_
}
OPENVINO_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_bidirectional_const) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/gru_bidirectional_const.onnx"));
@ -1338,7 +1338,7 @@ OPENVINO_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_bidirectional_con
OPENVINO_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_bidirectional) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/gru_bidirectional.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/gru_bidirectional.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -1382,7 +1382,7 @@ OPENVINO_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_bidirectional) {
}
OPENVINO_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_fwd_linear_before_reset_const) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/gru_fwd_linear_before_reset_const.onnx"));
@ -1426,7 +1426,7 @@ OPENVINO_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_fwd_linear_before
}
OPENVINO_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_fwd_linear_before_reset) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/gru_fwd_linear_before_reset.onnx"));
@ -1475,7 +1475,7 @@ OPENVINO_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_fwd_linear_before
OPENVINO_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_defaults_fwd_const_dynamic) {
auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/gru_defaults_fwd_const_dynamic.onnx"));
@ -1520,7 +1520,7 @@ OPENVINO_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_defaults_fwd_cons
OPENVINO_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_import_only_gru_defaults_fwd_const_dynamic) {
auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/gru_defaults_fwd_const_dynamic.onnx"));
@ -1621,7 +1621,7 @@ protected:
};
OPENVINO_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_defaults_fwd_const) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/rnn_defaults_fwd_const.onnx"));
@ -1666,7 +1666,7 @@ OPENVINO_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_defaults_fwd_cons
OPENVINO_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_defaults_fwd) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/rnn_defaults_fwd.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/rnn_defaults_fwd.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -1711,7 +1711,7 @@ OPENVINO_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_defaults_fwd) {
}
OPENVINO_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_fwd_activations_const) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/rnn_fwd_activations_const.onnx"));
@ -1755,7 +1755,7 @@ OPENVINO_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_fwd_activations_c
}
OPENVINO_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_fwd_activations) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/rnn_fwd_activations.onnx"));
@ -1801,7 +1801,7 @@ OPENVINO_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_fwd_activations)
}
OPENVINO_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_fwd_mixed_seq_len_const) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/rnn_fwd_mixed_seq_len_const.onnx"));
@ -1845,7 +1845,7 @@ OPENVINO_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_fwd_mixed_seq_len
}
OPENVINO_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_fwd_mixed_seq_len) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/rnn_fwd_mixed_seq_len.onnx"));
@ -1895,7 +1895,7 @@ OPENVINO_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_fwd_mixed_seq_len
}
OPENVINO_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_reverse_mixed_seq_len_const) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/rnn_reverse_mixed_seq_len_const.onnx"));
@ -1935,7 +1935,7 @@ OPENVINO_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_reverse_mixed_seq
}
OPENVINO_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_bidir_mixed_seq_len_const) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/rnn_bidir_mixed_seq_len_const.onnx"));
@ -1979,7 +1979,7 @@ OPENVINO_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_bidir_mixed_seq_l
}
OPENVINO_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_rev_clip_const) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/rnn_rev_clip_const.onnx"));
@ -2024,7 +2024,7 @@ OPENVINO_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_rev_clip_const) {
OPENVINO_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_rev_clip) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/rnn_rev_clip.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/rnn_rev_clip.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -2070,7 +2070,7 @@ OPENVINO_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_rev_clip) {
OPENVINO_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_reverse_const) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/rnn_reverse_const.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/rnn_reverse_const.onnx"));
auto test_case = test::TestCase(function, s_device);
test_case.add_input<float>(in_X);
@ -2113,7 +2113,7 @@ OPENVINO_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_reverse_const) {
OPENVINO_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_reverse) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/rnn_reverse.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/rnn_reverse.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -2158,7 +2158,7 @@ OPENVINO_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_reverse) {
}
OPENVINO_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_fwd_bias_initial_h_const) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/rnn_fwd_bias_initial_h_const.onnx"));
@ -2202,7 +2202,7 @@ OPENVINO_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_fwd_bias_initial_
}
OPENVINO_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_fwd_bias_initial_h) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/rnn_fwd_bias_initial_h.onnx"));
@ -2252,7 +2252,7 @@ OPENVINO_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_fwd_bias_initial_
OPENVINO_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_bidirectional) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/rnn_bidirectional.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/rnn_bidirectional.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -2297,7 +2297,7 @@ OPENVINO_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_bidirectional) {
}
OPENVINO_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_bidirectional_const) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/rnn_bidirectional_const.onnx"));
@ -2343,7 +2343,7 @@ OPENVINO_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_bidirectional_con
OPENVINO_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_defaults_fwd_const_dynamic) {
auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/rnn_defaults_fwd_const_dynamic.onnx"));
@ -2388,7 +2388,7 @@ OPENVINO_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_defaults_fwd_cons
OPENVINO_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_import_only_rnn_defaults_fwd_const_dynamic) {
auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dynamic_shapes/rnn_defaults_fwd_const_dynamic.onnx"));

View File

@ -29,7 +29,7 @@ static std::string s_device = test::backend_name_to_device("${BACKEND_NAME}");
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dft) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/dft.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/dft.onnx"));
auto test_case = test::TestCase(function, s_device);
test_case.add_input<float>(Shape{3, 5, 2}, {0.000000f, 0.000000f, 1.000000f, 0.000000f, 2.000000f, 0.000000f,
3.000000f, 0.000000f, 4.000000f, 0.000000f, 5.000000f, 0.000000f,
@ -46,7 +46,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dft) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dft_only_real) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/dft_only_real.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/dft_only_real.onnx"));
auto test_case = test::TestCase(function, s_device);
test_case.add_input<float>(Shape{3, 5, 1},
{
@ -76,7 +76,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dft_only_real) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dft_onesided) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/dft_onesided.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/dft_onesided.onnx"));
auto test_case = test::TestCase(function, s_device);
test_case.add_input<float>(
Shape{2, 4},
@ -98,7 +98,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dft_onesided) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dft_onesided_skip_convert_to_complex) {
auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dft_onesided_skip_convert_to_complex.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -121,7 +121,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dft_onesided_skip_convert_to_complex)
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dft_length_provided) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dft_lenght_provided.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -136,7 +136,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dft_length_provided) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dft_length_provided_onesided) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dft_lenght_provided_onesided.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -159,7 +159,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dft_length_provided_onesided) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dft_inverse) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/dft_inverse.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/dft_inverse.onnx"));
auto test_case = test::TestCase(function, s_device);
test_case.add_input<float>(Shape{3, 5, 2}, {0.000000f, 0.000000f, 1.000000f, 0.000000f, 2.000000f, 0.000000f,
3.000000f, 0.000000f, 4.000000f, 0.000000f, 5.000000f, 0.000000f,
@ -175,7 +175,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dft_inverse) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dft_inverse_only_real) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dft_inverse_only_real.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -204,7 +204,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dft_inverse_only_real) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dft_inverse_onesided) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dft_inverse_onesided.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -227,7 +227,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dft_inverse_onesided) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dft_inverse_onesided_real_input) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dft_inverse_onesided_real_input.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -237,7 +237,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dft_inverse_onesided_real_input) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dft_inversed_length_provided) {
auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dft_inversed_lenght_provided.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -253,7 +253,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dft_inversed_length_provided) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dft_inverse_length_provided_onesided) {
auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/dft_inverse_lenght_provided_onesided.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -275,7 +275,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dft_inverse_length_provided_onesided)
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_onesided_real_input_no_window_default_length) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/stft_onesided_real_input_no_window_default_length.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -316,7 +316,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_onesided_real_input_no_window_def
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_no_onesided_real_input_no_window_default_length) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/stft_no_onesided_real_input_no_window_default_length.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -378,7 +378,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_no_onesided_real_input_no_window_
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_no_onesided_complex_input_no_window_default_length) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/stft_no_onesided_complex_input_no_window_default_length.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -871,7 +871,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_no_onesided_complex_input_no_wind
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_no_onesided_complex_input_no_window_default_length_2) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/stft_no_onesided_complex_input_no_window_default_length_2.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -948,7 +948,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_no_onesided_complex_input_no_wind
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_no_onesided_complex_input_no_window_no_default_length) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/stft_no_onesided_complex_input_no_window_no_default_length.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -1345,7 +1345,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_no_onesided_complex_input_no_wind
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_no_onesided_complex_input_given_window_default_length) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/stft_no_onesided_complex_input_given_window_default_length.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -1429,7 +1429,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_no_onesided_complex_input_given_w
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_no_onesided_complex_input_given_window_no_default_length) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/stft_no_onesided_complex_input_given_window_no_default_length.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -1486,7 +1486,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_no_onesided_complex_input_given_w
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_onesided_real_input_given_window_no_default_length) {
auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(),
file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/stft_onesided_real_input_given_window_no_default_length.onnx"));
auto test_case = test::TestCase(function, s_device);
@ -1531,7 +1531,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_onesided_real_input_given_window_
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_proper_exception_if_non_const_frame_step) {
try {
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/stft_non_const_frame_step.onnx"));
FAIL() << "Unknown error during STFT import";
@ -1543,7 +1543,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_proper_exception_if_non_const_fra
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_proper_exception_if_dynamic_singal_shape) {
try {
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/stft_dynamic_signal_shape.onnx"));
FAIL() << "Unknown error during STFT import";
@ -1555,7 +1555,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_proper_exception_if_dynamic_singa
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_proper_exception_if_non_const_frame_length) {
try {
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/stft_non_const_frame_length.onnx"));
FAIL() << "Unknown error during STFT import";
@ -1567,7 +1567,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_proper_exception_if_non_const_fra
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_proper_exception_if_complex_signal_and_onesided) {
try {
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/stft_onesided_complex_input.onnx"));
FAIL() << "Unknown error during STFT import";

View File

@ -28,7 +28,7 @@ static std::string s_device = test::backend_name_to_device("${BACKEND_NAME}");
// ############################################################################ CORE TESTS
OPENVINO_TEST(${BACKEND_NAME}, onnx_compress_axis_0) {
ov::onnx_editor::ONNXModelEditor editor{
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/compress_0.onnx")};
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/compress_0.onnx")};
std::map<std::string, std::shared_ptr<ngraph::op::Constant>> in_vals;
@ -45,7 +45,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_compress_axis_0) {
OPENVINO_TEST(${BACKEND_NAME}, onnx_compress_axis_1) {
ov::onnx_editor::ONNXModelEditor editor{
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/compress_1.onnx")};
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/compress_1.onnx")};
std::map<std::string, std::shared_ptr<ngraph::op::Constant>> in_vals;
@ -61,7 +61,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_compress_axis_1) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_compress_default_axis) {
ov::onnx_editor::ONNXModelEditor editor{file_util::path_join(CommonTestUtils::getExecutableDirectory(),
ov::onnx_editor::ONNXModelEditor editor{file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/compress_default_axis.onnx")};
@ -79,7 +79,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_compress_default_axis) {
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_compress_negative_axis) {
ov::onnx_editor::ONNXModelEditor editor{file_util::path_join(CommonTestUtils::getExecutableDirectory(),
ov::onnx_editor::ONNXModelEditor editor{file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/compress_negative_axis.onnx")};
@ -105,7 +105,7 @@ TYPED_TEST_P(ElemTypesTests, onnx_test_add_abc_set_precission) {
const element::Type ng_type = element::from<DataType>();
ov::onnx_editor::ONNXModelEditor editor{
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/add_abc_3d.onnx")};
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/add_abc_3d.onnx")};
editor.set_input_types({{"A", ng_type}, {"B", ng_type}, {"C", ng_type}});
@ -122,7 +122,7 @@ TYPED_TEST_P(ElemTypesTests, onnx_test_split_multioutput_set_precission) {
using DataType = TypeParam;
const element::Type ng_type = element::from<DataType>();
ov::onnx_editor::ONNXModelEditor editor{file_util::path_join(CommonTestUtils::getExecutableDirectory(),
ov::onnx_editor::ONNXModelEditor editor{file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/split_equal_parts_default.onnx")};

View File

@ -17,7 +17,7 @@ OPENVINO_SUPPRESS_DEPRECATED_START
TEST(ONNX_Importer_Tests, ImportBasicModel) {
auto model_file_path =
CommonTestUtils::getModelFromTestModelZoo(ov::util::path_join({ONNX_MODELS_DIR, "add_abc_initializers.onnx"}));
ov::test::utils::getModelFromTestModelZoo(ov::util::path_join({ONNX_MODELS_DIR, "add_abc_initializers.onnx"}));
auto function = ngraph::onnx_import::import_onnx_model(model_file_path);
int count_additions = 0;
@ -42,7 +42,7 @@ TEST(ONNX_Importer_Tests, ImportBasicModel) {
TEST(ONNX_Importer_Tests, ImportModelWithFusedOp) {
auto model_file_path =
CommonTestUtils::getModelFromTestModelZoo(ov::util::path_join({ONNX_MODELS_DIR, "selu.onnx"}));
ov::test::utils::getModelFromTestModelZoo(ov::util::path_join({ONNX_MODELS_DIR, "selu.onnx"}));
auto function = ngraph::onnx_import::import_onnx_model(model_file_path);
int count_selu = 0;
@ -67,7 +67,7 @@ TEST(ONNX_Importer_Tests, ImportModelWithFusedOp) {
TEST(ONNX_Importer_Tests, ImportModelWithMultiOutput) {
auto model_file_path =
CommonTestUtils::getModelFromTestModelZoo(ov::util::path_join({ONNX_MODELS_DIR, "topk.onnx"}));
ov::test::utils::getModelFromTestModelZoo(ov::util::path_join({ONNX_MODELS_DIR, "topk.onnx"}));
auto function = ngraph::onnx_import::import_onnx_model(model_file_path);
int count_topk = 0;
@ -95,7 +95,7 @@ TEST(ONNX_Importer_Tests, ImportModelWithMultiOutput) {
TEST(ONNX_Importer_Tests, ImportModelWithNotSupportedOp) {
auto model_file_path =
CommonTestUtils::getModelFromTestModelZoo(ov::util::path_join({ONNX_MODELS_DIR, "not_supported.onnx"}));
ov::test::utils::getModelFromTestModelZoo(ov::util::path_join({ONNX_MODELS_DIR, "not_supported.onnx"}));
try {
auto function = ngraph::onnx_import::import_onnx_model(model_file_path);
FAIL() << "Any expection was thrown despite the ONNX model is not supported";
@ -110,7 +110,7 @@ TEST(ONNX_Importer_Tests, ImportModelWithNotSupportedOp) {
TEST(ONNX_Importer_Tests, ImportModelWhenFileDoesNotExist) {
auto model_file_path =
CommonTestUtils::getModelFromTestModelZoo(ov::util::path_join({ONNX_MODELS_DIR, "not_exist_file.onnx"}));
ov::test::utils::getModelFromTestModelZoo(ov::util::path_join({ONNX_MODELS_DIR, "not_exist_file.onnx"}));
try {
auto function = ngraph::onnx_import::import_onnx_model(model_file_path);
FAIL() << "Any expection was thrown despite the ONNX model file does not exist";
@ -126,7 +126,7 @@ TEST(ONNX_Importer_Tests, ImportModelWhenFileDoesNotExist) {
// TODO: CVS-61224
TEST(ONNX_Importer_Tests, DISABLED_ImportModelFromStream) {
auto model_file_path =
CommonTestUtils::getModelFromTestModelZoo(ov::util::path_join({ONNX_MODELS_DIR, "addmul_abc.onnx"}));
ov::test::utils::getModelFromTestModelZoo(ov::util::path_join({ONNX_MODELS_DIR, "addmul_abc.onnx"}));
std::ifstream model_file_stream(model_file_path);
ASSERT_TRUE(model_file_stream.is_open());
int count_adds = 0;
@ -166,14 +166,14 @@ TEST(ONNX_Importer_Tests, IsOperatorSupported) {
TEST(ONNX_Importer_Tests, ImportModelWithoutMetadata) {
ov::Core core;
auto model = core.read_model(
CommonTestUtils::getModelFromTestModelZoo(ov::util::path_join({ONNX_MODELS_DIR, "priorbox_clustered.onnx"})));
ov::test::utils::getModelFromTestModelZoo(ov::util::path_join({ONNX_MODELS_DIR, "priorbox_clustered.onnx"})));
ASSERT_FALSE(model->has_rt_info("framework"));
}
TEST(ONNX_Importer_Tests, ImportModelWithMetadata) {
ov::Core core;
auto model = core.read_model(
CommonTestUtils::getModelFromTestModelZoo(ov::util::path_join({ONNX_MODELS_DIR, "model_with_metadata.onnx"})));
ov::test::utils::getModelFromTestModelZoo(ov::util::path_join({ONNX_MODELS_DIR, "model_with_metadata.onnx"})));
ASSERT_TRUE(model->has_rt_info("framework"));
const auto rtinfo = model->get_rt_info();

View File

@ -23,7 +23,7 @@ static std::string s_manifest = "${MANIFEST}";
OPENVINO_TEST(ops_registration, check_importing_abs_in_all_opset_versions) {
ONNXModelEditor editor{
ov::util::path_join({CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/abs.onnx"})};
ov::util::path_join({ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/abs.onnx"})};
for (int version = 1; version <= ONNX_OPSET_VERSION; ++version) {
const auto changed_opset_model = change_opset_version(editor.model_string(), {version});
std::stringstream model_stream{changed_opset_model};
@ -38,7 +38,7 @@ OPENVINO_TEST(ops_registration, check_importing_add_in_different_opsets) {
}) != std::end(ops);
};
ONNXModelEditor editor{ov::util::path_join(
{CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/add_v6_broadcast_dynamic.onnx"})};
{ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/add_v6_broadcast_dynamic.onnx"})};
for (int version = 1; version <= ONNX_OPSET_VERSION; ++version) {
const auto changed_opset_model = change_opset_version(editor.model_string(), {version});
std::stringstream model_stream{changed_opset_model};

View File

@ -24,7 +24,7 @@
TEST(ONNX_Reader_Tests, ImportModelWithExternalDataFromFile) {
InferenceEngine::Core ie;
auto cnnNetwork = ie.ReadNetwork(
CommonTestUtils::getModelFromTestModelZoo(std::string(ONNX_TEST_MODELS) + "onnx_external_data.onnx"),
ov::test::utils::getModelFromTestModelZoo(std::string(ONNX_TEST_MODELS) + "onnx_external_data.onnx"),
"");
auto function = cnnNetwork.getFunction();
@ -58,7 +58,7 @@ TEST(ONNX_Reader_Tests, ImportModelWithExternalDataFromFile) {
TEST(ONNX_Reader_Tests, ImportModelWithExternalDataFromStringException) {
InferenceEngine::Core ie;
const auto path =
CommonTestUtils::getModelFromTestModelZoo(std::string(ONNX_TEST_MODELS) + "onnx_external_data.onnx");
ov::test::utils::getModelFromTestModelZoo(std::string(ONNX_TEST_MODELS) + "onnx_external_data.onnx");
InferenceEngine::Blob::CPtr weights; // not used
std::ifstream stream(path, std::ios::binary);
std::string modelAsString((std::istreambuf_iterator<char>(stream)), std::istreambuf_iterator<char>());
@ -79,16 +79,16 @@ TEST(ONNX_Reader_Tests, ImportModelWithExternalDataFromStringException) {
#if defined(OPENVINO_ENABLE_UNICODE_PATH_SUPPORT) && defined(_WIN32)
TEST(ONNX_Reader_Tests, ImportModelWithExternalDataFromWstringNamedFile) {
InferenceEngine::Core ie;
std::string win_dir_path = CommonTestUtils::getModelFromTestModelZoo(ONNX_TEST_MODELS "onnx_external_data.onnx");
std::string win_dir_path = ov::test::utils::getModelFromTestModelZoo(ONNX_TEST_MODELS "onnx_external_data.onnx");
std::wstring wmodel =
CommonTestUtils::addUnicodePostfixToPath(win_dir_path, CommonTestUtils::test_unicode_postfix_vector[0]);
bool is_copy_successfully = CommonTestUtils::copyFile(win_dir_path, wmodel);
ov::test::utils::addUnicodePostfixToPath(win_dir_path, ov::test::utils::test_unicode_postfix_vector[0]);
bool is_copy_successfully = ov::test::utils::copyFile(win_dir_path, wmodel);
if (!is_copy_successfully) {
FAIL() << "Unable to copy from '" << win_dir_path << "' to '" << ov::util::wstring_to_string(wmodel) << "'";
}
auto cnnNetwork = ie.ReadNetwork(wmodel, L"");
CommonTestUtils::removeFile(wmodel);
ov::test::utils::removeFile(wmodel);
auto function = cnnNetwork.getFunction();
int count_add = 0;
@ -125,7 +125,7 @@ class OnnxFeMmapFixture : public ::testing::TestWithParam<bool> {};
TEST_P(OnnxFeMmapFixture, onnx_external_data) {
const auto path =
CommonTestUtils::getModelFromTestModelZoo(std::string(ONNX_TEST_MODELS) + "external_data/external_data.onnx");
ov::test::utils::getModelFromTestModelZoo(std::string(ONNX_TEST_MODELS) + "external_data/external_data.onnx");
ov::Core core;
core.set_property(ov::enable_mmap(GetParam()));
const auto model = core.read_model(path);
@ -138,7 +138,7 @@ TEST_P(OnnxFeMmapFixture, onnx_external_data) {
TEST_P(OnnxFeMmapFixture, onnx_external_data_from_stream) {
const auto path =
CommonTestUtils::getModelFromTestModelZoo(std::string(ONNX_TEST_MODELS) + "external_data/external_data.onnx");
ov::test::utils::getModelFromTestModelZoo(std::string(ONNX_TEST_MODELS) + "external_data/external_data.onnx");
std::ifstream stream{path, std::ios::in | std::ios::binary};
std::istream* is = &stream;
ASSERT_TRUE(stream.is_open());
@ -160,7 +160,7 @@ TEST_P(OnnxFeMmapFixture, onnx_external_data_from_stream) {
TEST_P(OnnxFeMmapFixture, onnx_external_data_incorrect_size_exception) {
try {
const auto path = CommonTestUtils::getModelFromTestModelZoo(
const auto path = ov::test::utils::getModelFromTestModelZoo(
std::string(ONNX_TEST_MODELS) + "external_data/external_data_incorrect_data_shape.onnx");
ov::Core core;
core.set_property(ov::enable_mmap(GetParam()));
@ -178,7 +178,7 @@ TEST_P(OnnxFeMmapFixture, onnx_external_data_incorrect_size_exception) {
}
TEST_P(OnnxFeMmapFixture, onnx_external_data_optional_fields) {
const auto path = CommonTestUtils::getModelFromTestModelZoo(std::string(ONNX_TEST_MODELS) +
const auto path = ov::test::utils::getModelFromTestModelZoo(std::string(ONNX_TEST_MODELS) +
"external_data/external_data_optional_fields.onnx");
ov::Core core;
core.set_property(ov::enable_mmap(GetParam()));
@ -191,7 +191,7 @@ TEST_P(OnnxFeMmapFixture, onnx_external_data_optional_fields) {
}
TEST_P(OnnxFeMmapFixture, onnx_external_offset_not_aligned_with_page_size) {
const auto path = CommonTestUtils::getModelFromTestModelZoo(
const auto path = ov::test::utils::getModelFromTestModelZoo(
std::string(ONNX_TEST_MODELS) + "external_data/external_data_optional_fields_offset_not_aligned.onnx");
ov::Core core;
core.set_property(ov::enable_mmap(GetParam()));
@ -204,7 +204,7 @@ TEST_P(OnnxFeMmapFixture, onnx_external_offset_not_aligned_with_page_size) {
}
TEST_P(OnnxFeMmapFixture, onnx_external_offset_not_aligned_with_page_and_less_than_page_size_with_length_provided) {
const auto path = CommonTestUtils::getModelFromTestModelZoo(
const auto path = ov::test::utils::getModelFromTestModelZoo(
std::string(ONNX_TEST_MODELS) +
"external_data/external_data_offset_not_aligned_with_page_and_less_than_page_size_with_length_provided.onnx");
ov::Core core;
@ -218,7 +218,7 @@ TEST_P(OnnxFeMmapFixture, onnx_external_offset_not_aligned_with_page_and_less_th
}
TEST_P(OnnxFeMmapFixture, onnx_external_offset_not_aligned_with_page_and_greater_than_page_size_with_length_provided) {
const auto path = CommonTestUtils::getModelFromTestModelZoo(
const auto path = ov::test::utils::getModelFromTestModelZoo(
std::string(ONNX_TEST_MODELS) +
"external_data/"
"external_data_offset_not_aligned_with_page_and_greater_than_page_size_with_length_provided.onnx");
@ -233,7 +233,7 @@ TEST_P(OnnxFeMmapFixture, onnx_external_offset_not_aligned_with_page_and_greater
}
TEST_P(OnnxFeMmapFixture, onnx_external_offset_not_aligned_with_page_in_two_pages_scope) {
const auto path = CommonTestUtils::getModelFromTestModelZoo(std::string(ONNX_TEST_MODELS) +
const auto path = ov::test::utils::getModelFromTestModelZoo(std::string(ONNX_TEST_MODELS) +
"external_data/"
"offset_not_aligned_with_page_in_two_pages_scope.onnx");
ov::Core core;
@ -247,7 +247,7 @@ TEST_P(OnnxFeMmapFixture, onnx_external_offset_not_aligned_with_page_in_two_page
}
TEST_P(OnnxFeMmapFixture, onnx_external_data_in_different_paths) {
const auto path = CommonTestUtils::getModelFromTestModelZoo(std::string(ONNX_TEST_MODELS) +
const auto path = ov::test::utils::getModelFromTestModelZoo(std::string(ONNX_TEST_MODELS) +
"external_data/external_data_different_paths.onnx");
ov::Core core;
core.set_property(ov::enable_mmap(GetParam()));
@ -261,7 +261,7 @@ TEST_P(OnnxFeMmapFixture, onnx_external_data_in_different_paths) {
}
TEST_P(OnnxFeMmapFixture, onnx_external_two_tensors_data_in_the_same_file) {
const auto path = CommonTestUtils::getModelFromTestModelZoo(
const auto path = ov::test::utils::getModelFromTestModelZoo(
std::string(ONNX_TEST_MODELS) + "external_data/external_data_two_tensors_data_in_the_same_file.onnx");
ov::Core core;
core.set_property(ov::enable_mmap(GetParam()));
@ -276,7 +276,7 @@ TEST_P(OnnxFeMmapFixture, onnx_external_two_tensors_data_in_the_same_file) {
TEST_P(OnnxFeMmapFixture, onnx_external_invalid_external_data_exception) {
try {
const auto path = CommonTestUtils::getModelFromTestModelZoo(std::string(ONNX_TEST_MODELS) +
const auto path = ov::test::utils::getModelFromTestModelZoo(std::string(ONNX_TEST_MODELS) +
"external_data/external_data_file_not_found.onnx");
ov::Core core;
core.set_property(ov::enable_mmap(GetParam()));
@ -293,7 +293,7 @@ TEST_P(OnnxFeMmapFixture, onnx_external_invalid_external_data_exception) {
TEST_P(OnnxFeMmapFixture, onnx_external_invalid_up_dir_path) {
try {
const auto path = CommonTestUtils::getModelFromTestModelZoo(
const auto path = ov::test::utils::getModelFromTestModelZoo(
std::string(ONNX_TEST_MODELS) + "external_data/inner_scope/external_data_file_in_up_dir.onnx");
ov::Core core;
core.set_property(ov::enable_mmap(GetParam()));
@ -311,7 +311,7 @@ TEST_P(OnnxFeMmapFixture, onnx_external_invalid_up_dir_path) {
TEST_P(OnnxFeMmapFixture, onnx_external_invalid_data_length) {
try {
const auto path = CommonTestUtils::getModelFromTestModelZoo(
const auto path = ov::test::utils::getModelFromTestModelZoo(
std::string(ONNX_TEST_MODELS) + "external_data/external_data_invalid_data_length.onnx");
ov::Core core;
core.set_property(ov::enable_mmap(GetParam()));
@ -328,7 +328,7 @@ TEST_P(OnnxFeMmapFixture, onnx_external_invalid_data_length) {
}
TEST_P(OnnxFeMmapFixture, onnx_external_data_sanitize_path) {
const auto path = CommonTestUtils::getModelFromTestModelZoo(std::string(ONNX_TEST_MODELS) +
const auto path = ov::test::utils::getModelFromTestModelZoo(std::string(ONNX_TEST_MODELS) +
"external_data/external_data_sanitize_test.onnx");
ov::Core core;
core.set_property(ov::enable_mmap(GetParam()));
@ -341,7 +341,7 @@ TEST_P(OnnxFeMmapFixture, onnx_external_data_sanitize_path) {
}
TEST_P(OnnxFeMmapFixture, onnx_external_data_in_constant_node) {
const auto path = CommonTestUtils::getModelFromTestModelZoo(std::string(ONNX_TEST_MODELS) +
const auto path = ov::test::utils::getModelFromTestModelZoo(std::string(ONNX_TEST_MODELS) +
"external_data/external_data_in_constant_node.onnx");
ov::Core core;
core.set_property(ov::enable_mmap(GetParam()));

View File

@ -52,7 +52,7 @@ std::shared_ptr<OpType> find_by_friendly_name(const std::vector<DerivedFromNode>
OPENVINO_TEST(onnx_tensor_names, simple_model) {
const auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/tensor_names.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/tensor_names.onnx"));
const auto ops = function->get_ordered_ops();
EXPECT_TRUE(matching_node_found_in_graph<op::Parameter>(ops, "identity_on_input", {"input", "identity_on_input"}));
@ -65,7 +65,7 @@ OPENVINO_TEST(onnx_tensor_names, simple_model) {
OPENVINO_TEST(onnx_tensor_names, node_multiple_outputs) {
const auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/top_k.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/top_k.onnx"));
const auto ops = function->get_ordered_ops();
EXPECT_TRUE(matching_node_found_in_graph<op::Parameter>(ops, "x", {"x"}));
@ -78,7 +78,7 @@ OPENVINO_TEST(onnx_tensor_names, node_multiple_outputs) {
}
OPENVINO_TEST(onnx_tensor_names, subgraph_with_multiple_nodes) {
const auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
const auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/max_pool_transposed.onnx"));
@ -97,7 +97,7 @@ OPENVINO_TEST(onnx_tensor_names, subgraph_with_multiple_nodes) {
OPENVINO_TEST(onnx_tensor_names, simple_multiout_operator) {
const auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/max_pool_simple.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/max_pool_simple.onnx"));
const auto ops = function->get_ordered_ops();
@ -112,7 +112,7 @@ OPENVINO_TEST(onnx_tensor_names, simple_multiout_operator) {
}
OPENVINO_TEST(onnx_tensor_names, simple_multiout_named_operator) {
const auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
const auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/max_pool_simple_named.onnx"));
@ -129,7 +129,7 @@ OPENVINO_TEST(onnx_tensor_names, simple_multiout_named_operator) {
}
OPENVINO_TEST(onnx_tensor_names, subgraph_with_multiple_nodes_named) {
const auto function = onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
const auto function = onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/max_pool_transposed_named.onnx"));
@ -146,7 +146,7 @@ OPENVINO_TEST(onnx_tensor_names, subgraph_with_multiple_nodes_named) {
OPENVINO_TEST(onnx_tensor_names, subgraph_conv_with_bias) {
const auto function =
onnx_import::import_onnx_model(file_util::path_join(CommonTestUtils::getExecutableDirectory(),
onnx_import::import_onnx_model(file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/conv_with_strides_padding_bias.onnx"));
@ -162,7 +162,7 @@ OPENVINO_TEST(onnx_tensor_names, subgraph_conv_with_bias) {
OPENVINO_TEST(onnx_tensor_names, subgraph_gemm_with_bias) {
const auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/gemm_abc.onnx"));
file_util::path_join(ov::test::utils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/gemm_abc.onnx"));
const auto ops = function->get_ordered_ops();

View File

@ -29,7 +29,7 @@ static std::string s_device = test::backend_name_to_device("${BACKEND_NAME}");
OPENVINO_TEST(${BACKEND_NAME}, add_abc_from_ir) {
const auto ir_xml =
file_util::path_join(CommonTestUtils::getExecutableDirectory(), TEST_MODEL_ZOO, "core/models/ir/add_abc.xml");
file_util::path_join(ov::test::utils::getExecutableDirectory(), TEST_MODEL_ZOO, "core/models/ir/add_abc.xml");
const auto function = test::function_from_ir(ir_xml);
auto test_case = test::TestCase(function, s_device);
@ -43,9 +43,9 @@ OPENVINO_TEST(${BACKEND_NAME}, add_abc_from_ir) {
OPENVINO_TEST(${BACKEND_NAME}, add_abc_from_ir_with_bin_path) {
const auto ir_xml =
file_util::path_join(CommonTestUtils::getExecutableDirectory(), TEST_MODEL_ZOO, "core/models/ir/add_abc.xml");
file_util::path_join(ov::test::utils::getExecutableDirectory(), TEST_MODEL_ZOO, "core/models/ir/add_abc.xml");
const auto ir_bin =
file_util::path_join(CommonTestUtils::getExecutableDirectory(), TEST_MODEL_ZOO, "core/models/ir/add_abc.bin");
file_util::path_join(ov::test::utils::getExecutableDirectory(), TEST_MODEL_ZOO, "core/models/ir/add_abc.bin");
const auto function = test::function_from_ir(ir_xml, ir_bin);
auto test_case = test::TestCase(function, s_device);

View File

@ -63,12 +63,12 @@ bool after_func_expand_name_comp(std::string lhs, std::string rhs) {
} // namespace
OPENVINO_TEST(onnx_transformations, expand_function_greater_or_equal) {
ONNXModelEditor editor{file_util::path_join(CommonTestUtils::getExecutableDirectory(),
ONNXModelEditor editor{file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/transformations/greater_or_equal.onnx")};
editor.decode(); // onnx transformations are applied
const auto ref_model = file_util::path_join(CommonTestUtils::getExecutableDirectory(),
const auto ref_model = file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/transformations/reference/"
"greater_or_equal_expanded.onnx");
@ -79,12 +79,12 @@ OPENVINO_TEST(onnx_transformations, expand_function_greater_or_equal) {
// Disabled, ticket: #81976
OPENVINO_TEST(onnx_transformations, DISABLED_expand_function_softmax_crossentropy) {
ONNXModelEditor editor{file_util::path_join(CommonTestUtils::getExecutableDirectory(),
ONNXModelEditor editor{file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/transformations/softmax_crossentropy_consumed.onnx")};
editor.decode(); // onnx transformations are applied
const auto ref_model = file_util::path_join(CommonTestUtils::getExecutableDirectory(),
const auto ref_model = file_util::path_join(ov::test::utils::getExecutableDirectory(),
SERIALIZED_ZOO,
"onnx/transformations/reference/"
"softmax_crossentropy_consumed_expanded.onnx");

View File

@ -156,7 +156,7 @@ TEST(ONNXOpExtensionViaCommonConstructor, onnx_op_extension_via_template_arg_wit
auto fe = std::make_shared<ov::frontend::onnx::FrontEnd>();
fe->add_extension(ext);
const auto input_model = fe->load(CommonTestUtils::getModelFromTestModelZoo(
const auto input_model = fe->load(ov::test::utils::getModelFromTestModelZoo(
ov::util::path_join({TEST_ONNX_MODELS_DIRNAME, "relu_custom_domain.onnx"})));
std::shared_ptr<ov::Model> model;
@ -170,7 +170,7 @@ TEST(ONNXOpExtensionViaCommonConstructor, onnx_op_extension_via_ov_type_name_wit
auto fe = std::make_shared<ov::frontend::onnx::FrontEnd>();
fe->add_extension(ext);
const auto input_model = fe->load(CommonTestUtils::getModelFromTestModelZoo(
const auto input_model = fe->load(ov::test::utils::getModelFromTestModelZoo(
ov::util::path_join({TEST_ONNX_MODELS_DIRNAME, "relu_custom_domain.onnx"})));
std::shared_ptr<ov::Model> model;
@ -200,7 +200,7 @@ class OldApiNode : public InferenceEngine::IExtension {
} // namespace
TEST(ONNXOpExtensionViaCommonConstructor, onnx_op_extension_mixed_legacy_and_new_api) {
const auto input_model_path = CommonTestUtils::getModelFromTestModelZoo(
const auto input_model_path = ov::test::utils::getModelFromTestModelZoo(
ov::util::path_join({TEST_ONNX_MODELS_DIRNAME, "relu_custom_domain.onnx"}));
ov::Core core;
core.add_extension(std::make_shared<OldApiNode>());

View File

@ -45,15 +45,15 @@ TEST(Paddle_Reader_Tests, ImportBasicModelToCoreWstring) {
std::string win_dir_path{TEST_PADDLE_MODELS_DIRNAME "relu/relu.pdmodel"};
win_dir_path = FrontEndTestUtils::make_model_path(win_dir_path);
std::wstring wmodel =
CommonTestUtils::addUnicodePostfixToPath(win_dir_path, CommonTestUtils::test_unicode_postfix_vector[0]);
bool is_copy_successfully = CommonTestUtils::copyFile(win_dir_path, wmodel);
ov::test::utils::addUnicodePostfixToPath(win_dir_path, ov::test::utils::test_unicode_postfix_vector[0]);
bool is_copy_successfully = ov::test::utils::copyFile(win_dir_path, wmodel);
if (!is_copy_successfully) {
FAIL() << "Unable to copy from '" << win_dir_path << "' to '" << ov::util::wstring_to_string(wmodel) << "'";
}
ov::Core core;
auto function = core.read_model(wmodel);
CommonTestUtils::removeFile(wmodel);
ov::test::utils::removeFile(wmodel);
const auto inputType = ov::element::f32;
const auto inputShape = ov::Shape{3};

View File

@ -46,7 +46,7 @@ inline bool exists(const std::string& file) {
}
inline std::string make_model_path(const std::string& modelsRelativePath) {
return CommonTestUtils::getModelFromTestModelZoo(modelsRelativePath);
return ov::test::utils::getModelFromTestModelZoo(modelsRelativePath);
}
std::string get_disabled_tests(const std::string& manifest_path);

View File

@ -29,7 +29,7 @@ void FrontEndConversionExtensionTest::initParamTest() {
}
inline std::string get_lib_path(const std::string& lib_name) {
return ov::util::make_plugin_library_name<char>(CommonTestUtils::getExecutableDirectory(),
return ov::util::make_plugin_library_name<char>(ov::test::utils::getExecutableDirectory(),
lib_name + IE_BUILD_POSTFIX);
}

View File

@ -22,7 +22,7 @@ std::string FrontendLibCloseTest::get_test_case_name(const testing::TestParamInf
void FrontendLibCloseTest::SetUp() {
SKIP_IF_CURRENT_TEST_IS_DISABLED()
std::tie(frontend, model_path, exp_name) = GetParam();
model_path = CommonTestUtils::getModelFromTestModelZoo(model_path);
model_path = ov::test::utils::getModelFromTestModelZoo(model_path);
}
/**

View File

@ -31,7 +31,7 @@ void FrontendLibraryExtensionTest::initParamTest() {
}
inline std::string get_lib_path(const std::string& lib_name) {
return ov::util::make_plugin_library_name<char>(CommonTestUtils::getExecutableDirectory(),
return ov::util::make_plugin_library_name<char>(ov::test::utils::getExecutableDirectory(),
lib_name + IE_BUILD_POSTFIX);
}

View File

@ -161,7 +161,7 @@ class MkDirGuard {
public:
explicit MkDirGuard(std::string dir = std::string()) : m_dir(std::move(dir)) {
if (!m_dir.empty()) {
CommonTestUtils::createDirectory(m_dir);
ov::test::utils::createDirectory(m_dir);
}
}
@ -170,8 +170,8 @@ public:
~MkDirGuard() {
if (!m_dir.empty()) {
CommonTestUtils::removeFilesWithExt(m_dir, "blob");
CommonTestUtils::removeDir(m_dir);
ov::test::utils::removeFilesWithExt(m_dir, "blob");
ov::test::utils::removeDir(m_dir);
}
}
};
@ -208,7 +208,7 @@ public:
static std::string get_mock_engine_path() {
std::string mockEngineName("mock_engine");
return ov::util::make_plugin_library_name(CommonTestUtils::getExecutableDirectory(),
return ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(),
mockEngineName + IE_BUILD_POSTFIX);
}
@ -218,7 +218,7 @@ public:
m_testFunction = getLoadFunction(m_type);
m_testFunctionWithCfg = getLoadFunctionWithCfg(m_type);
m_remoteContext = std::get<2>(std::get<0>(GetParam()));
auto testName = CommonTestUtils::generateTestFilePrefix();
auto testName = ov::test::utils::generateTestFilePrefix();
modelName = testName + ".xml";
weightsName = testName + ".bin";
m_cacheDir = testName + m_cacheDir;
@ -309,13 +309,13 @@ public:
EXPECT_TRUE(Mock::VerifyAndClearExpectations(net.get()));
}
EXPECT_TRUE(Mock::VerifyAndClearExpectations(mockPlugin.get()));
CommonTestUtils::removeIRFiles(modelName, weightsName);
ov::test::utils::removeIRFiles(modelName, weightsName);
}
void testLoad(const std::function<void(Core& ie)>& func) {
Core ie;
injectProxyEngine(mockPlugin.get());
ie.RegisterPlugin(ov::util::make_plugin_library_name(CommonTestUtils::getExecutableDirectory(),
ie.RegisterPlugin(ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(),
std::string("mock_engine") + IE_BUILD_POSTFIX),
deviceName);
func(ie);
@ -1420,9 +1420,9 @@ TEST_P(CachingTest, TestChangeCacheDirFailure) {
}
TEST_P(CachingTest, TestCacheDirCreateRecursive) {
std::string newCacheDir1 = m_cacheDir + CommonTestUtils::FileSeparator + "a";
std::string newCacheDir2 = newCacheDir1 + CommonTestUtils::FileSeparator + "b";
std::string newCacheDir3 = newCacheDir2 + CommonTestUtils::FileSeparator + CommonTestUtils::FileSeparator;
std::string newCacheDir1 = m_cacheDir + ov::test::utils::FileSeparator + "a";
std::string newCacheDir2 = newCacheDir1 + ov::test::utils::FileSeparator + "b";
std::string newCacheDir3 = newCacheDir2 + ov::test::utils::FileSeparator + ov::test::utils::FileSeparator;
EXPECT_CALL(*mockPlugin, GetMetric(METRIC_KEY(SUPPORTED_CONFIG_KEYS), _)).Times(AnyNumber());
EXPECT_CALL(*mockPlugin, GetMetric(ov::supported_properties.name(), _)).Times(AnyNumber());
@ -1444,9 +1444,9 @@ TEST_P(CachingTest, TestCacheDirCreateRecursive) {
EXPECT_NO_THROW(m_testFunction(ie));
});
}
CommonTestUtils::removeFilesWithExt(newCacheDir2, "blob");
CommonTestUtils::removeDir(newCacheDir2);
CommonTestUtils::removeDir(newCacheDir1);
ov::test::utils::removeFilesWithExt(newCacheDir2, "blob");
ov::test::utils::removeDir(newCacheDir2);
ov::test::utils::removeDir(newCacheDir1);
}
TEST_P(CachingTest, TestDeviceArchitecture) {
@ -1788,7 +1788,7 @@ TEST_P(CachingTest, TestCacheFileCorrupted) {
});
}
{
auto blobs = CommonTestUtils::listFilesWithExt(m_cacheDir, "blob");
auto blobs = ov::test::utils::listFilesWithExt(m_cacheDir, "blob");
for (const auto& fileName : blobs) {
std::ofstream stream(fileName, std::ios_base::binary);
stream << "SomeCorruptedText";
@ -1846,7 +1846,7 @@ TEST_P(CachingTest, TestCacheFileOldVersion) {
});
}
{
auto blobs = CommonTestUtils::listFilesWithExt(m_cacheDir, "blob");
auto blobs = ov::test::utils::listFilesWithExt(m_cacheDir, "blob");
for (const auto& fileName : blobs) {
std::string content;
{
@ -1912,7 +1912,7 @@ TEST_P(CachingTest, LoadHetero_NoCacheMetric) {
.Times(AnyNumber())
.WillRepeatedly(Return(std::vector<ov::PropertyName>{}));
// Hetero supports Import/Export, but mock plugin does not
deviceToLoad = CommonTestUtils::DEVICE_HETERO + std::string(":mock.1,mock.2");
deviceToLoad = ov::test::utils::DEVICE_HETERO + std::string(":mock.1,mock.2");
if (m_remoteContext) {
return; // skip the remote Context test for Hetero plugin
}
@ -1936,7 +1936,7 @@ TEST_P(CachingTest, LoadHetero_NoCacheMetric) {
TEST_P(CachingTest, LoadHetero_OneDevice) {
EXPECT_CALL(*mockPlugin, QueryNetwork(_, _)).Times(AnyNumber());
EXPECT_CALL(*mockPlugin, GetMetric(_, _)).Times(AnyNumber());
deviceToLoad = CommonTestUtils::DEVICE_HETERO + std::string(":mock");
deviceToLoad = ov::test::utils::DEVICE_HETERO + std::string(":mock");
if (m_remoteContext) {
return; // skip the remote Context test for Hetero plugin
}
@ -1953,7 +1953,7 @@ TEST_P(CachingTest, LoadHetero_OneDevice) {
m_testFunction(ie);
});
// Ensure that only 1 blob (for Hetero) is created
EXPECT_EQ(CommonTestUtils::listFilesWithExt(m_cacheDir, "blob").size(), 1);
EXPECT_EQ(ov::test::utils::listFilesWithExt(m_cacheDir, "blob").size(), 1);
}
m_post_mock_net_callbacks.pop_back();
{
@ -1975,7 +1975,7 @@ TEST_P(CachingTest, LoadHetero_OneDevice) {
TEST_P(CachingTest, LoadHetero_TargetFallbackFromCore) {
EXPECT_CALL(*mockPlugin, QueryNetwork(_, _)).Times(AnyNumber());
EXPECT_CALL(*mockPlugin, GetMetric(_, _)).Times(AnyNumber());
deviceToLoad = CommonTestUtils::DEVICE_HETERO;
deviceToLoad = ov::test::utils::DEVICE_HETERO;
if (m_remoteContext) {
return; // skip the remote Context test for Hetero plugin
}
@ -1989,11 +1989,11 @@ TEST_P(CachingTest, LoadHetero_TargetFallbackFromCore) {
});
testLoad([&](Core& ie) {
ie.SetConfig({{CONFIG_KEY(CACHE_DIR), m_cacheDir}});
ie.SetConfig({{"TARGET_FALLBACK", "mock"}}, CommonTestUtils::DEVICE_HETERO);
ie.SetConfig({{"TARGET_FALLBACK", "mock"}}, ov::test::utils::DEVICE_HETERO);
m_testFunction(ie);
});
// Ensure that only 1 blob (for Hetero) is created
EXPECT_EQ(CommonTestUtils::listFilesWithExt(m_cacheDir, "blob").size(), 1);
EXPECT_EQ(ov::test::utils::listFilesWithExt(m_cacheDir, "blob").size(), 1);
}
m_post_mock_net_callbacks.pop_back();
{
@ -2006,7 +2006,7 @@ TEST_P(CachingTest, LoadHetero_TargetFallbackFromCore) {
}
testLoad([&](Core& ie) {
ie.SetConfig({{CONFIG_KEY(CACHE_DIR), m_cacheDir}});
ie.SetConfig({{"TARGET_FALLBACK", "mock"}}, CommonTestUtils::DEVICE_HETERO);
ie.SetConfig({{"TARGET_FALLBACK", "mock"}}, ov::test::utils::DEVICE_HETERO);
m_testFunction(ie);
networks.clear();
});
@ -2045,7 +2045,7 @@ TEST_P(CachingTest, LoadHetero_MultiArchs) {
return "mock_another_architecture";
}
}));
deviceToLoad = CommonTestUtils::DEVICE_HETERO + std::string(":mock.1,mock.51");
deviceToLoad = ov::test::utils::DEVICE_HETERO + std::string(":mock.1,mock.51");
if (m_remoteContext) {
return; // skip the remote Context test for Hetero plugin
}
@ -2062,10 +2062,10 @@ TEST_P(CachingTest, LoadHetero_MultiArchs) {
m_testFunction(ie);
});
// Ensure that only 1 blob (for Hetero) is created
EXPECT_EQ(CommonTestUtils::listFilesWithExt(m_cacheDir, "blob").size(), 1);
EXPECT_EQ(ov::test::utils::listFilesWithExt(m_cacheDir, "blob").size(), 1);
}
deviceToLoad = CommonTestUtils::DEVICE_HETERO + std::string(":mock.2,mock.52");
deviceToLoad = ov::test::utils::DEVICE_HETERO + std::string(":mock.2,mock.52");
{
EXPECT_CALL(*mockPlugin, LoadExeNetworkImpl(_, _, _)).Times(0);
EXPECT_CALL(*mockPlugin, LoadExeNetworkImpl(_, _)).Times(0);
@ -2079,7 +2079,7 @@ TEST_P(CachingTest, LoadHetero_MultiArchs) {
m_testFunction(ie);
});
}
deviceToLoad = CommonTestUtils::DEVICE_HETERO + std::string(":mock.53,mock.3");
deviceToLoad = ov::test::utils::DEVICE_HETERO + std::string(":mock.53,mock.3");
m_post_mock_net_callbacks.pop_back();
{
EXPECT_CALL(*mockPlugin, LoadExeNetworkImpl(_, _, _)).Times(0);
@ -2111,7 +2111,7 @@ TEST_P(CachingTest, LoadHetero_MultiArchs_TargetFallback_FromCore) {
return "mock_another_architecture";
}
}));
deviceToLoad = CommonTestUtils::DEVICE_HETERO;
deviceToLoad = ov::test::utils::DEVICE_HETERO;
if (m_remoteContext) {
return; // skip the remote Context test for Hetero plugin
}
@ -2125,7 +2125,7 @@ TEST_P(CachingTest, LoadHetero_MultiArchs_TargetFallback_FromCore) {
});
testLoad([&](Core& ie) {
ie.SetConfig({{CONFIG_KEY(CACHE_DIR), m_cacheDir}});
ie.SetConfig({{"TARGET_FALLBACK", "mock.1"}}, CommonTestUtils::DEVICE_HETERO);
ie.SetConfig({{"TARGET_FALLBACK", "mock.1"}}, ov::test::utils::DEVICE_HETERO);
m_testFunction(ie);
});
}
@ -2139,7 +2139,7 @@ TEST_P(CachingTest, LoadHetero_MultiArchs_TargetFallback_FromCore) {
EXPECT_CALL(*net, Export(_)).Times(0);
}
testLoad([&](Core& ie) {
ie.SetConfig({{"TARGET_FALLBACK", "mock.1"}}, CommonTestUtils::DEVICE_HETERO);
ie.SetConfig({{"TARGET_FALLBACK", "mock.1"}}, ov::test::utils::DEVICE_HETERO);
ie.SetConfig({{CONFIG_KEY(CACHE_DIR), m_cacheDir}});
m_testFunction(ie);
});
@ -2153,7 +2153,7 @@ TEST_P(CachingTest, LoadHetero_MultiArchs_TargetFallback_FromCore) {
EXPECT_CALL(net, Export(_)).Times(1);
});
testLoad([&](Core& ie) {
ie.SetConfig({{"TARGET_FALLBACK", "mock.51"}}, CommonTestUtils::DEVICE_HETERO);
ie.SetConfig({{"TARGET_FALLBACK", "mock.51"}}, ov::test::utils::DEVICE_HETERO);
ie.SetConfig({{CONFIG_KEY(CACHE_DIR), m_cacheDir}});
m_testFunction(ie);
networks.clear();
@ -2179,7 +2179,7 @@ TEST_P(CachingTest, LoadAUTO_OneDevice) {
std::string cacheDir = m_cacheDir;
MkDirGuard guard(cacheDir);
for (int index = 0; index < TEST_COUNT; index++) {
deviceToLoad = CommonTestUtils::DEVICE_AUTO;
deviceToLoad = ov::test::utils::DEVICE_AUTO;
deviceToLoad += ":mock.0";
EXPECT_CALL(*mockPlugin, LoadExeNetworkImpl(_, _)).Times(TEST_COUNT - index - 1);
EXPECT_CALL(*mockPlugin, ImportNetwork(_, _)).Times(index);
@ -2208,7 +2208,7 @@ TEST_P(CachingTest, LoadAUTOWithConfig) {
std::string cacheDir = m_cacheDir;
MkDirGuard guard(cacheDir);
for (; index < TEST_COUNT; index++) {
deviceToLoad = CommonTestUtils::DEVICE_AUTO;
deviceToLoad = ov::test::utils::DEVICE_AUTO;
deviceToLoad += ":mock.0";
EXPECT_CALL(*mockPlugin, LoadExeNetworkImpl(_, _)).Times(TEST_COUNT - index - 1);
EXPECT_CALL(*mockPlugin, ImportNetwork(_, _)).Times(index);
@ -2242,7 +2242,7 @@ TEST_P(CachingTest, LoadAUTO_OneDeviceNoImportExport) {
m_post_mock_net_callbacks.emplace_back([&](MockExecutableNetwork& net) {
EXPECT_CALL(net, Export(_)).Times(0);
});
deviceToLoad = CommonTestUtils::DEVICE_AUTO;
deviceToLoad = ov::test::utils::DEVICE_AUTO;
deviceToLoad += ":mock.0";
ie.SetConfig({{CONFIG_KEY(CACHE_DIR), m_cacheDir}});
m_testFunction(ie);
@ -2275,7 +2275,7 @@ TEST_P(CachingTest, LoadMulti_race) {
std::string cacheDir = m_cacheDir + std::to_string(index);
MkDirGuard guard(cacheDir);
int devCount = 1 + index % (TEST_DEVICE_MAX_COUNT - 1); // try dynamic number of devices from 1 to max
deviceToLoad = CommonTestUtils::DEVICE_MULTI;
deviceToLoad = ov::test::utils::DEVICE_MULTI;
deviceToLoad += ":mock.0";
for (int i = 1; i < devCount; i++) {
deviceToLoad += ",mock." + std::to_string(i);
@ -2316,7 +2316,7 @@ TEST_P(CachingTest, LoadMultiWithConfig_race) {
std::string cacheDir = m_cacheDir + std::to_string(index);
MkDirGuard guard(cacheDir);
int devCount = 1 + index % (TEST_DEVICE_MAX_COUNT - 1); // try dynamic number of devices from 1 to max
deviceToLoad = CommonTestUtils::DEVICE_MULTI;
deviceToLoad = ov::test::utils::DEVICE_MULTI;
deviceToLoad += ":mock.0";
for (int i = 1; i < devCount; i++) {
deviceToLoad += ",mock." + std::to_string(i);
@ -2353,7 +2353,7 @@ TEST_P(CachingTest, LoadMulti_Archs) {
return; // skip the remote Context test for Multi plugin
}
deviceToLoad = CommonTestUtils::DEVICE_MULTI;
deviceToLoad = ov::test::utils::DEVICE_MULTI;
deviceToLoad += ":mock.0";
for (int i = 1; i < TEST_DEVICE_MAX_COUNT; i++) {
deviceToLoad += ",mock." + std::to_string(i);
@ -2419,7 +2419,7 @@ TEST_P(CachingTest, LoadMulti_NoCachingOnDevice) {
return; // skip the remote Context test for Multi plugin
}
deviceToLoad = CommonTestUtils::DEVICE_MULTI;
deviceToLoad = ov::test::utils::DEVICE_MULTI;
deviceToLoad += ":mock.0";
for (int i = 1; i < TEST_DEVICE_MAX_COUNT; i++) {
deviceToLoad += ",mock." + std::to_string(i);
@ -2468,7 +2468,7 @@ TEST_P(CachingTest, LoadBATCHWithConfig) {
std::string cacheDir = m_cacheDir;
MkDirGuard guard(cacheDir);
for (; index < TEST_COUNT; index++) {
deviceToLoad = CommonTestUtils::DEVICE_BATCH;
deviceToLoad = ov::test::utils::DEVICE_BATCH;
deviceToLoad += ":mock.0";
EXPECT_CALL(*mockPlugin, LoadExeNetworkImpl(_, _)).Times(TEST_COUNT - index - 1);
EXPECT_CALL(*mockPlugin, ImportNetwork(_, _)).Times(index);

View File

@ -30,14 +30,14 @@ protected:
public:
void SetUp() override {
auto prefix = CommonTestUtils::generateTestFilePrefix();
auto prefix = ov::test::utils::generateTestFilePrefix();
modelName = prefix + modelName;
weightsName = prefix + weightsName;
FuncTestUtils::TestModel::generateTestModel(modelName, weightsName);
}
void TearDown() override {
CommonTestUtils::removeIRFiles(modelName, weightsName);
ov::test::utils::removeIRFiles(modelName, weightsName);
}
void runParallel(std::function<void(void)> func,
@ -62,7 +62,7 @@ public:
void safeAddExtension(InferenceEngine::Core& ie) {
try {
auto extension = std::make_shared<InferenceEngine::Extension>(
ov::util::make_plugin_library_name(CommonTestUtils::getExecutableDirectory(),
ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(),
std::string("template_extension") + IE_BUILD_POSTFIX));
ie.AddExtension(extension);
} catch (const InferenceEngine::Exception& ex) {
@ -94,7 +94,7 @@ TEST_F(CoreThreadingTests, RegisterPlugin) {
runParallel(
[&]() {
const std::string deviceName = std::to_string(index++);
ie.RegisterPlugin(ov::util::make_plugin_library_name(CommonTestUtils::getExecutableDirectory(),
ie.RegisterPlugin(ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(),
std::string("mock_engine") + IE_BUILD_POSTFIX),
deviceName);
ie.GetVersions(deviceName);
@ -114,7 +114,7 @@ TEST_F(CoreThreadingTests, RegisterPlugins) {
std::ofstream file(pluginsXML);
file << "<ie><plugins><plugin location=\"";
file << CommonTestUtils::getExecutableDirectory();
file << ov::test::utils::getExecutableDirectory();
file << ov::util::FileTraits<char>::file_separator;
file << ov::util::FileTraits<char>::library_prefix();
file << "mock_engine";

View File

@ -25,14 +25,14 @@ public:
}
void reg_plugin(ov::Core& core, std::shared_ptr<ov::IPlugin>& plugin) {
std::string libraryPath = CommonTestUtils::get_mock_engine_path();
std::string libraryPath = ov::test::utils::get_mock_engine_path();
if (!m_so)
m_so = ov::util::load_shared_object(libraryPath.c_str());
std::function<void(ov::IPlugin*)> injectProxyEngine =
CommonTestUtils::make_std_function<void(ov::IPlugin*)>(m_so, "InjectPlugin");
ov::test::utils::make_std_function<void(ov::IPlugin*)>(m_so, "InjectPlugin");
injectProxyEngine(plugin.get());
core.register_plugin(ov::util::make_plugin_library_name(CommonTestUtils::getExecutableDirectory(),
core.register_plugin(ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(),
std::string("mock_engine") + IE_BUILD_POSTFIX),
m_plugin_name);
m_mock_plugin = plugin;
@ -68,7 +68,7 @@ static std::string getTestCaseName(const testing::TestParamInfo<TestParam>& obj)
}
TEST_P(GetPropertyTest, canGenerateCorrectPropertyList) {
auto plugin = std::make_shared<CommonTestUtils::MockPlugin>();
auto plugin = std::make_shared<ov::test::utils::MockPlugin>();
std::shared_ptr<ov::IPlugin> base_plugin = plugin;
reg_plugin(core, base_plugin);
core.get_property(m_plugin_name, ov::supported_properties);

View File

@ -33,9 +33,8 @@
using namespace testing;
using namespace InferenceEngine;
using namespace CommonTestUtils;
using NGraphReshapeTests = TestsCommon;
using NGraphReshapeTests = ov::test::TestsCommon;
TEST_F(NGraphReshapeTests, getBatchSize) {
std::shared_ptr<ngraph::Function> ngraph;

View File

@ -9,30 +9,30 @@
using namespace testing;
using namespace InferenceEngine;
using namespace CommonTestUtils;
using namespace ov::test::utils;
namespace {
std::string getOVExtensionPath() {
return ov::util::make_plugin_library_name(CommonTestUtils::getExecutableDirectory(),
return ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(),
std::string("openvino_template_extension") + IE_BUILD_POSTFIX);
}
std::string getOldExtensionPath() {
return ov::util::make_plugin_library_name(CommonTestUtils::getExecutableDirectory(),
return ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(),
std::string("template_extension") + IE_BUILD_POSTFIX);
}
std::string getIncorrectExtensionPath() {
return ov::util::make_plugin_library_name(CommonTestUtils::getExecutableDirectory(),
return ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(),
std::string("incorrect") + IE_BUILD_POSTFIX);
}
std::string getRelativeOVExtensionPath() {
std::string absolutePath =
ov::util::make_plugin_library_name(CommonTestUtils::getExecutableDirectory(),
ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(),
std::string("openvino_template_extension") + IE_BUILD_POSTFIX);
return CommonTestUtils::getRelativePath(CommonTestUtils::getCurrentWorkingDir(), absolutePath);
return ov::test::utils::getRelativePath(ov::test::utils::getCurrentWorkingDir(), absolutePath);
}
} // namespace

View File

@ -25,25 +25,25 @@ using namespace std;
#ifndef OPENVINO_STATIC_LIBRARY
inline void mockPlugin(ov::Core& core, std::shared_ptr<ov::IPlugin>& plugin, std::shared_ptr<void>& m_so) {
std::string libraryPath = CommonTestUtils::get_mock_engine_path();
std::string libraryPath = ov::test::utils::get_mock_engine_path();
if (!m_so)
m_so = ov::util::load_shared_object(libraryPath.c_str());
std::function<void(ov::IPlugin*)> injectProxyEngine =
CommonTestUtils::make_std_function<void(ov::IPlugin*)>(m_so, "InjectPlugin");
ov::test::utils::make_std_function<void(ov::IPlugin*)>(m_so, "InjectPlugin");
injectProxyEngine(plugin.get());
}
TEST(RegisterPluginTests, registerNewPluginNoThrows) {
ov::Core core;
auto plugin = std::make_shared<CommonTestUtils::MockPlugin>();
auto plugin = std::make_shared<ov::test::utils::MockPlugin>();
std::shared_ptr<ov::IPlugin> base_plugin = plugin;
std::shared_ptr<void> m_so;
mockPlugin(core, base_plugin, m_so);
std::string mock_plugin_name{"MOCK_HARDWARE"};
ASSERT_NO_THROW(
core.register_plugin(ov::util::make_plugin_library_name(CommonTestUtils::getExecutableDirectory(),
core.register_plugin(ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(),
std::string("mock_engine") + IE_BUILD_POSTFIX),
mock_plugin_name));
ASSERT_NO_THROW(core.get_property(mock_plugin_name, ov::supported_properties));
@ -53,17 +53,17 @@ TEST(RegisterPluginTests, registerNewPluginNoThrows) {
TEST(RegisterPluginTests, registerExistingPluginThrows) {
ov::Core core;
auto plugin = std::make_shared<CommonTestUtils::MockPlugin>();
auto plugin = std::make_shared<ov::test::utils::MockPlugin>();
std::shared_ptr<ov::IPlugin> base_plugin = plugin;
std::shared_ptr<void> m_so;
mockPlugin(core, base_plugin, m_so);
std::string mock_plugin_name{"MOCK_HARDWARE"};
ASSERT_NO_THROW(
core.register_plugin(ov::util::make_plugin_library_name(CommonTestUtils::getExecutableDirectory(),
core.register_plugin(ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(),
std::string("mock_engine") + IE_BUILD_POSTFIX),
mock_plugin_name));
ASSERT_THROW(core.register_plugin(ov::util::make_plugin_library_name(CommonTestUtils::getExecutableDirectory(),
ASSERT_THROW(core.register_plugin(ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(),
std::string("mock_engine") + IE_BUILD_POSTFIX),
mock_plugin_name),
ov::Exception);
@ -71,28 +71,28 @@ TEST(RegisterPluginTests, registerExistingPluginThrows) {
inline std::string getPluginFile() {
std::string filePostfix{"mock_engine_valid.xml"};
std::string filename = CommonTestUtils::generateTestFilePrefix() + "_" + filePostfix;
std::string filename = ov::test::utils::generateTestFilePrefix() + "_" + filePostfix;
std::ostringstream stream;
stream << "<ie><plugins><plugin name=\"mock\" location=\"";
stream << ov::util::make_plugin_library_name(CommonTestUtils::getExecutableDirectory(),
stream << ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(),
std::string("mock_engine") + IE_BUILD_POSTFIX);
stream << "\"></plugin></plugins></ie>";
CommonTestUtils::createFile(filename, stream.str());
ov::test::utils::createFile(filename, stream.str());
return filename;
}
TEST(RegisterPluginTests, smoke_createMockEngineConfigNoThrows) {
const std::string filename = getPluginFile();
ASSERT_NO_THROW(ov::Core core(filename));
CommonTestUtils::removeFile(filename.c_str());
ov::test::utils::removeFile(filename.c_str());
}
TEST(RegisterPluginTests, createMockEngineConfigThrows) {
std::string filename = CommonTestUtils::generateTestFilePrefix() + "_mock_engine.xml";
std::string filename = ov::test::utils::generateTestFilePrefix() + "_mock_engine.xml";
std::string content{"<ie><plugins><plugin location=\"libmock_engine.so\"></plugin></plugins></ie>"};
CommonTestUtils::createFile(filename, content);
ov::test::utils::createFile(filename, content);
ASSERT_THROW(ov::Core core(filename), ov::Exception);
CommonTestUtils::removeFile(filename.c_str());
ov::test::utils::removeFile(filename.c_str());
}
TEST(RegisterPluginTests2, createNonExistingConfigThrows) {
@ -140,14 +140,14 @@ TEST(RegisterPluginTests, accessToUnregisteredPluginThrows) {
TEST(RegisterPluginTests, registerPluginsXMLUnicodePath) {
const std::string pluginXML = getPluginFile();
for (std::size_t testIndex = 0; testIndex < CommonTestUtils::test_unicode_postfix_vector.size(); testIndex++) {
for (std::size_t testIndex = 0; testIndex < ov::test::utils::test_unicode_postfix_vector.size(); testIndex++) {
GTEST_COUT << testIndex;
std::wstring postfix = L"_" + CommonTestUtils::test_unicode_postfix_vector[testIndex];
std::wstring pluginsXmlW = CommonTestUtils::addUnicodePostfixToPath(pluginXML, postfix);
std::wstring postfix = L"_" + ov::test::utils::test_unicode_postfix_vector[testIndex];
std::wstring pluginsXmlW = ov::test::utils::addUnicodePostfixToPath(pluginXML, postfix);
try {
bool is_copy_successfully;
is_copy_successfully = CommonTestUtils::copyFile(pluginXML, pluginsXmlW);
is_copy_successfully = ov::test::utils::copyFile(pluginXML, pluginsXmlW);
if (!is_copy_successfully) {
FAIL() << "Unable to copy from '" << pluginXML << "' to '" << ::ov::util::wstring_to_string(pluginsXmlW)
<< "'";
@ -159,7 +159,7 @@ TEST(RegisterPluginTests, registerPluginsXMLUnicodePath) {
GTEST_COUT << "Core created " << testIndex << std::endl;
ASSERT_NO_THROW(core.register_plugins(::ov::util::wstring_to_string(pluginsXmlW)));
CommonTestUtils::removeFile(pluginsXmlW);
ov::test::utils::removeFile(pluginsXmlW);
ASSERT_NO_THROW(core.get_versions("mock")); // from pluginXML
std::vector<std::string> devices = core.get_available_devices();
@ -168,12 +168,12 @@ TEST(RegisterPluginTests, registerPluginsXMLUnicodePath) {
GTEST_COUT << "OK" << std::endl;
} catch (const ov::Exception& e_next) {
CommonTestUtils::removeFile(pluginsXmlW);
ov::test::utils::removeFile(pluginsXmlW);
std::remove(pluginXML.c_str());
FAIL() << e_next.what();
}
}
CommonTestUtils::removeFile(pluginXML);
ov::test::utils::removeFile(pluginXML);
}
# endif // OPENVINO_ENABLE_UNICODE_PATH_SUPPORT

View File

@ -15,7 +15,7 @@ using namespace std;
class SharedObjectOVTests : public ::testing::Test {
protected:
std::string get_mock_engine_name() {
return FileUtils::makePluginLibraryName<char>(CommonTestUtils::getExecutableDirectory(),
return FileUtils::makePluginLibraryName<char>(ov::test::utils::getExecutableDirectory(),
std::string("mock_engine") + IE_BUILD_POSTFIX);
}

View File

@ -27,7 +27,7 @@ struct LinuxCpuReserveTestCase {
int _cpu_status;
};
class LinuxCpuReserveTests : public CommonTestUtils::TestsCommon,
class LinuxCpuReserveTests : public ov::test::TestsCommon,
public testing::WithParamInterface<std::tuple<LinuxCpuReserveTestCase>> {
public:
void SetUp() override {

View File

@ -32,7 +32,7 @@ struct LinuxCpuStreamTypeCase {
std::vector<int> _numa_node_id;
};
class LinuxCpuStreamTypeTests : public CommonTestUtils::TestsCommon,
class LinuxCpuStreamTypeTests : public ov::test::TestsCommon,
public testing::WithParamInterface<std::tuple<LinuxCpuStreamTypeCase>> {
public:
void SetUp() override {

View File

@ -50,7 +50,7 @@ public:
// Sets up the test fixture.
void SetUp() override {
auto testName = CommonTestUtils::generateTestFilePrefix();
auto testName = ov::test::utils::generateTestFilePrefix();
m_fileName = testName + m_fileName;
createFile(m_fileName);
}
@ -84,7 +84,7 @@ TEST_F(NetworkContext_CalcFileInfoTests, ExistingDiffFiles) {
TEST_F(NetworkContext_CalcFileInfoTests, ExistingFile_sameAbsPath) {
std::string file1 = m_fileName;
std::string file2 = std::string(".") + CommonTestUtils::FileSeparator + m_fileName;
std::string file2 = std::string(".") + ov::test::utils::FileSeparator + m_fileName;
ASSERT_EQ(ModelCache::calculate_file_info(file1), ModelCache::calculate_file_info(file2))
<< "Hash of [" << file1 << "] is not equal to hash of [" << file2 << "]";
}
@ -342,8 +342,8 @@ TEST(NetworkContext_ModelName, HashOfSame) {
}
TEST(NetworkContext_ModelName, HashOfExistingFile) {
auto file1 = CommonTestUtils::generateTestFilePrefix() + ".xml";
auto file2 = std::string(".") + CommonTestUtils::FileSeparator + file1;
auto file1 = ov::test::utils::generateTestFilePrefix() + ".xml";
auto file2 = std::string(".") + ov::test::utils::FileSeparator + file1;
FileGuard guard(file1);
{

View File

@ -22,7 +22,7 @@ using ExtensionTests = ::testing::Test;
OPENVINO_SUPPRESS_DEPRECATED_START
static std::string getExtensionPath() {
return FileUtils::makePluginLibraryName<char>(CommonTestUtils::getExecutableDirectory(),
return FileUtils::makePluginLibraryName<char>(ov::test::utils::getExecutableDirectory(),
std::string("template_extension") + IE_BUILD_POSTFIX);
}

View File

@ -74,7 +74,7 @@ ov::mock_auto_plugin::tests::AutoTest::AutoTest() {
std::string dgpuArchitecture = "GPU: vendor=0x8086 arch=1";
auto iGpuType = ov::device::Type::INTEGRATED;
auto dGpuType = ov::device::Type::DISCRETE;
ON_CALL(*core, get_property(StrEq(CommonTestUtils::DEVICE_CPU),
ON_CALL(*core, get_property(StrEq(ov::test::utils::DEVICE_CPU),
StrEq(ov::device::capabilities.name()), _)).WillByDefault(RETURN_MOCK_VALUE(cpuCability));
ON_CALL(*core, get_property(HasSubstr("GPU"),
StrEq(ov::device::capabilities.name()), _)).WillByDefault(RETURN_MOCK_VALUE(gpuCability));

View File

@ -162,18 +162,18 @@ TEST_P(ExecNetworkget_propertyOptimalNumInferReq, OPTIMAL_NUMBER_OF_INFER_REQUES
gpuPerfHintNum,
isSupportedOptimalNum,
isSupportNumRequests) = this->GetParam();
config.insert(ov::device::priorities(CommonTestUtils::DEVICE_CPU + std::string(",") + actualDeviceName));
config.insert(ov::device::priorities(ov::test::utils::DEVICE_CPU + std::string(",") + actualDeviceName));
std::vector<ov::PropertyName> supported_props = {ov::range_for_streams,
ov::optimal_batch_size,
ov::hint::performance_mode};
if (isSupportedOptimalNum) {
supported_props.push_back(ov::optimal_number_of_infer_requests);
ON_CALL(*core,
get_property(StrEq(CommonTestUtils::DEVICE_GPU), StrEq(ov::optimal_number_of_infer_requests.name()), _))
get_property(StrEq(ov::test::utils::DEVICE_GPU), StrEq(ov::optimal_number_of_infer_requests.name()), _))
.WillByDefault(RETURN_MOCK_VALUE(actualOptimalNum));
ON_CALL(
*core,
get_property(StrEq(CommonTestUtils::DEVICE_KEEMBAY), StrEq(ov::optimal_number_of_infer_requests.name()), _))
get_property(StrEq(ov::test::utils::DEVICE_KEEMBAY), StrEq(ov::optimal_number_of_infer_requests.name()), _))
.WillByDefault(RETURN_MOCK_VALUE(actualOptimalNum));
}
if (isSupportNumRequests)
@ -188,16 +188,16 @@ TEST_P(ExecNetworkget_propertyOptimalNumInferReq, OPTIMAL_NUMBER_OF_INFER_REQUES
}
if (isThroughput) {
metaConfig.insert(ov::hint::performance_mode("THROUGHPUT"));
metaDevices.push_back({CommonTestUtils::DEVICE_CPU, metaConfig, cpuCustomerNum, ""});
metaDevices.push_back({ov::test::utils::DEVICE_CPU, metaConfig, cpuCustomerNum, ""});
metaDevices.push_back({actualDeviceName, metaConfig, actualCustomerNum, ""});
// enable autoBatch
unsigned int gpuOptimalBatchNum = 8;
unsigned int keembayOptimalBatchNum = 1;
ov::hint::PerformanceMode mode = ov::hint::PerformanceMode::THROUGHPUT;
std::tuple<unsigned int, unsigned int> rangeOfStreams = std::make_tuple<unsigned int, unsigned int>(1, 3);
ON_CALL(*core, get_property(StrEq(CommonTestUtils::DEVICE_GPU), StrEq(ov::optimal_batch_size.name()), _))
ON_CALL(*core, get_property(StrEq(ov::test::utils::DEVICE_GPU), StrEq(ov::optimal_batch_size.name()), _))
.WillByDefault(RETURN_MOCK_VALUE(gpuOptimalBatchNum));
ON_CALL(*core, get_property(StrEq(CommonTestUtils::DEVICE_KEEMBAY), StrEq(ov::optimal_batch_size.name()), _))
ON_CALL(*core, get_property(StrEq(ov::test::utils::DEVICE_KEEMBAY), StrEq(ov::optimal_batch_size.name()), _))
.WillByDefault(RETURN_MOCK_VALUE(keembayOptimalBatchNum));
ON_CALL(*core, get_property(_, StrEq(ov::range_for_streams.name()), _))
.WillByDefault(RETURN_MOCK_VALUE(rangeOfStreams));
@ -209,7 +209,7 @@ TEST_P(ExecNetworkget_propertyOptimalNumInferReq, OPTIMAL_NUMBER_OF_INFER_REQUES
}
ON_CALL(*core, get_property(_, StrEq(ov::compilation_num_threads.name()), _)).WillByDefault(Return(8));
} else {
metaDevices.push_back({CommonTestUtils::DEVICE_CPU, metaConfig, cpuCustomerNum, ""});
metaDevices.push_back({ov::test::utils::DEVICE_CPU, metaConfig, cpuCustomerNum, ""});
metaDevices.push_back({actualDeviceName, metaConfig, actualCustomerNum, ""});
ON_CALL(*core, get_property(_, StrEq(ov::compilation_num_threads.name()), _)).WillByDefault(Return(8));
}
@ -225,14 +225,14 @@ TEST_P(ExecNetworkget_propertyOptimalNumInferReq, OPTIMAL_NUMBER_OF_INFER_REQUES
if (cpuSleep) {
ON_CALL(*core, compile_model(::testing::Matcher<const std::shared_ptr<const ov::Model>&>(_),
::testing::Matcher<const std::string&>(StrEq(CommonTestUtils::DEVICE_CPU)), _))
::testing::Matcher<const std::string&>(StrEq(ov::test::utils::DEVICE_CPU)), _))
.WillByDefault(InvokeWithoutArgs([this]() {
std::this_thread::sleep_for(std::chrono::milliseconds(100));
return mockExeNetwork;
}));
} else {
ON_CALL(*core, compile_model(::testing::Matcher<const std::shared_ptr<const ov::Model>&>(_),
::testing::Matcher<const std::string&>(StrEq(CommonTestUtils::DEVICE_CPU)), _))
::testing::Matcher<const std::string&>(StrEq(ov::test::utils::DEVICE_CPU)), _))
.WillByDefault(Return(mockExeNetwork));
}
@ -261,7 +261,7 @@ TEST_P(ExecNetworkget_propertyOptimalNumInferReq, OPTIMAL_NUMBER_OF_INFER_REQUES
.Times(AtLeast(1));
EXPECT_CALL(*core, compile_model(::testing::Matcher<const std::shared_ptr<const ov::Model>&>(_),
::testing::Matcher<const std::string&>(StrEq(CommonTestUtils::DEVICE_CPU)), _)).Times(1);
::testing::Matcher<const std::string&>(StrEq(ov::test::utils::DEVICE_CPU)), _)).Times(1);
EXPECT_CALL(*core, compile_model(::testing::Matcher<const std::shared_ptr<const ov::Model>&>(_),
::testing::Matcher<const std::string&>(StrEq(actualDeviceName)), _)).Times(1);
@ -292,53 +292,53 @@ TEST_P(ExecNetworkget_propertyOptimalNumInferReq, OPTIMAL_NUMBER_OF_INFER_REQUES
// expectOptimalNum of Auto ExecNetwork, gpu Number of requests, if actual supported OptimalNum, default Value of OptimalNum}
//
const std::vector<ConfigParams> testConfigs = {
ConfigParams {false, 3, -1, false, 2, -1, true, CommonTestUtils::DEVICE_GPU, 1, 0, false, true},
ConfigParams {true, 3, -1, false, 2, -1, true, CommonTestUtils::DEVICE_GPU, 48, 0, false, true},
ConfigParams {false, 3, -1, true, 2, -1, false, CommonTestUtils::DEVICE_GPU, 2, 0, false, true},
ConfigParams {true, 3, -1, true, 2, -1, false, CommonTestUtils::DEVICE_GPU, 2, 0, false, true},
ConfigParams {false, 3, 5, false, 2, 5, true, CommonTestUtils::DEVICE_GPU, 1, 0, false, true},
ConfigParams {true, 3, 5, false, 2, 5, true, CommonTestUtils::DEVICE_GPU, 48, 0, false, true},
ConfigParams {false, 3, 5, true, 2, 5, false, CommonTestUtils::DEVICE_GPU, 2, 0, false, true},
ConfigParams {true, 3, 5, true, 2, 5, false, CommonTestUtils::DEVICE_GPU, 2, 0, false, true},
ConfigParams {true, 3, 5, false, 2, 5, true, CommonTestUtils::DEVICE_GPU, 48, 48, false, true},
ConfigParams {true, 3, 5, false, 2, 5, true, CommonTestUtils::DEVICE_GPU, 6, 6, false, true},
ConfigParams {true, 3, 5, false, 0, 5, true, CommonTestUtils::DEVICE_GPU, 6, 6, false, true},
ConfigParams {true, 3, 5, false, 2, 5, true, CommonTestUtils::DEVICE_GPU, 2, 0, true, true},
ConfigParams {true, 3, 5, false, 0, 5, true, CommonTestUtils::DEVICE_GPU, 48, 0, false, true},
ConfigParams {true, 3, 5, false, 0, 5, true, CommonTestUtils::DEVICE_GPU, 48, 0, true, true},
ConfigParams {true, 3, 5, false, 2, 5, true, CommonTestUtils::DEVICE_GPU, 6, 6, false, false},
ConfigParams {true, 3, 5, false, 2, 5, true, CommonTestUtils::DEVICE_GPU, 8, 10, false, false},
ConfigParams {true, 3, 5, false, 0, 5, true, CommonTestUtils::DEVICE_GPU, 6, 6, true, false},
ConfigParams {true, 3, 5, false, 2, 5, true, CommonTestUtils::DEVICE_GPU, 2, 6, true, false},
ConfigParams {true, 3, 5, false, 2, 5, true, CommonTestUtils::DEVICE_GPU, 8, 0, false, false},
ConfigParams {true, 3, 5, false, 0, 5, true, CommonTestUtils::DEVICE_GPU, 8, 0, true, false},
ConfigParams {true, 3, 5, false, 2, 5, true, CommonTestUtils::DEVICE_GPU, 2, 0, true, false},
ConfigParams {true, 3, 5, false, 0, 5, true, CommonTestUtils::DEVICE_GPU, 6, 6, true, true},
ConfigParams {false, 3, 5, false, 0, 5, true, CommonTestUtils::DEVICE_GPU, 1, 6, true, true},
ConfigParams {true, 3, 5, false, 6, 5, true, CommonTestUtils::DEVICE_GPU, 6, 6, true, true},
ConfigParams {false, 3, 5, false, 6, 5, true, CommonTestUtils::DEVICE_GPU, 6, 6, true, true},
ConfigParams {false, 3, -1, false, 2, -1, true, CommonTestUtils::DEVICE_KEEMBAY, 1, 0, false, true},
ConfigParams {true, 3, -1, false, 2, -1, true, CommonTestUtils::DEVICE_KEEMBAY, 8, 0, false, true},
ConfigParams {true, 3, -1, false, 2, -1, true, CommonTestUtils::DEVICE_KEEMBAY, 8, 0, false, false},
ConfigParams {true, 3, -1, false, 0, -1, true, CommonTestUtils::DEVICE_KEEMBAY, 8, 0, true, false},
ConfigParams {true, 3, -1, false, 2, -1, true, CommonTestUtils::DEVICE_KEEMBAY, 2, 0, true, false},
ConfigParams {true, 3, -1, false, 2, -1, true, CommonTestUtils::DEVICE_KEEMBAY, 2, 1, true, false},
ConfigParams {true, 3, -1, false, 2, -1, true, CommonTestUtils::DEVICE_KEEMBAY, 6, 6, false, false},
ConfigParams {true, 3, -1, false, 2, -1, true, CommonTestUtils::DEVICE_KEEMBAY, 8, 10, false, false},
ConfigParams {true, 3, -1, false, 4, -1, true, CommonTestUtils::DEVICE_KEEMBAY, 4, 6, true, true},
ConfigParams {true, 3, -1, false, 4, -1, true, CommonTestUtils::DEVICE_KEEMBAY, 2, 2, true, true},
ConfigParams {true, 3, -1, false, 0, -1, true, CommonTestUtils::DEVICE_KEEMBAY, 8, 10, true, true},
ConfigParams {true, 3, -1, false, 0, -1, true, CommonTestUtils::DEVICE_KEEMBAY, 6, 6, true, true},
ConfigParams {false, 3, -1, false, 0, -1, true, CommonTestUtils::DEVICE_KEEMBAY, 1, 0, true, true},
ConfigParams {true, 3, -1, false, 0, -1, true, CommonTestUtils::DEVICE_KEEMBAY, 8, 0, true, true},
ConfigParams {false, 3, -1, false, 2, -1, true, CommonTestUtils::DEVICE_KEEMBAY, 2, 0, true, true},
ConfigParams {true, 3, -1, false, 2, -1, true, CommonTestUtils::DEVICE_KEEMBAY, 2, 0, true, true},
ConfigParams {false, 3, -1, true, 2, -1, false, CommonTestUtils::DEVICE_KEEMBAY, 2, 0, false, true},
ConfigParams {true, 3, -1, true, 2, -1, false, CommonTestUtils::DEVICE_KEEMBAY, 2, 0, false, true},
ConfigParams {false, 3, 5, false, 2, 5, true, CommonTestUtils::DEVICE_KEEMBAY, 1, 0, false, true},
ConfigParams {true, 3, 5, false, 2, 5, true, CommonTestUtils::DEVICE_KEEMBAY, 8, 0, false, true},
ConfigParams {false, 3, 5, true, 2, 5, false, CommonTestUtils::DEVICE_KEEMBAY, 2, 0, false, true},
ConfigParams {true, 3, 5, true, 2, 5, false, CommonTestUtils::DEVICE_KEEMBAY, 2, 0, false, true},
ConfigParams {false, 3, -1, false, 2, -1, true, ov::test::utils::DEVICE_GPU, 1, 0, false, true},
ConfigParams {true, 3, -1, false, 2, -1, true, ov::test::utils::DEVICE_GPU, 48, 0, false, true},
ConfigParams {false, 3, -1, true, 2, -1, false, ov::test::utils::DEVICE_GPU, 2, 0, false, true},
ConfigParams {true, 3, -1, true, 2, -1, false, ov::test::utils::DEVICE_GPU, 2, 0, false, true},
ConfigParams {false, 3, 5, false, 2, 5, true, ov::test::utils::DEVICE_GPU, 1, 0, false, true},
ConfigParams {true, 3, 5, false, 2, 5, true, ov::test::utils::DEVICE_GPU, 48, 0, false, true},
ConfigParams {false, 3, 5, true, 2, 5, false, ov::test::utils::DEVICE_GPU, 2, 0, false, true},
ConfigParams {true, 3, 5, true, 2, 5, false, ov::test::utils::DEVICE_GPU, 2, 0, false, true},
ConfigParams {true, 3, 5, false, 2, 5, true, ov::test::utils::DEVICE_GPU, 48, 48, false, true},
ConfigParams {true, 3, 5, false, 2, 5, true, ov::test::utils::DEVICE_GPU, 6, 6, false, true},
ConfigParams {true, 3, 5, false, 0, 5, true, ov::test::utils::DEVICE_GPU, 6, 6, false, true},
ConfigParams {true, 3, 5, false, 2, 5, true, ov::test::utils::DEVICE_GPU, 2, 0, true, true},
ConfigParams {true, 3, 5, false, 0, 5, true, ov::test::utils::DEVICE_GPU, 48, 0, false, true},
ConfigParams {true, 3, 5, false, 0, 5, true, ov::test::utils::DEVICE_GPU, 48, 0, true, true},
ConfigParams {true, 3, 5, false, 2, 5, true, ov::test::utils::DEVICE_GPU, 6, 6, false, false},
ConfigParams {true, 3, 5, false, 2, 5, true, ov::test::utils::DEVICE_GPU, 8, 10, false, false},
ConfigParams {true, 3, 5, false, 0, 5, true, ov::test::utils::DEVICE_GPU, 6, 6, true, false},
ConfigParams {true, 3, 5, false, 2, 5, true, ov::test::utils::DEVICE_GPU, 2, 6, true, false},
ConfigParams {true, 3, 5, false, 2, 5, true, ov::test::utils::DEVICE_GPU, 8, 0, false, false},
ConfigParams {true, 3, 5, false, 0, 5, true, ov::test::utils::DEVICE_GPU, 8, 0, true, false},
ConfigParams {true, 3, 5, false, 2, 5, true, ov::test::utils::DEVICE_GPU, 2, 0, true, false},
ConfigParams {true, 3, 5, false, 0, 5, true, ov::test::utils::DEVICE_GPU, 6, 6, true, true},
ConfigParams {false, 3, 5, false, 0, 5, true, ov::test::utils::DEVICE_GPU, 1, 6, true, true},
ConfigParams {true, 3, 5, false, 6, 5, true, ov::test::utils::DEVICE_GPU, 6, 6, true, true},
ConfigParams {false, 3, 5, false, 6, 5, true, ov::test::utils::DEVICE_GPU, 6, 6, true, true},
ConfigParams {false, 3, -1, false, 2, -1, true, ov::test::utils::DEVICE_KEEMBAY, 1, 0, false, true},
ConfigParams {true, 3, -1, false, 2, -1, true, ov::test::utils::DEVICE_KEEMBAY, 8, 0, false, true},
ConfigParams {true, 3, -1, false, 2, -1, true, ov::test::utils::DEVICE_KEEMBAY, 8, 0, false, false},
ConfigParams {true, 3, -1, false, 0, -1, true, ov::test::utils::DEVICE_KEEMBAY, 8, 0, true, false},
ConfigParams {true, 3, -1, false, 2, -1, true, ov::test::utils::DEVICE_KEEMBAY, 2, 0, true, false},
ConfigParams {true, 3, -1, false, 2, -1, true, ov::test::utils::DEVICE_KEEMBAY, 2, 1, true, false},
ConfigParams {true, 3, -1, false, 2, -1, true, ov::test::utils::DEVICE_KEEMBAY, 6, 6, false, false},
ConfigParams {true, 3, -1, false, 2, -1, true, ov::test::utils::DEVICE_KEEMBAY, 8, 10, false, false},
ConfigParams {true, 3, -1, false, 4, -1, true, ov::test::utils::DEVICE_KEEMBAY, 4, 6, true, true},
ConfigParams {true, 3, -1, false, 4, -1, true, ov::test::utils::DEVICE_KEEMBAY, 2, 2, true, true},
ConfigParams {true, 3, -1, false, 0, -1, true, ov::test::utils::DEVICE_KEEMBAY, 8, 10, true, true},
ConfigParams {true, 3, -1, false, 0, -1, true, ov::test::utils::DEVICE_KEEMBAY, 6, 6, true, true},
ConfigParams {false, 3, -1, false, 0, -1, true, ov::test::utils::DEVICE_KEEMBAY, 1, 0, true, true},
ConfigParams {true, 3, -1, false, 0, -1, true, ov::test::utils::DEVICE_KEEMBAY, 8, 0, true, true},
ConfigParams {false, 3, -1, false, 2, -1, true, ov::test::utils::DEVICE_KEEMBAY, 2, 0, true, true},
ConfigParams {true, 3, -1, false, 2, -1, true, ov::test::utils::DEVICE_KEEMBAY, 2, 0, true, true},
ConfigParams {false, 3, -1, true, 2, -1, false, ov::test::utils::DEVICE_KEEMBAY, 2, 0, false, true},
ConfigParams {true, 3, -1, true, 2, -1, false, ov::test::utils::DEVICE_KEEMBAY, 2, 0, false, true},
ConfigParams {false, 3, 5, false, 2, 5, true, ov::test::utils::DEVICE_KEEMBAY, 1, 0, false, true},
ConfigParams {true, 3, 5, false, 2, 5, true, ov::test::utils::DEVICE_KEEMBAY, 8, 0, false, true},
ConfigParams {false, 3, 5, true, 2, 5, false, ov::test::utils::DEVICE_KEEMBAY, 2, 0, false, true},
ConfigParams {true, 3, 5, true, 2, 5, false, ov::test::utils::DEVICE_KEEMBAY, 2, 0, false, true},
};
INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests,
@ -394,14 +394,14 @@ TEST_P(ExecNetworkGetMetricOtherTest, modelPriority_perfHint_exclusiveAsyncReq_t
actualDeviceName,
performanceHint,
modelPriority) = this->GetParam();
config.insert(ov::device::priorities(CommonTestUtils::DEVICE_CPU + std::string(",") + actualDeviceName));
config.insert(ov::device::priorities(ov::test::utils::DEVICE_CPU + std::string(",") + actualDeviceName));
config.insert(ov::hint::performance_mode(performanceHint));
config.insert({ov::hint::model_priority.name(), modelPriority.as<std::string>()});
if (isNewAPI) {
ON_CALL(*core.get(), is_new_api()).WillByDefault(Return(true));
}
metaDevices.push_back({CommonTestUtils::DEVICE_CPU, {ov::hint::performance_mode(performanceHint)}, 3, ""});
metaDevices.push_back({ov::test::utils::DEVICE_CPU, {ov::hint::performance_mode(performanceHint)}, 3, ""});
metaDevices.push_back({actualDeviceName, {ov::hint::performance_mode(performanceHint)}, 2, ""});
ON_CALL(*plugin, select_device(_, _, _)).WillByDefault(Return(metaDevices[1]));
@ -416,7 +416,7 @@ TEST_P(ExecNetworkGetMetricOtherTest, modelPriority_perfHint_exclusiveAsyncReq_t
ON_CALL(*core, get_property(_, StrEq(ov::compilation_num_threads.name()), _)).WillByDefault(Return(8));
ON_CALL(*core, compile_model(::testing::Matcher<const std::shared_ptr<const ov::Model>&>(_),
::testing::Matcher<const std::string&>(StrEq(CommonTestUtils::DEVICE_CPU)), _))
::testing::Matcher<const std::string&>(StrEq(ov::test::utils::DEVICE_CPU)), _))
.WillByDefault(Return(mockExeNetwork));
if (actualSleep) {
@ -449,62 +449,62 @@ TEST_P(ExecNetworkGetMetricOtherTest, modelPriority_perfHint_exclusiveAsyncReq_t
const std::vector<modelPrioPerfHintTestParams> modelPrioPerfHintConfig = {
modelPrioPerfHintTestParams{false,
true,
CommonTestUtils::DEVICE_GPU,
ov::test::utils::DEVICE_GPU,
"THROUGHPUT",
CONFIG_VALUE(MODEL_PRIORITY_LOW)},
modelPrioPerfHintTestParams{false,
true,
CommonTestUtils::DEVICE_GPU,
ov::test::utils::DEVICE_GPU,
"LATENCY",
CONFIG_VALUE(MODEL_PRIORITY_LOW)},
modelPrioPerfHintTestParams{false,
true,
CommonTestUtils::DEVICE_GPU,
ov::test::utils::DEVICE_GPU,
"THROUGHPUT",
CONFIG_VALUE(MODEL_PRIORITY_MED)},
modelPrioPerfHintTestParams{false,
true,
CommonTestUtils::DEVICE_GPU,
ov::test::utils::DEVICE_GPU,
"LATENCY",
CONFIG_VALUE(MODEL_PRIORITY_MED)},
modelPrioPerfHintTestParams{false,
true,
CommonTestUtils::DEVICE_GPU,
ov::test::utils::DEVICE_GPU,
CONFIG_VALUE(THROUGHPUT),
CONFIG_VALUE(MODEL_PRIORITY_HIGH)},
modelPrioPerfHintTestParams{false,
true,
CommonTestUtils::DEVICE_GPU,
ov::test::utils::DEVICE_GPU,
"LATENCY",
CONFIG_VALUE(MODEL_PRIORITY_HIGH)},
modelPrioPerfHintTestParams{true,
true,
CommonTestUtils::DEVICE_GPU,
ov::test::utils::DEVICE_GPU,
"THROUGHPUT",
"LOW"},
modelPrioPerfHintTestParams{true,
true,
CommonTestUtils::DEVICE_GPU,
ov::test::utils::DEVICE_GPU,
"LATENCY",
"LOW"},
modelPrioPerfHintTestParams{true,
true,
CommonTestUtils::DEVICE_GPU,
ov::test::utils::DEVICE_GPU,
"THROUGHPUT",
"MEDIUM"},
modelPrioPerfHintTestParams{true,
true,
CommonTestUtils::DEVICE_GPU,
ov::test::utils::DEVICE_GPU,
"LATENCY",
"MEDIUM"},
modelPrioPerfHintTestParams{true,
true,
CommonTestUtils::DEVICE_GPU,
ov::test::utils::DEVICE_GPU,
"THROUGHPUT",
"HIGH"},
modelPrioPerfHintTestParams{true,
true,
CommonTestUtils::DEVICE_GPU,
ov::test::utils::DEVICE_GPU,
"LATENCY",
"HIGH"}};

View File

@ -100,10 +100,10 @@ public:
std::vector<std::string> availableDevs = {"CPU", "GPU"};
ON_CALL(*core, get_available_devices()).WillByDefault(Return(availableDevs));
ON_CALL(*core, compile_model(::testing::Matcher<const std::shared_ptr<const ov::Model>&>(_),
::testing::Matcher<const std::string&>(StrEq(CommonTestUtils::DEVICE_CPU)), _))
::testing::Matcher<const std::string&>(StrEq(ov::test::utils::DEVICE_CPU)), _))
.WillByDefault(Return(mockExeNetwork));
ON_CALL(*core, compile_model(::testing::Matcher<const std::shared_ptr<const ov::Model>&>(_),
::testing::Matcher<const std::string&>(StrNe(CommonTestUtils::DEVICE_CPU)), _))
::testing::Matcher<const std::string&>(StrNe(ov::test::utils::DEVICE_CPU)), _))
.WillByDefault(Return(mockExeNetworkActual));
}
};
@ -153,11 +153,11 @@ TEST_P(AutoLoadExeNetworkFailedTest, checkLoadFailMassage) {
plugin->set_device_name("MULTI");
ON_CALL(*core, compile_model(::testing::Matcher<const std::shared_ptr<const ov::Model>&>(_),
::testing::Matcher<const std::string&>(StrEq(CommonTestUtils::DEVICE_GPU)),
::testing::Matcher<const std::string&>(StrEq(ov::test::utils::DEVICE_GPU)),
::testing::Matcher<const ov::AnyMap&>(_)))
.WillByDefault(Throw(ov::Exception{"Mock GPU Load Failed"}));
ON_CALL(*core, compile_model(::testing::Matcher<const std::shared_ptr<const ov::Model>&>(_),
::testing::Matcher<const std::string&>(StrEq(CommonTestUtils::DEVICE_CPU)),
::testing::Matcher<const std::string&>(StrEq(ov::test::utils::DEVICE_CPU)),
::testing::Matcher<const ov::AnyMap&>(_)))
.WillByDefault(Throw(ov::Exception{"Mock CPU Load Failed"}));
if (device == "AUTO") {

View File

@ -41,10 +41,10 @@ public:
std::vector<std::string> availableDevs = {"CPU", "GPU"};
ON_CALL(*core, get_available_devices()).WillByDefault(Return(availableDevs));
ON_CALL(*core, compile_model(::testing::Matcher<const std::shared_ptr<const ov::Model>&>(_),
::testing::Matcher<const std::string&>(StrEq(CommonTestUtils::DEVICE_CPU)), _))
::testing::Matcher<const std::string&>(StrEq(ov::test::utils::DEVICE_CPU)), _))
.WillByDefault(Return(mockExeNetwork));
ON_CALL(*core, compile_model(::testing::Matcher<const std::shared_ptr<const ov::Model>&>(_),
::testing::Matcher<const std::string&>(StrEq(CommonTestUtils::DEVICE_GPU)), _))
::testing::Matcher<const std::string&>(StrEq(ov::test::utils::DEVICE_GPU)), _))
.WillByDefault(Return(mockExeNetworkActual));
}
};
@ -70,7 +70,7 @@ TEST_P(LoadNetworkWithCTPUTMockTest, CTPUTSingleDevLogicTest) {
if (targetDevice.find("GPU") != std::string::npos) {
EXPECT_CALL(*core,
compile_model(::testing::Matcher<const std::shared_ptr<const ov::Model>&>(_),
::testing::Matcher<const std::string&>(CommonTestUtils::DEVICE_CPU),
::testing::Matcher<const std::string&>(ov::test::utils::DEVICE_CPU),
::testing::Matcher<const ov::AnyMap&>(
ComparePerfHint(ov::hint::PerformanceMode::LATENCY))))
.Times(0);
@ -91,7 +91,7 @@ TEST_P(LoadNetworkWithCTPUTMockTest, CTPUTSingleDevLogicTest) {
// no CPU helper to be called
EXPECT_CALL(*core,
compile_model(::testing::Matcher<const std::shared_ptr<const ov::Model>&>(_),
::testing::Matcher<const std::string&>(CommonTestUtils::DEVICE_CPU),
::testing::Matcher<const std::string&>(ov::test::utils::DEVICE_CPU),
::testing::Matcher<const ov::AnyMap&>(
ComparePerfHint(ov::hint::PerformanceMode::LATENCY))))
.Times(0);
@ -111,7 +111,7 @@ TEST_P(LoadNetworkWithCTPUTMockTestExeDevice, CTPUTSingleDevExecutionDevie) {
config.insert(ov::device::priorities(targetDevices[0]));
// Call single device logic and performance hint is THROUGHPUT
ASSERT_NO_THROW(exeNetwork = plugin->compile_model(model, config));
EXPECT_EQ(exeNetwork->get_property(ov::execution_devices.name()).as<std::string>(), CommonTestUtils::DEVICE_CPU);
EXPECT_EQ(exeNetwork->get_property(ov::execution_devices.name()).as<std::string>(), ov::test::utils::DEVICE_CPU);
}
const std::vector<ConfigParams> testConfigs = {
@ -162,10 +162,10 @@ public:
std::vector<std::string> availableDevs = {"CPU", "GPU"};
ON_CALL(*core, get_available_devices()).WillByDefault(Return(availableDevs));
ON_CALL(*core, compile_model(::testing::Matcher<const std::shared_ptr<const ov::Model>&>(_),
::testing::Matcher<const std::string&>(StrEq(CommonTestUtils::DEVICE_CPU)), _))
::testing::Matcher<const std::string&>(StrEq(ov::test::utils::DEVICE_CPU)), _))
.WillByDefault(Return(mockExeNetwork));
ON_CALL(*core, compile_model(::testing::Matcher<const std::shared_ptr<const ov::Model>&>(_),
::testing::Matcher<const std::string&>(StrEq(CommonTestUtils::DEVICE_GPU)), _))
::testing::Matcher<const std::string&>(StrEq(ov::test::utils::DEVICE_GPU)), _))
.WillByDefault(Return(mockExeNetworkActual));
}
};
@ -190,17 +190,17 @@ TEST_P(AutoCTPUTCallMulti, CTPUTDeviceLoadFailedNoExceptionThrowTest) {
::testing::Matcher<const std::string&>(StrEq(loadFailedDevice)),
::testing::Matcher<const ov::AnyMap&>(_)))
.WillByDefault(Throw(InferenceEngine::GeneralError{""}));
if (loadFailedDevice != CommonTestUtils::DEVICE_CPU) {
if (loadFailedDevice != ov::test::utils::DEVICE_CPU) {
EXPECT_CALL(*core,
compile_model(::testing::Matcher<const std::shared_ptr<const ov::Model>&>(_),
::testing::Matcher<const std::string&>(CommonTestUtils::DEVICE_CPU),
::testing::Matcher<const std::string&>(ov::test::utils::DEVICE_CPU),
::testing::Matcher<const ov::AnyMap&>(_)))
.Times(1);
}
if (loadFailedDevice != CommonTestUtils::DEVICE_GPU) {
if (loadFailedDevice != ov::test::utils::DEVICE_GPU) {
EXPECT_CALL(*core,
compile_model(::testing::Matcher<const std::shared_ptr<const ov::Model>&>(_),
::testing::Matcher<const std::string&>(CommonTestUtils::DEVICE_GPU),
::testing::Matcher<const std::string&>(ov::test::utils::DEVICE_GPU),
::testing::Matcher<const ov::AnyMap&>(_)))
.Times(1);
}

View File

@ -33,7 +33,7 @@ std::string DynamicOutputInferenceTest::getTestCaseName(testing::TestParamInfo<D
for (auto& iter : targets)
result << "_" << iter;
auto string = result.str();
CommonTestUtils::replaceSubstringInString(string, ",", "_");
ov::test::utils::replaceSubstringInString(string, ",", "_");
return string;
}
@ -58,12 +58,12 @@ void DynamicOutputInferenceTest::SetUp() {
model = create_dynamic_output_model();
std::tie(priorityList, targetList) = GetParam();
ON_CALL(*core, compile_model(::testing::Matcher<const std::shared_ptr<const ov::Model>&>(_),
::testing::Matcher<const std::string&>(StrEq(CommonTestUtils::DEVICE_GPU)), _))
::testing::Matcher<const std::string&>(StrEq(ov::test::utils::DEVICE_GPU)), _))
.WillByDefault(InvokeWithoutArgs([this]() {
std::this_thread::sleep_for(std::chrono::milliseconds(200));
return mockExeNetworkActual; }));
ON_CALL(*core, compile_model(::testing::Matcher<const std::shared_ptr<const ov::Model>&>(_),
::testing::Matcher<const std::string&>(StrEq(CommonTestUtils::DEVICE_CPU)),
::testing::Matcher<const std::string&>(StrEq(ov::test::utils::DEVICE_CPU)),
(_))).WillByDefault(Return(mockExeNetwork));
}

View File

@ -68,12 +68,12 @@ protected:
TEST_P(KeyNetworkPriorityTest, SelectDevice) {
std::vector<DeviceInformation> resDevInfo;
if (enableDevicePriority) {
metaDevices = {{CommonTestUtils::DEVICE_CPU, {}, 2, "", "CPU_01", 0},
metaDevices = {{ov::test::utils::DEVICE_CPU, {}, 2, "", "CPU_01", 0},
{"GPU.0", {}, 2, "01", "iGPU_01", 1},
{"GPU.1", {}, 2, "01", "dGPU_01", 2},
{"OTHER", {}, 2, "01", "OTHER_01", 3}};
} else {
metaDevices = {{CommonTestUtils::DEVICE_CPU, {}, 2, "", "CPU_01", 0},
metaDevices = {{ov::test::utils::DEVICE_CPU, {}, 2, "", "CPU_01", 0},
{"GPU.0", {}, 2, "01", "iGPU_01", 0},
{"GPU.1", {}, 2, "01", "dGPU_01", 0},
{"OTHER", {}, 2, "01", "OTHER_01", 0}};
@ -95,17 +95,16 @@ TEST_P(KeyNetworkPriorityTest, MultiThreadsSelectDevice) {
std::vector<DeviceInformation> resDevInfo;
std::vector<std::future<void>> futureVect;
if (enableDevicePriority) {
metaDevices = {{CommonTestUtils::DEVICE_CPU, {}, 2, "", "CPU_01", 0},
metaDevices = {{ov::test::utils::DEVICE_CPU, {}, 2, "", "CPU_01", 0},
{"GPU.0", {}, 2, "01", "iGPU_01", 1},
{"GPU.1", {}, 2, "01", "dGPU_01", 2},
{"OTHER", {}, 2, "01", "OTHER_01", 3}};
} else {
metaDevices = {{CommonTestUtils::DEVICE_CPU, {}, 2, "", "CPU_01", 0},
metaDevices = {{ov::test::utils::DEVICE_CPU, {}, 2, "", "CPU_01", 0},
{"GPU.0", {}, 2, "01", "iGPU_01", 0},
{"GPU.1", {}, 2, "01", "dGPU_01", 0},
{"OTHER", {}, 2, "01", "OTHER_01", 0}};
}
EXPECT_CALL(*plugin, select_device(_, _, _)).Times(sizeOfConfigs * 2);
EXPECT_CALL(*core, get_property(_, _, _)).Times(AtLeast(sizeOfConfigs * 4 * 2));
// selectdevice in multi threads, and UnregisterPriority them all, should not affect the
@ -208,9 +207,9 @@ const std::vector<ConfigParams> testConfigs = {
PriorityParams {1, "iGPU_01"},
PriorityParams {2, "CPU_01"},
PriorityParams {3, "CPU_01"}}},
// metaDevices = {{CommonTestUtils::DEVICE_CPU, {}, 2, "", "CPU_01", 0},
// {CommonTestUtils::DEVICE_GPU, {}, 2, "01", "iGPU_01", 1},
// {CommonTestUtils::DEVICE_GPU, {}, 2, "01", "dGPU_01", 2},
// metaDevices = {{ov::test::utils::DEVICE_CPU, {}, 2, "", "CPU_01", 0},
// {ov::test::utils::DEVICE_GPU, {}, 2, "01", "iGPU_01", 1},
// {ov::test::utils::DEVICE_GPU, {}, 2, "01", "dGPU_01", 2},
// cpu > igpu > dgpu > OTHER
ConfigParams {"FP32", true, {PriorityParams {0, "CPU_01"},
PriorityParams {1, "iGPU_01"},

View File

@ -42,18 +42,18 @@ TEST_P(AutoReleaseHelperTest, releaseResource) {
size_t decreaseCount = 0;
// test auto plugin
plugin->set_device_name("AUTO");
const std::string strDevices = CommonTestUtils::DEVICE_GPU + std::string(",") +
CommonTestUtils::DEVICE_CPU;
const std::string strDevices = ov::test::utils::DEVICE_GPU + std::string(",") +
ov::test::utils::DEVICE_CPU;
if (accSuccess) {
ON_CALL(*core, compile_model(::testing::Matcher<const std::shared_ptr<const ov::Model>&>(_),
::testing::Matcher<const std::string&>(StrEq(CommonTestUtils::DEVICE_GPU)), _))
::testing::Matcher<const std::string&>(StrEq(ov::test::utils::DEVICE_GPU)), _))
.WillByDefault(InvokeWithoutArgs([this]() {
std::this_thread::sleep_for(std::chrono::milliseconds(200));
return mockExeNetworkActual; }));
} else {
ON_CALL(*core, compile_model(::testing::Matcher<const std::shared_ptr<const ov::Model>&>(_),
::testing::Matcher<const std::string&>(StrEq(CommonTestUtils::DEVICE_GPU)), _))
::testing::Matcher<const std::string&>(StrEq(ov::test::utils::DEVICE_GPU)), _))
.WillByDefault(InvokeWithoutArgs([this]() {
std::this_thread::sleep_for(std::chrono::milliseconds(200));
OPENVINO_THROW("");
@ -61,16 +61,16 @@ TEST_P(AutoReleaseHelperTest, releaseResource) {
}
if (cpuSuccess) {
ON_CALL(*core, compile_model(::testing::Matcher<const std::shared_ptr<const ov::Model>&>(_),
::testing::Matcher<const std::string&>(StrEq(CommonTestUtils::DEVICE_CPU)), _))
::testing::Matcher<const std::string&>(StrEq(ov::test::utils::DEVICE_CPU)), _))
.WillByDefault(Return(mockExeNetwork));
if (accSuccess)
decreaseCount++;
} else {
ON_CALL(*core, compile_model(::testing::Matcher<const std::shared_ptr<const ov::Model>&>(_),
::testing::Matcher<const std::string&>(StrEq(CommonTestUtils::DEVICE_CPU)), _))
::testing::Matcher<const std::string&>(StrEq(ov::test::utils::DEVICE_CPU)), _))
.WillByDefault(Throw(InferenceEngine::GeneralError{""}));
}
metaDevices = {{CommonTestUtils::DEVICE_CPU, {}, -1}, {CommonTestUtils::DEVICE_GPU, {}, -1}};
metaDevices = {{ov::test::utils::DEVICE_CPU, {}, -1}, {ov::test::utils::DEVICE_GPU, {}, -1}};
DeviceInformation devInfo;
ON_CALL(*plugin, parse_meta_devices(_, _)).WillByDefault(Return(metaDevices));
ON_CALL(*plugin, get_valid_device)
@ -82,12 +82,12 @@ TEST_P(AutoReleaseHelperTest, releaseResource) {
.WillByDefault(Return(metaDevices[1]));
ON_CALL(*plugin, select_device(Property(&std::vector<DeviceInformation>::size, Eq(1)), _, _))
.WillByDefault(Return(metaDevices[0]));
config.insert(ov::device::priorities(CommonTestUtils::DEVICE_CPU + std::string(",") + CommonTestUtils::DEVICE_GPU));
config.insert(ov::device::priorities(ov::test::utils::DEVICE_CPU + std::string(",") + ov::test::utils::DEVICE_GPU));
std::shared_ptr<ov::ICompiledModel> exeNetwork;
if (cpuSuccess || accSuccess) {
ASSERT_NO_THROW(exeNetwork = plugin->compile_model(model, config));
if (!cpuSuccess)
EXPECT_EQ(exeNetwork->get_property(ov::execution_devices.name()).as<std::string>(), CommonTestUtils::DEVICE_GPU);
EXPECT_EQ(exeNetwork->get_property(ov::execution_devices.name()).as<std::string>(), ov::test::utils::DEVICE_GPU);
else
EXPECT_EQ(exeNetwork->get_property(ov::execution_devices.name()).as<std::string>(), "(CPU)");
} else {
@ -100,9 +100,9 @@ TEST_P(AutoReleaseHelperTest, releaseResource) {
EXPECT_EQ(inferReqInternal.use_count(), requestsharedcount - decreaseCount);
if (cpuSuccess || accSuccess) {
if (accSuccess)
EXPECT_EQ(exeNetwork->get_property(ov::execution_devices.name()).as<std::string>(), CommonTestUtils::DEVICE_GPU);
EXPECT_EQ(exeNetwork->get_property(ov::execution_devices.name()).as<std::string>(), ov::test::utils::DEVICE_GPU);
else
EXPECT_EQ(exeNetwork->get_property(ov::execution_devices.name()).as<std::string>(), CommonTestUtils::DEVICE_CPU);
EXPECT_EQ(exeNetwork->get_property(ov::execution_devices.name()).as<std::string>(), ov::test::utils::DEVICE_CPU);
}
}

View File

@ -100,7 +100,7 @@ public:
return mockExeNetworkOTHER; }));
ON_CALL(*core, compile_model(::testing::Matcher<const std::shared_ptr<const ov::Model>&>(_),
::testing::Matcher<const std::string&>(StrEq(CommonTestUtils::DEVICE_CPU)),
::testing::Matcher<const std::string&>(StrEq(ov::test::utils::DEVICE_CPU)),
(_))).WillByDefault(Return(mockExeNetwork));
mockExecutor = std::make_shared<ov::threading::ImmediateExecutor>();

View File

@ -172,9 +172,9 @@ TEST_P(AutoLoadFailedTest, LoadCNNetWork) {
}
// the test configure, for example
// ConfigParams {true, false, GENERAL, {DeviceParams {CommonTestUtils::DEVICE_GPU, false},
// ConfigParams {true, false, GENERAL, {DeviceParams {ov::test::utils::DEVICE_GPU, false},
// DeviceParams {"OTHER", true},
// DeviceParams {CommonTestUtils::DEVICE_CPU, true}}, 2, 3, 2},
// DeviceParams {ov::test::utils::DEVICE_CPU, true}}, 2, 3, 2},
//
// every element for ConfigParams
// {continueRun, selectThrowException, config model, deviceLoadsuccessVector, selectCount, loadCount, loadSuccessCount}
@ -192,163 +192,163 @@ const std::vector<ConfigParams> testConfigs = {
ConfigParams{true,
false,
GENERAL,
{DeviceParams{CommonTestUtils::DEVICE_GPU, true},
{DeviceParams{ov::test::utils::DEVICE_GPU, true},
DeviceParams{"OTHER", true},
DeviceParams{CommonTestUtils::DEVICE_CPU, true}},
DeviceParams{ov::test::utils::DEVICE_CPU, true}},
1,
2,
2},
ConfigParams{true,
false,
GENERAL,
{DeviceParams{CommonTestUtils::DEVICE_GPU, false},
{DeviceParams{ov::test::utils::DEVICE_GPU, false},
DeviceParams{"OTHER", true},
DeviceParams{CommonTestUtils::DEVICE_CPU, true}},
DeviceParams{ov::test::utils::DEVICE_CPU, true}},
2,
3,
2},
ConfigParams{true,
false,
GENERAL,
{DeviceParams{CommonTestUtils::DEVICE_GPU, true},
{DeviceParams{ov::test::utils::DEVICE_GPU, true},
DeviceParams{"OTHER", false},
DeviceParams{CommonTestUtils::DEVICE_CPU, true}},
DeviceParams{ov::test::utils::DEVICE_CPU, true}},
1,
2,
2},
ConfigParams{true,
false,
GENERAL,
{DeviceParams{CommonTestUtils::DEVICE_GPU, true},
{DeviceParams{ov::test::utils::DEVICE_GPU, true},
DeviceParams{"OTHER", true},
DeviceParams{CommonTestUtils::DEVICE_CPU, false}},
DeviceParams{ov::test::utils::DEVICE_CPU, false}},
1,
2,
1},
ConfigParams{true,
false,
GENERAL,
{DeviceParams{CommonTestUtils::DEVICE_GPU, true},
{DeviceParams{ov::test::utils::DEVICE_GPU, true},
DeviceParams{"OTHER", false},
DeviceParams{CommonTestUtils::DEVICE_CPU, false}},
DeviceParams{ov::test::utils::DEVICE_CPU, false}},
1,
2,
1},
ConfigParams{true,
false,
GENERAL,
{DeviceParams{CommonTestUtils::DEVICE_GPU, false},
{DeviceParams{ov::test::utils::DEVICE_GPU, false},
DeviceParams{"OTHER", true},
DeviceParams{CommonTestUtils::DEVICE_CPU, false}},
DeviceParams{ov::test::utils::DEVICE_CPU, false}},
2,
3,
1},
ConfigParams{true,
false,
GENERAL,
{DeviceParams{CommonTestUtils::DEVICE_GPU, false},
{DeviceParams{ov::test::utils::DEVICE_GPU, false},
DeviceParams{"OTHER", false},
DeviceParams{CommonTestUtils::DEVICE_CPU, true}},
DeviceParams{ov::test::utils::DEVICE_CPU, true}},
3,
4,
2},
ConfigParams{false,
false,
GENERAL,
{DeviceParams{CommonTestUtils::DEVICE_GPU, false},
{DeviceParams{ov::test::utils::DEVICE_GPU, false},
DeviceParams{"OTHER", false},
DeviceParams{CommonTestUtils::DEVICE_CPU, false}},
DeviceParams{ov::test::utils::DEVICE_CPU, false}},
3,
4,
0},
ConfigParams{true,
false,
GENERAL,
{DeviceParams{CommonTestUtils::DEVICE_GPU, true}, DeviceParams{CommonTestUtils::DEVICE_CPU, true}},
{DeviceParams{ov::test::utils::DEVICE_GPU, true}, DeviceParams{ov::test::utils::DEVICE_CPU, true}},
1,
2,
2},
ConfigParams{true,
false,
GENERAL,
{DeviceParams{CommonTestUtils::DEVICE_GPU, false}, DeviceParams{CommonTestUtils::DEVICE_CPU, true}},
{DeviceParams{ov::test::utils::DEVICE_GPU, false}, DeviceParams{ov::test::utils::DEVICE_CPU, true}},
2,
3,
2},
ConfigParams{true,
false,
GENERAL,
{DeviceParams{CommonTestUtils::DEVICE_GPU, true}, DeviceParams{CommonTestUtils::DEVICE_CPU, false}},
{DeviceParams{ov::test::utils::DEVICE_GPU, true}, DeviceParams{ov::test::utils::DEVICE_CPU, false}},
1,
2,
1},
ConfigParams{false,
false,
GENERAL,
{DeviceParams{CommonTestUtils::DEVICE_GPU, false}, DeviceParams{CommonTestUtils::DEVICE_CPU, false}},
{DeviceParams{ov::test::utils::DEVICE_GPU, false}, DeviceParams{ov::test::utils::DEVICE_CPU, false}},
2,
3,
0},
ConfigParams{false, false, GENERAL, {DeviceParams{CommonTestUtils::DEVICE_GPU, false}}, 1, 1, 0},
ConfigParams{false, false, GENERAL, {DeviceParams{CommonTestUtils::DEVICE_CPU, false}}, 1, 1, 0},
ConfigParams{true, false, GENERAL, {DeviceParams{CommonTestUtils::DEVICE_GPU, true}}, 1, 1, 1},
ConfigParams{true, false, GENERAL, {DeviceParams{CommonTestUtils::DEVICE_CPU, true}}, 1, 1, 1},
ConfigParams{false, true, GENERAL, {DeviceParams{CommonTestUtils::DEVICE_GPU, true}}, 1, 0, 0},
ConfigParams{false, true, GENERAL, {DeviceParams{CommonTestUtils::DEVICE_CPU, true}}, 1, 0, 0},
ConfigParams{false, false, GENERAL, {DeviceParams{ov::test::utils::DEVICE_GPU, false}}, 1, 1, 0},
ConfigParams{false, false, GENERAL, {DeviceParams{ov::test::utils::DEVICE_CPU, false}}, 1, 1, 0},
ConfigParams{true, false, GENERAL, {DeviceParams{ov::test::utils::DEVICE_GPU, true}}, 1, 1, 1},
ConfigParams{true, false, GENERAL, {DeviceParams{ov::test::utils::DEVICE_CPU, true}}, 1, 1, 1},
ConfigParams{false, true, GENERAL, {DeviceParams{ov::test::utils::DEVICE_GPU, true}}, 1, 0, 0},
ConfigParams{false, true, GENERAL, {DeviceParams{ov::test::utils::DEVICE_CPU, true}}, 1, 0, 0},
ConfigParams{true,
true,
GENERAL,
{DeviceParams{CommonTestUtils::DEVICE_GPU, false},
{DeviceParams{ov::test::utils::DEVICE_GPU, false},
DeviceParams{"OTHER", true},
DeviceParams{CommonTestUtils::DEVICE_CPU, true}},
DeviceParams{ov::test::utils::DEVICE_CPU, true}},
2,
2,
1},
ConfigParams{false,
true,
GENERAL,
{DeviceParams{CommonTestUtils::DEVICE_GPU, false},
{DeviceParams{ov::test::utils::DEVICE_GPU, false},
DeviceParams{"OTHER", true},
DeviceParams{CommonTestUtils::DEVICE_CPU, false}},
DeviceParams{ov::test::utils::DEVICE_CPU, false}},
2,
2,
0},
ConfigParams{true,
true,
GENERAL,
{DeviceParams{CommonTestUtils::DEVICE_GPU, false}, DeviceParams{CommonTestUtils::DEVICE_CPU, true}},
{DeviceParams{ov::test::utils::DEVICE_GPU, false}, DeviceParams{ov::test::utils::DEVICE_CPU, true}},
2,
2,
1},
ConfigParams{true,
false,
LATENCY,
{DeviceParams{CommonTestUtils::DEVICE_GPU, false},
{DeviceParams{ov::test::utils::DEVICE_GPU, false},
DeviceParams{"OTHER", false},
DeviceParams{CommonTestUtils::DEVICE_CPU, true}},
DeviceParams{ov::test::utils::DEVICE_CPU, true}},
3,
3,
1},
ConfigParams{true,
false,
LATENCY,
{DeviceParams{CommonTestUtils::DEVICE_GPU, false}, DeviceParams{CommonTestUtils::DEVICE_CPU, true}},
{DeviceParams{ov::test::utils::DEVICE_GPU, false}, DeviceParams{ov::test::utils::DEVICE_CPU, true}},
2,
2,
1},
ConfigParams{true,
false,
THROUGHPUT,
{DeviceParams{CommonTestUtils::DEVICE_GPU, false},
{DeviceParams{ov::test::utils::DEVICE_GPU, false},
DeviceParams{"OTHER", false},
DeviceParams{CommonTestUtils::DEVICE_CPU, true}},
DeviceParams{ov::test::utils::DEVICE_CPU, true}},
3,
4,
2},
ConfigParams{true,
false,
THROUGHPUT,
{DeviceParams{CommonTestUtils::DEVICE_GPU, false}, DeviceParams{CommonTestUtils::DEVICE_CPU, true}},
{DeviceParams{ov::test::utils::DEVICE_GPU, false}, DeviceParams{ov::test::utils::DEVICE_CPU, true}},
2,
3,
2}};

View File

@ -14,7 +14,7 @@ using ConfigParams = std::tuple<
bool // reverse total device
>;
const DeviceInformation CPU_INFO = {CommonTestUtils::DEVICE_CPU, {}, 2, "01", "CPU_01"};
const DeviceInformation CPU_INFO = {ov::test::utils::DEVICE_CPU, {}, 2, "01", "CPU_01"};
const DeviceInformation IGPU_INFO = {"GPU.0", {}, 2, "01", "iGPU_01"};
const DeviceInformation DGPU_INFO = {"GPU.1", {}, 2, "01", "dGPU_01"};
const DeviceInformation OTHERS_INFO = {"OTHERS", {}, 2, "01", "OTHERS" };

View File

@ -33,7 +33,7 @@ public:
::testing::Matcher<const ov::AnyMap&>(_)))
.WillByDefault(Return(mockExeNetwork));
metaDevices = {{CommonTestUtils::DEVICE_CPU, {}, -1}, {CommonTestUtils::DEVICE_GPU, {}, -1}};
metaDevices = {{ov::test::utils::DEVICE_CPU, {}, -1}, {ov::test::utils::DEVICE_GPU, {}, -1}};
// DeviceInformation devInfo;
ON_CALL(*plugin, parse_meta_devices(_, _)).WillByDefault(Return(metaDevices));
ON_CALL(*plugin, get_valid_device)

View File

@ -35,7 +35,7 @@ public:
ON_CALL(*core, compile_model(::testing::Matcher<const std::shared_ptr<const ov::Model>&>(_),
::testing::Matcher<const std::string&>(_), _))
.WillByDefault(Return(mockExeNetwork));
metaDevices = {{CommonTestUtils::DEVICE_CPU, {}, -1}, {CommonTestUtils::DEVICE_GPU, {}, -1}};
metaDevices = {{ov::test::utils::DEVICE_CPU, {}, -1}, {ov::test::utils::DEVICE_GPU, {}, -1}};
ON_CALL(*plugin, parse_meta_devices(_, _)).WillByDefault(Return(metaDevices));
ON_CALL(*plugin, get_valid_device)
.WillByDefault([](const std::vector<DeviceInformation>& metaDevices, const std::string& netPrecision) {
@ -55,14 +55,14 @@ TEST_P(AutoStartupFallback, propertytest) {
EXPECT_CALL(
*core,
compile_model(::testing::Matcher<const std::shared_ptr<const ov::Model>&>(_),
::testing::Matcher<const std::string&>(CommonTestUtils::DEVICE_GPU), _))
::testing::Matcher<const std::string&>(ov::test::utils::DEVICE_GPU), _))
.Times(1);
if (startup_fallback) {
std::map<std::string, std::string> test_map = {{"PERFORMANCE_HINT", "LATENCY"}};
EXPECT_CALL(
*core,
compile_model(::testing::Matcher<const std::shared_ptr<const ov::Model>&>(_),
::testing::Matcher<const std::string&>(CommonTestUtils::DEVICE_CPU),
::testing::Matcher<const std::string&>(ov::test::utils::DEVICE_CPU),
::testing::Matcher<const ov::AnyMap&>(MapContains(test_map))))
.Times(1);
}

View File

@ -12,7 +12,7 @@ const std::vector<InferenceEngine::Precision> netPrecisions = {InferenceEngine::
auto autoBatchConfig = []() {
return std::vector<std::map<std::string, std::string>>{
// explicit batch size 4 to avoid fallback to no auto-batching
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), std::string(CommonTestUtils::DEVICE_TEMPLATE) + "(4)"},
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), std::string(ov::test::utils::DEVICE_TEMPLATE) + "(4)"},
// no timeout to avoid increasing the test time
{ov::auto_batch_timeout.name(), "0"}}};
};
@ -20,7 +20,7 @@ auto autoBatchConfig = []() {
INSTANTIATE_TEST_SUITE_P(smoke_AutoBatch_BehaviorTests,
ExecNetSetPrecision,
::testing::Combine(::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_BATCH),
::testing::Values(ov::test::utils::DEVICE_BATCH),
::testing::ValuesIn(autoBatchConfig())),
ExecNetSetPrecision::getTestCaseName);
} // namespace

View File

@ -9,14 +9,14 @@ namespace {
auto autoBatchConfigs = []() {
return std::vector<std::map<std::string, std::string>>{
// explicit batch size 4 to avoid fallback to no auto-batching
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), std::string(CommonTestUtils::DEVICE_TEMPLATE) + "(4)"},
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), std::string(ov::test::utils::DEVICE_TEMPLATE) + "(4)"},
// no timeout to avoid increasing the test time
{ov::auto_batch_timeout.name(), "0"}}};
};
INSTANTIATE_TEST_SUITE_P(smoke_AutoBatch_BehaviorTests,
InferRequestCallbackTests,
::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_BATCH),
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_BATCH),
::testing::ValuesIn(autoBatchConfigs())),
InferRequestCallbackTests::getTestCaseName);

View File

@ -13,14 +13,14 @@ namespace {
auto auto_batch_configs = []() {
return std::vector<std::map<std::string, std::string>>{
// explicit batch size 4 to avoid fallback to no auto-batching
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), std::string(CommonTestUtils::DEVICE_TEMPLATE) + "(4)"},
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), std::string(ov::test::utils::DEVICE_TEMPLATE) + "(4)"},
// no timeout to avoid increasing the test time
{ov::auto_batch_timeout.name(), "0"}}};
};
INSTANTIATE_TEST_SUITE_P(smoke_AutoBatch_BehaviorTests,
InferRequestMultithreadingTests,
::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_BATCH),
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_BATCH),
::testing::ValuesIn(auto_batch_configs())),
InferRequestMultithreadingTests::getTestCaseName);

View File

@ -9,14 +9,14 @@ namespace {
auto AutoBatchConfigs = []() {
return std::vector<std::map<std::string, std::string>>{
// explicit batch size 4 to avoid fallback to no auto-batching
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), std::string(CommonTestUtils::DEVICE_TEMPLATE) + "(4)"},
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), std::string(ov::test::utils::DEVICE_TEMPLATE) + "(4)"},
// no timeout to avoid increasing the test time
{ov::auto_batch_timeout.name(), "0"}}};
};
INSTANTIATE_TEST_SUITE_P(smoke_AutoBatch_BehaviorTests,
InferRequestPerfCountersTest,
::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_BATCH),
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_BATCH),
::testing::ValuesIn(AutoBatchConfigs())),
InferRequestPerfCountersTest::getTestCaseName);

View File

@ -13,14 +13,14 @@ namespace {
auto autoBatchConfigs = []() {
return std::vector<std::map<std::string, std::string>>{
// explicit batch size 4 to avoid fallback to no auto-batching
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), std::string(CommonTestUtils::DEVICE_TEMPLATE) + "(4)"},
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), std::string(ov::test::utils::DEVICE_TEMPLATE) + "(4)"},
// no timeout to avoid increasing the test time
{ov::auto_batch_timeout.name(), "0"}}};
};
INSTANTIATE_TEST_SUITE_P(smoke_AutoBatch_BehaviorTests,
InferRequestWaitTests,
::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_BATCH),
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_BATCH),
::testing::ValuesIn(autoBatchConfigs())),
InferRequestWaitTests::getTestCaseName);

View File

@ -9,14 +9,14 @@ namespace {
auto autoBatchConfigs = []() {
return std::vector<ov::AnyMap>{
// explicit batch size 4 to avoid fallback to no auto-batching
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), std::string(CommonTestUtils::DEVICE_TEMPLATE) + "(4)"},
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), std::string(ov::test::utils::DEVICE_TEMPLATE) + "(4)"},
// no timeout to avoid increasing the test time
{ov::auto_batch_timeout.name(), "0"}}};
};
INSTANTIATE_TEST_SUITE_P(smoke_AutoBatchBehaviorTests, OVExecutableNetworkBaseTest,
::testing::Combine(
::testing::Values(CommonTestUtils::DEVICE_BATCH),
::testing::Values(ov::test::utils::DEVICE_BATCH),
::testing::ValuesIn(autoBatchConfigs())),
OVExecutableNetworkBaseTest::getTestCaseName);

View File

@ -18,21 +18,21 @@ const std::vector<ov::AnyMap> auto_batch_inproperties = {
INSTANTIATE_TEST_SUITE_P(smoke_AutoBatch_BehaviorTests,
OVCompiledModelPropertiesIncorrectTests,
::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_BATCH),
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_BATCH),
::testing::ValuesIn(auto_batch_inproperties)),
OVCompiledModelPropertiesIncorrectTests::getTestCaseName);
const std::vector<ov::AnyMap> auto_batch_properties = {
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), std::string(CommonTestUtils::DEVICE_TEMPLATE) + "(4)"}},
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), std::string(CommonTestUtils::DEVICE_TEMPLATE) + "(4)"},
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), std::string(ov::test::utils::DEVICE_TEMPLATE) + "(4)"}},
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), std::string(ov::test::utils::DEVICE_TEMPLATE) + "(4)"},
{ov::auto_batch_timeout(1)}},
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), std::string(CommonTestUtils::DEVICE_TEMPLATE) + "(4)"},
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), std::string(ov::test::utils::DEVICE_TEMPLATE) + "(4)"},
{ov::auto_batch_timeout(10)}},
};
INSTANTIATE_TEST_SUITE_P(smoke_AutoBatch_BehaviorTests,
OVCompiledModelPropertiesTests,
::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_BATCH),
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_BATCH),
::testing::ValuesIn(auto_batch_properties)),
OVCompiledModelPropertiesTests::getTestCaseName);

View File

@ -12,14 +12,14 @@ namespace {
auto autoBatchConfigs = []() {
return std::vector<ov::AnyMap>{
// explicit batch size 4 to avoid fallback to no auto-batching
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), std::string(CommonTestUtils::DEVICE_TEMPLATE) + "(4)"},
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), std::string(ov::test::utils::DEVICE_TEMPLATE) + "(4)"},
// no timeout to avoid increasing the test time
{ov::auto_batch_timeout(0)}}};
};
INSTANTIATE_TEST_SUITE_P(smoke_AutoBatch_BehaviorTests,
OVInferRequestCallbackTests,
::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_BATCH),
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_BATCH),
::testing::ValuesIn(autoBatchConfigs())),
OVInferRequestCallbackTests::getTestCaseName);

View File

@ -10,14 +10,14 @@ namespace {
auto autoBatchConfigs = []() {
return std::vector<ov::AnyMap>{
// explicit batch size 4 to avoid fallback to no auto-batching
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), std::string(CommonTestUtils::DEVICE_TEMPLATE) + "(4)"},
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), std::string(ov::test::utils::DEVICE_TEMPLATE) + "(4)"},
// no timeout to avoid increasing the test time
{ov::auto_batch_timeout(0)}}};
};
INSTANTIATE_TEST_SUITE_P(smoke_AutoBatchBehaviorTests,
OVInferRequestCancellationTests,
::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_BATCH),
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_BATCH),
::testing::ValuesIn(autoBatchConfigs())),
OVInferRequestCancellationTests::getTestCaseName);

View File

@ -12,7 +12,7 @@ namespace {
auto AutoBatchConfigs = []() {
return std::vector<ov::AnyMap>{
// explicit batch size 4 to avoid fallback to no auto-batching
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), std::string(CommonTestUtils::DEVICE_TEMPLATE) + "(4)"},
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), std::string(ov::test::utils::DEVICE_TEMPLATE) + "(4)"},
// no timeout to avoid increasing the test time
{ov::auto_batch_timeout(0)}}};
};
@ -51,21 +51,21 @@ std::vector<ov::element::Type> supported_input_prcs = {ov::element::boolean,
INSTANTIATE_TEST_SUITE_P(smoke_AutoBatch_BehaviorTests,
OVInferRequestIOTensorTest,
::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_BATCH),
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_BATCH),
::testing::ValuesIn(AutoBatchConfigs())),
OVInferRequestIOTensorTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_AutoBatch_BehaviorTests,
OVInferRequestIOTensorSetPrecisionTest,
::testing::Combine(::testing::ValuesIn(prcs),
::testing::Values(CommonTestUtils::DEVICE_BATCH),
::testing::Values(ov::test::utils::DEVICE_BATCH),
::testing::ValuesIn(AutoBatchConfigs())),
OVInferRequestIOTensorSetPrecisionTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_AutoBatch_BehaviorTests,
OVInferRequestCheckTensorPrecision,
::testing::Combine(::testing::ValuesIn(supported_input_prcs),
::testing::Values(CommonTestUtils::DEVICE_BATCH),
::testing::Values(ov::test::utils::DEVICE_BATCH),
::testing::ValuesIn(AutoBatchConfigs())),
OVInferRequestCheckTensorPrecision::getTestCaseName);

View File

@ -12,14 +12,14 @@ namespace {
auto AutoBatchConfigs = []() {
return std::vector<ov::AnyMap>{
// explicit batch size 4 to avoid fallback to no auto-batching
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), std::string(CommonTestUtils::DEVICE_TEMPLATE) + "(4)"},
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), std::string(ov::test::utils::DEVICE_TEMPLATE) + "(4)"},
// no timeout to avoid increasing the test time
{ov::auto_batch_timeout(0)}}};
};
INSTANTIATE_TEST_SUITE_P(smoke_AutoBatch_BehaviorTests,
OVInferRequestMultithreadingTests,
::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_BATCH),
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_BATCH),
::testing::ValuesIn(AutoBatchConfigs())),
OVInferRequestMultithreadingTests::getTestCaseName);

View File

@ -10,14 +10,14 @@ namespace {
auto AutoBatchConfigs = []() {
return std::vector<ov::AnyMap>{
// explicit batch size 4 to avoid fallback to no auto-batching
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), std::string(CommonTestUtils::DEVICE_TEMPLATE) + "(4)"},
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), std::string(ov::test::utils::DEVICE_TEMPLATE) + "(4)"},
// no timeout to avoid increasing the test time
{ov::auto_batch_timeout(0)}}};
};
INSTANTIATE_TEST_SUITE_P(smoke_AutoBatch_BehaviorTests,
OVInferRequestPerfCountersTest,
::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_BATCH),
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_BATCH),
::testing::ValuesIn(AutoBatchConfigs())),
OVInferRequestPerfCountersTest::getTestCaseName);

View File

@ -12,14 +12,14 @@ namespace {
auto AutoBatchConfigs = []() {
return std::vector<ov::AnyMap>{
// explicit batch size 4 to avoid fallback to no auto-batching
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), std::string(CommonTestUtils::DEVICE_TEMPLATE) + "(4)"},
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), std::string(ov::test::utils::DEVICE_TEMPLATE) + "(4)"},
// no timeout to avoid increasing the test time
{ov::auto_batch_timeout(0)}}};
};
INSTANTIATE_TEST_SUITE_P(smoke_AutoBatch_BehaviorTests,
OVInferRequestWaitTests,
::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_BATCH),
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_BATCH),
::testing::ValuesIn(AutoBatchConfigs())),
OVInferRequestWaitTests::getTestCaseName);

View File

@ -8,7 +8,7 @@ using namespace ov::test::behavior;
namespace {
INSTANTIATE_TEST_SUITE_P(smoke_VirtualPlugin_BehaviorTests,
OVHoldersTest,
::testing::Values(CommonTestUtils::DEVICE_BATCH),
::testing::Values(ov::test::utils::DEVICE_BATCH),
OVHoldersTest::getTestCaseName);
} // namespace

View File

@ -15,18 +15,18 @@ const std::vector<ov::AnyMap> auto_batch_inproperties = {
INSTANTIATE_TEST_SUITE_P(DISABLED_smoke_AutoBatch_BehaviorTests,
OVPropertiesIncorrectTests,
::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_BATCH),
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_BATCH),
::testing::ValuesIn(auto_batch_inproperties)),
OVPropertiesIncorrectTests::getTestCaseName);
const std::vector<ov::AnyMap> auto_batch_properties = {
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), CommonTestUtils::DEVICE_TEMPLATE}},
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), CommonTestUtils::DEVICE_TEMPLATE}, {ov::auto_batch_timeout(1)}},
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), ov::test::utils::DEVICE_TEMPLATE}},
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), ov::test::utils::DEVICE_TEMPLATE}, {ov::auto_batch_timeout(1)}},
};
INSTANTIATE_TEST_SUITE_P(DISABLED_smoke_AutoBatch_BehaviorTests,
OVPropertiesTests,
::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_BATCH),
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_BATCH),
::testing::ValuesIn(auto_batch_properties)),
OVPropertiesTests::getTestCaseName);
} // namespace

View File

@ -16,7 +16,7 @@ std::vector<std::pair<ov::AnyMap, ov::AnyMap>> generate_remote_params() {
auto AutoBatchConfigs = []() {
return std::vector<ov::AnyMap>{
// explicit batch size 4 to avoid fallback to no auto-batching
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), std::string(CommonTestUtils::DEVICE_TEMPLATE) + "(4)"},
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), std::string(ov::test::utils::DEVICE_TEMPLATE) + "(4)"},
// no timeout to avoid increasing the test time
ov::auto_batch_timeout(0)}};
};
@ -24,7 +24,7 @@ auto AutoBatchConfigs = []() {
INSTANTIATE_TEST_SUITE_P(DISABLED_smoke_AutoBatch_BehaviorTests,
OVRemoteTest,
::testing::Combine(::testing::Values(ngraph::element::f32),
::testing::Values(::CommonTestUtils::DEVICE_BATCH),
::testing::Values(::ov::test::utils::DEVICE_BATCH),
::testing::ValuesIn(AutoBatchConfigs()),
::testing::ValuesIn(generate_remote_params())),
OVRemoteTest::getTestCaseName);

View File

@ -16,7 +16,7 @@ const std::vector<size_t> num_requests{1, 3, 8, 9, 16, 64};
const std::vector<size_t> num_batch{1, 4, 8, 16, 32, 64, 128, 256};
INSTANTIATE_TEST_SUITE_P(smoke_AutoBatching_test,
AutoBatching_Test,
::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_TEMPLATE),
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_TEMPLATE),
::testing::ValuesIn(get_vs_set),
::testing::ValuesIn(num_streams),
::testing::ValuesIn(num_requests),
@ -25,7 +25,7 @@ INSTANTIATE_TEST_SUITE_P(smoke_AutoBatching_test,
INSTANTIATE_TEST_SUITE_P(smoke_AutoBatching_test,
AutoBatching_Test_DetectionOutput,
::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_TEMPLATE),
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_TEMPLATE),
::testing::ValuesIn(get_vs_set),
::testing::ValuesIn(num_streams),
::testing::ValuesIn(num_requests),
@ -34,24 +34,24 @@ INSTANTIATE_TEST_SUITE_P(smoke_AutoBatching_test,
INSTANTIATE_TEST_SUITE_P(smoke_AutoBatching_test,
DefaultConfigurationTest,
::testing::Combine(::testing::Values(std::string(CommonTestUtils::DEVICE_BATCH) + ":" +
CommonTestUtils::DEVICE_TEMPLATE),
::testing::Combine(::testing::Values(std::string(ov::test::utils::DEVICE_BATCH) + ":" +
ov::test::utils::DEVICE_TEMPLATE),
::testing::Values(DefaultParameter{CONFIG_KEY(AUTO_BATCH_TIMEOUT),
InferenceEngine::Parameter{"1000"}})),
DefaultConfigurationTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_AutoBatching_test_string,
DefaultConfigurationTest,
::testing::Combine(::testing::Values(std::string(CommonTestUtils::DEVICE_BATCH) + ":" +
CommonTestUtils::DEVICE_TEMPLATE),
::testing::Combine(::testing::Values(std::string(ov::test::utils::DEVICE_BATCH) + ":" +
ov::test::utils::DEVICE_TEMPLATE),
::testing::Values(DefaultParameter{ov::auto_batch_timeout.name(),
InferenceEngine::Parameter{"1000"}})),
DefaultConfigurationTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_AutoBatching_test_uint,
DefaultConfigurationTest,
::testing::Combine(::testing::Values(std::string(CommonTestUtils::DEVICE_BATCH) + ":" +
CommonTestUtils::DEVICE_TEMPLATE),
::testing::Combine(::testing::Values(std::string(ov::test::utils::DEVICE_BATCH) + ":" +
ov::test::utils::DEVICE_TEMPLATE),
::testing::Values(DefaultParameter{ov::auto_batch_timeout.name(),
InferenceEngine::Parameter{uint32_t(1000)}})),
DefaultConfigurationTest::getTestCaseName);

View File

@ -72,7 +72,7 @@ protected:
// minimize timeout to reduce test time
config[CONFIG_KEY(AUTO_BATCH_TIMEOUT)] = std::to_string(1);
auto exec_net_ref = ie.LoadNetwork(net,
std::string(CommonTestUtils::DEVICE_BATCH) + ":" + target_device + "(" +
std::string(ov::test::utils::DEVICE_BATCH) + ":" + target_device + "(" +
std::to_string(num_batch) + ")",
config);

View File

@ -8,41 +8,41 @@ using namespace BehaviorTestsDefinitions;
namespace {
auto auto_batch_inconfigs = []() {
return std::vector<std::map<std::string, std::string>>{
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), CommonTestUtils::DEVICE_TEMPLATE},
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), ov::test::utils::DEVICE_TEMPLATE},
{ov::hint::performance_mode.name(), "DOESN'T EXIST"}},
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), CommonTestUtils::DEVICE_TEMPLATE},
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), ov::test::utils::DEVICE_TEMPLATE},
{InferenceEngine::PluginConfigParams::KEY_PERFORMANCE_HINT, InferenceEngine::PluginConfigParams::LATENCY},
{ov::hint::performance_mode.name(), "LATENCY"},
{ov::hint::num_requests.name(), "-1"}},
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), CommonTestUtils::DEVICE_TEMPLATE},
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), ov::test::utils::DEVICE_TEMPLATE},
{InferenceEngine::PluginConfigParams::KEY_CONFIG_FILE, "unknown_file"}},
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), CommonTestUtils::DEVICE_TEMPLATE},
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), ov::test::utils::DEVICE_TEMPLATE},
{ov::device::id.name(), "DEVICE_UNKNOWN"}}};
};
auto auto_batch_configs = []() {
return std::vector<std::map<std::string, std::string>>{
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), CommonTestUtils::DEVICE_TEMPLATE}},
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), CommonTestUtils::DEVICE_TEMPLATE},
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), ov::test::utils::DEVICE_TEMPLATE}},
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), ov::test::utils::DEVICE_TEMPLATE},
{ov::auto_batch_timeout.name(), "1"}},
};
};
INSTANTIATE_TEST_SUITE_P(smoke_AutoBatch_BehaviorTests,
IncorrectConfigTests,
::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_BATCH),
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_BATCH),
::testing::ValuesIn(auto_batch_inconfigs())),
IncorrectConfigTests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_AutoBatch_BehaviorTests,
IncorrectConfigAPITests,
::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_BATCH),
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_BATCH),
::testing::ValuesIn(auto_batch_inconfigs())),
IncorrectConfigAPITests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_AutoBatch_BehaviorTests,
CorrectConfigTests,
::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_BATCH),
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_BATCH),
::testing::ValuesIn(auto_batch_configs())),
CorrectConfigTests::getTestCaseName);

Some files were not shown because too many files have changed in this diff Show More