Removed ov::runtime namespace (#9781)

* Removed ov::runtime namespace

* clang-format

* Fixes

* template reference

* Fixes
This commit is contained in:
Ilya Lavrenov 2022-01-20 16:17:57 +03:00 committed by GitHub
parent 29c3b8e201
commit 8f3d030d79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
362 changed files with 4231 additions and 4262 deletions

View File

@ -4,52 +4,52 @@
#include <openvino/core/core.hpp>
#include <openvino/runtime/runtime.hpp>
void inputs_v10(ov::runtime::InferRequest& infer_request) {
void inputs_v10(ov::InferRequest& infer_request) {
//! [ov_api_2_0:get_input_tensor_v10]
// Get input tensor by index
ov::runtime::Tensor input_tensor1 = infer_request.get_input_tensor(0);
ov::Tensor input_tensor1 = infer_request.get_input_tensor(0);
// IR v10 works with converted precisions (i64 -> i32)
auto data1 = input_tensor1.data<int32_t>();
// Fill first data ...
// Get input tensor by tensor name
ov::runtime::Tensor input_tensor2 = infer_request.get_tensor("data2_t");
ov::Tensor input_tensor2 = infer_request.get_tensor("data2_t");
// IR v10 works with converted precisions (i64 -> i32)
auto data2 = input_tensor1.data<int32_t>();
// Fill first data ...
//! [ov_api_2_0:get_input_tensor_v10]
}
void inputs_aligned(ov::runtime::InferRequest& infer_request) {
void inputs_aligned(ov::InferRequest& infer_request) {
//! [ov_api_2_0:get_input_tensor_aligned]
// Get input tensor by index
ov::runtime::Tensor input_tensor1 = infer_request.get_input_tensor(0);
ov::Tensor input_tensor1 = infer_request.get_input_tensor(0);
// Element types, names and layouts are aligned with framework
auto data1 = input_tensor1.data<int64_t>();
// Fill first data ...
// Get input tensor by tensor name
ov::runtime::Tensor input_tensor2 = infer_request.get_tensor("data2_t");
ov::Tensor input_tensor2 = infer_request.get_tensor("data2_t");
// Element types, names and layouts are aligned with framework
auto data2 = input_tensor1.data<int64_t>();
// Fill first data ...
//! [ov_api_2_0:get_input_tensor_aligned]
}
void outputs_v10(ov::runtime::InferRequest& infer_request) {
void outputs_v10(ov::InferRequest& infer_request) {
//! [ov_api_2_0:get_output_tensor_v10]
// model has only one output
ov::runtime::Tensor output_tensor = infer_request.get_output_tensor();
ov::Tensor output_tensor = infer_request.get_output_tensor();
// IR v10 works with converted precisions (i64 -> i32)
auto out_data = output_tensor.data<int32_t>();
// process output data
//! [ov_api_2_0:get_output_tensor_v10]
}
void outputs_aligned(ov::runtime::InferRequest& infer_request) {
void outputs_aligned(ov::InferRequest& infer_request) {
//! [ov_api_2_0:get_output_tensor_aligned]
// model has only one output
ov::runtime::Tensor output_tensor = infer_request.get_output_tensor();
ov::Tensor output_tensor = infer_request.get_output_tensor();
// Element types, names and layouts are aligned with framework
auto out_data = output_tensor.data<int64_t>();
// process output data
@ -58,7 +58,7 @@ void outputs_aligned(ov::runtime::InferRequest& infer_request) {
int main() {
//! [ov_api_2_0:create_core]
ov::runtime::Core core;
ov::Core core;
//! [ov_api_2_0:create_core]
//! [ov_api_2_0:read_model]
@ -71,11 +71,11 @@ int main() {
//! [ov_api_2_0:get_inputs_outputs]
//! [ov_api_2_0:compile_model]
ov::runtime::CompiledModel compiled_model = core.compile_model(network, "CPU");
ov::CompiledModel compiled_model = core.compile_model(network, "CPU");
//! [ov_api_2_0:compile_model]
//! [ov_api_2_0:create_infer_request]
ov::runtime::InferRequest infer_request = compiled_model.create_infer_request();
ov::InferRequest infer_request = compiled_model.create_infer_request();
//! [ov_api_2_0:create_infer_request]
inputs_aligned(infer_request);

View File

@ -34,7 +34,7 @@ bool Identity::visit_attributes(ov::AttributeVisitor& visitor) {
//! [op:visit_attributes]
//! [op:evaluate]
bool Identity::evaluate(ov::runtime::TensorVector& outputs, const ov::runtime::TensorVector& inputs) const {
bool Identity::evaluate(ov::TensorVector& outputs, const ov::TensorVector& inputs) const {
auto in = inputs[0];
auto out = outputs[0];
out.set_shape(in.get_shape());

View File

@ -19,7 +19,7 @@ public:
std::shared_ptr<ov::Node> clone_with_new_inputs(const ov::OutputVector& new_args) const override;
bool visit_attributes(ov::AttributeVisitor& visitor) override;
bool evaluate(ov::runtime::TensorVector& outputs, const ov::runtime::TensorVector& inputs) const override;
bool evaluate(ov::TensorVector& outputs, const ov::TensorVector& inputs) const override;
bool has_evaluate() const override;
};
//! [op:header]

View File

@ -15,7 +15,7 @@ ov_add_test_target(
INCLUDES
"${TEMPLATE_PLUGIN_SOURCE_DIR}/include"
"${CMAKE_CURRENT_SOURCE_DIR}/op_reference"
ADD_CPPLINT
# ADD_CPPLINT
LABELS
TEMPLATE
)

View File

@ -26,8 +26,8 @@ struct AbsParams {
PartialShape pshape;
element::Type inType;
element::Type outType;
runtime::Tensor inputData;
runtime::Tensor refData;
ov::Tensor inputData;
ov::Tensor refData;
};
class ReferenceAbsLayerTest : public testing::TestWithParam<AbsParams>, public CommonReferenceTest {

View File

@ -13,8 +13,8 @@ namespace reference_tests {
namespace {
struct AcosParams {
Tensor input;
Tensor expected;
reference_tests::Tensor input;
reference_tests::Tensor expected;
};
struct Builder : ParamsBuilder<AcosParams> {

View File

@ -13,8 +13,8 @@ namespace reference_tests {
namespace {
struct AcoshParams {
Tensor input;
Tensor expected;
reference_tests::Tensor input;
reference_tests::Tensor expected;
};
struct Builder : ParamsBuilder<AcoshParams> {

View File

@ -35,8 +35,8 @@ struct AdaptiveAvgPoolParams {
Shape m_output_shape;
element::Type m_input_type;
element::Type m_output_type;
runtime::Tensor m_input_data;
runtime::Tensor m_expected_data;
ov::Tensor m_input_data;
ov::Tensor m_expected_data;
Shape m_adaptive_shape;
std::vector<int64_t> m_adaptive_values;
};

View File

@ -37,9 +37,9 @@ struct AdaptiveMaxPoolParams {
Shape m_output_shape;
element::Type m_input_type;
element::Type m_output_type;
runtime::Tensor m_input_data;
runtime::Tensor m_expected_data;
runtime::Tensor m_expected_indices;
ov::Tensor m_input_data;
ov::Tensor m_expected_data;
ov::Tensor m_expected_indices;
Shape m_adaptive_shape;
std::vector<int64_t> m_adaptive_values;
};

View File

@ -31,9 +31,9 @@ struct AddParams {
PartialShape pshape2;
element::Type inType;
element::Type outType;
runtime::Tensor inputData1;
runtime::Tensor inputData2;
runtime::Tensor refData;
ov::Tensor inputData1;
ov::Tensor inputData2;
ov::Tensor refData;
};
class ReferenceAddLayerTest : public testing::TestWithParam<AddParams>, public CommonReferenceTest {

View File

@ -14,8 +14,8 @@ namespace reference_tests {
namespace {
struct AsinParams {
Tensor input;
Tensor expected;
reference_tests::Tensor input;
reference_tests::Tensor expected;
};
struct Builder : ParamsBuilder<AsinParams> {

View File

@ -14,8 +14,8 @@ namespace reference_tests {
namespace {
struct AsinhParams {
Tensor input;
Tensor expected;
reference_tests::Tensor input;
reference_tests::Tensor expected;
};
struct Builder : ParamsBuilder<AsinhParams> {

View File

@ -13,8 +13,8 @@ namespace reference_tests {
namespace {
struct AtanParams {
Tensor input;
Tensor expected;
reference_tests::Tensor input;
reference_tests::Tensor expected;
};
struct Builder : ParamsBuilder<AtanParams> {

View File

@ -17,8 +17,8 @@ namespace reference_tests {
namespace {
struct AtanhParams {
Tensor input;
Tensor expected;
reference_tests::Tensor input;
reference_tests::Tensor expected;
};
struct Builder : ParamsBuilder<AtanhParams> {

View File

@ -45,8 +45,8 @@ struct AvgPoolParams {
Shape m_output_shape;
element::Type m_input_type;
element::Type m_output_type;
runtime::Tensor m_input_data;
runtime::Tensor m_expected_data;
ov::Tensor m_input_data;
ov::Tensor m_expected_data;
Strides m_strides;
Shape m_pads_begin;
Shape m_pads_end;

View File

@ -39,11 +39,11 @@ void CommonReferenceTest::FillInputs() {
for (size_t i = 0; i < functionParams.size(); i++) {
const auto& param = functionParams[i];
ov::runtime::Tensor blob;
ov::Tensor blob;
if (param->get_partial_shape().is_static()) {
blob = ov::runtime::Tensor(param->get_element_type(), param->get_shape());
blob = ov::Tensor(param->get_element_type(), param->get_shape());
} else {
blob = ov::runtime::Tensor(param->get_element_type(), inputData[i].get_shape());
blob = ov::Tensor(param->get_element_type(), inputData[i].get_shape());
}
ASSERT_EQ(blob.get_byte_size(), inputData[i].get_byte_size());
@ -75,7 +75,7 @@ void CommonReferenceTest::Validate() {
}
}
void CommonReferenceTest::ValidateBlobs(const ov::runtime::Tensor& refBlob, const ov::runtime::Tensor& outBlob,
void CommonReferenceTest::ValidateBlobs(const ov::Tensor& refBlob, const ov::Tensor& outBlob,
float threshold, float abs_threshold, size_t actual_comparision_size) {
ASSERT_EQ(refBlob.get_element_type(), outBlob.get_element_type());
ASSERT_EQ(refBlob.get_byte_size(), outBlob.get_byte_size());

View File

@ -22,31 +22,31 @@ public:
void Infer();
virtual void Validate();
static void ValidateBlobs(const ov::runtime::Tensor& refBlob,
const ov::runtime::Tensor& outBlob,
static void ValidateBlobs(const ov::Tensor& refBlob,
const ov::Tensor& outBlob,
float threshold,
float abs_threshold,
size_t actual_comparision_size = 0);
protected:
const std::string targetDevice;
std::shared_ptr<ov::runtime::Core> core;
std::shared_ptr<ov::Core> core;
std::shared_ptr<ov::Model> function;
ov::runtime::CompiledModel executableNetwork;
ov::runtime::InferRequest inferRequest;
std::vector<ov::runtime::Tensor> inputData;
std::vector<ov::runtime::Tensor> refOutData;
std::vector<ov::runtime::Tensor> actualOutData;
ov::CompiledModel executableNetwork;
ov::InferRequest inferRequest;
std::vector<ov::Tensor> inputData;
std::vector<ov::Tensor> refOutData;
std::vector<ov::Tensor> actualOutData;
float threshold = 1e-2f; // Relative diff
float abs_threshold = -1.f; // Absolute diff (not used when negative)
size_t actual_comparision_size = 0; // For ref output data is smaller than output blob size
};
template <class T>
ov::runtime::Tensor CreateTensor(const ov::element::Type& element_type, const std::vector<T>& values, size_t size = 0) {
ov::Tensor CreateTensor(const ov::element::Type& element_type, const std::vector<T>& values, size_t size = 0) {
size_t real_size = size ? size : values.size() * sizeof(T) / element_type.size();
ov::runtime::Tensor tensor{element_type, {real_size}};
ov::Tensor tensor{element_type, {real_size}};
std::memcpy(tensor.data(), values.data(), std::min(real_size * element_type.size(), sizeof(T) * values.size()));
return tensor;
@ -54,10 +54,10 @@ ov::runtime::Tensor CreateTensor(const ov::element::Type& element_type, const st
// Create blob with correct input shape (not 1-dimensional). Will be used in tests with dynamic input shapes
template <class T>
ov::runtime::Tensor CreateTensor(const ov::Shape& shape,
ov::Tensor CreateTensor(const ov::Shape& shape,
const ov::element::Type& element_type,
const std::vector<T>& values) {
ov::runtime::Tensor tensor{element_type, shape};
ov::Tensor tensor{element_type, shape};
size_t size = sizeof(T) * values.size();
if (tensor.get_byte_size() < size)
size = tensor.get_byte_size();
@ -72,7 +72,7 @@ ov::runtime::Tensor CreateTensor(const ov::Shape& shape,
struct Tensor {
Tensor() = default;
Tensor(const ov::Shape& shape, ov::element::Type type, const ov::runtime::Tensor& data)
Tensor(const ov::Shape& shape, ov::element::Type type, const ov::Tensor& data)
: shape{shape},
type{type},
data{data} {}
@ -88,7 +88,7 @@ struct Tensor {
ov::Shape shape;
ov::element::Type type;
ov::runtime::Tensor data;
ov::Tensor data;
};
///
@ -96,7 +96,7 @@ struct Tensor {
///
/// e.g.:
/// struct Params {
/// Tensor i,o;
/// reference_tests::Tensor i,o;
/// int mul;
/// };
/// struct TestParamsBuilder : ParamsBuilder<Params>

View File

@ -42,12 +42,12 @@ struct BatchNormParams {
Shape m_expected_shape;
element::Type m_input_type;
element::Type m_expected_type;
runtime::Tensor m_input_value;
runtime::Tensor m_expected_value;
runtime::Tensor m_gamma;
runtime::Tensor m_beta;
runtime::Tensor m_mean;
runtime::Tensor m_variance;
ov::Tensor m_input_value;
ov::Tensor m_expected_value;
ov::Tensor m_gamma;
ov::Tensor m_beta;
ov::Tensor m_mean;
ov::Tensor m_variance;
float m_epsilon;
};

View File

@ -13,18 +13,18 @@ using namespace ov;
namespace {
struct BatchToSpaceParams {
BatchToSpaceParams(const Tensor& dataTensor, const Tensor& blockShapeTensor,
const Tensor& cropsBeginTensor, const Tensor& cropsEndTensor,
const Tensor& expectedTensor, const std::string& testcaseName = "") :
BatchToSpaceParams(const reference_tests::Tensor& dataTensor, const reference_tests::Tensor& blockShapeTensor,
const reference_tests::Tensor& cropsBeginTensor, const reference_tests::Tensor& cropsEndTensor,
const reference_tests::Tensor& expectedTensor, const std::string& testcaseName = "") :
dataTensor(dataTensor), blockShapeTensor(blockShapeTensor),
cropsBeginTensor(cropsBeginTensor), cropsEndTensor(cropsEndTensor),
expectedTensor(expectedTensor), testcaseName(testcaseName) {}
Tensor dataTensor;
Tensor blockShapeTensor;
Tensor cropsBeginTensor;
Tensor cropsEndTensor;
Tensor expectedTensor;
reference_tests::Tensor dataTensor;
reference_tests::Tensor blockShapeTensor;
reference_tests::Tensor cropsBeginTensor;
reference_tests::Tensor cropsEndTensor;
reference_tests::Tensor expectedTensor;
std::string testcaseName;
};
@ -79,76 +79,76 @@ std::vector<BatchToSpaceParams> generateBatchToSpaceParams() {
std::vector<BatchToSpaceParams> batchToSpaceParams {
// input_with_shape_4x3
BatchToSpaceParams(
Tensor({4, 3}, IN_ET, std::vector<T>{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}),
Tensor({2}, element::i64, std::vector<int64_t>{1, 2}),
Tensor({2}, element::i64, std::vector<int64_t>{0, 0}),
Tensor({2}, element::i64, std::vector<int64_t>{0, 0}),
Tensor({2, 6}, IN_ET, std::vector<T>{1, 7, 2, 8, 3, 9, 4, 10, 5, 11, 6, 12}),
reference_tests::Tensor({4, 3}, IN_ET, std::vector<T>{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}),
reference_tests::Tensor({2}, element::i64, std::vector<int64_t>{1, 2}),
reference_tests::Tensor({2}, element::i64, std::vector<int64_t>{0, 0}),
reference_tests::Tensor({2}, element::i64, std::vector<int64_t>{0, 0}),
reference_tests::Tensor({2, 6}, IN_ET, std::vector<T>{1, 7, 2, 8, 3, 9, 4, 10, 5, 11, 6, 12}),
"input_with_shape_4x3"),
// input_with_shape_4x1x1x3
BatchToSpaceParams(
Tensor({4, 1, 1, 3}, IN_ET, std::vector<T>{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}),
Tensor({4}, element::i64, std::vector<int64_t>{1, 1, 1, 2}),
Tensor({4}, element::i64, std::vector<int64_t>{0, 0, 0, 0}),
Tensor({4}, element::i64, std::vector<int64_t>{0, 0, 0, 0}),
Tensor({2, 1, 1, 6}, IN_ET, std::vector<T>{1, 7, 2, 8, 3, 9, 4, 10, 5, 11, 6, 12}),
reference_tests::Tensor({4, 1, 1, 3}, IN_ET, std::vector<T>{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}),
reference_tests::Tensor({4}, element::i64, std::vector<int64_t>{1, 1, 1, 2}),
reference_tests::Tensor({4}, element::i64, std::vector<int64_t>{0, 0, 0, 0}),
reference_tests::Tensor({4}, element::i64, std::vector<int64_t>{0, 0, 0, 0}),
reference_tests::Tensor({2, 1, 1, 6}, IN_ET, std::vector<T>{1, 7, 2, 8, 3, 9, 4, 10, 5, 11, 6, 12}),
"input_with_shape_4x1x1x3"),
// input_with_shape_4x1x1x3_1
BatchToSpaceParams(
Tensor({4, 1, 1, 3}, IN_ET, std::vector<T>{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}),
Tensor({4}, element::i64, std::vector<int64_t>{1, 1, 2, 1}),
Tensor({4}, element::i64, std::vector<int64_t>{0, 0, 0, 0}),
Tensor({4}, element::i64, std::vector<int64_t>{0, 0, 0, 0}),
Tensor({2, 1, 2, 3}, IN_ET, std::vector<T>{1, 2, 3, 7, 8, 9, 4, 5, 6, 10, 11, 12}),
reference_tests::Tensor({4, 1, 1, 3}, IN_ET, std::vector<T>{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}),
reference_tests::Tensor({4}, element::i64, std::vector<int64_t>{1, 1, 2, 1}),
reference_tests::Tensor({4}, element::i64, std::vector<int64_t>{0, 0, 0, 0}),
reference_tests::Tensor({4}, element::i64, std::vector<int64_t>{0, 0, 0, 0}),
reference_tests::Tensor({2, 1, 2, 3}, IN_ET, std::vector<T>{1, 2, 3, 7, 8, 9, 4, 5, 6, 10, 11, 12}),
"input_with_shape_4x1x1x3_1"),
// input_with_shape_4x1x1x3_2
BatchToSpaceParams(
Tensor({4, 1, 1, 3}, IN_ET, std::vector<T>{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}),
Tensor({4}, element::i64, std::vector<int64_t>{1, 1, 2, 2}),
Tensor({4}, element::i64, std::vector<int64_t>{0, 0, 0, 0}),
Tensor({4}, element::i64, std::vector<int64_t>{0, 0, 0, 0}),
Tensor({2, 1, 1, 6}, IN_ET, std::vector<T>{1, 4, 2, 5, 3, 6, 7, 10, 8, 11, 9, 12}),
reference_tests::Tensor({4, 1, 1, 3}, IN_ET, std::vector<T>{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}),
reference_tests::Tensor({4}, element::i64, std::vector<int64_t>{1, 1, 2, 2}),
reference_tests::Tensor({4}, element::i64, std::vector<int64_t>{0, 0, 0, 0}),
reference_tests::Tensor({4}, element::i64, std::vector<int64_t>{0, 0, 0, 0}),
reference_tests::Tensor({2, 1, 1, 6}, IN_ET, std::vector<T>{1, 4, 2, 5, 3, 6, 7, 10, 8, 11, 9, 12}),
"input_with_shape_4x1x1x3_2"),
// input_with_shape_4x1x2x3
BatchToSpaceParams(
Tensor({4, 1, 2, 3}, IN_ET, std::vector<T>{1, 2, 3, 4, 5, 6,
reference_tests::Tensor({4, 1, 2, 3}, IN_ET, std::vector<T>{1, 2, 3, 4, 5, 6,
7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18,
19, 20, 21, 22, 23, 24}),
Tensor({4}, element::i64, std::vector<int64_t>{1, 1, 1, 2}),
Tensor({4}, element::i64, std::vector<int64_t>{0, 0, 0, 0}),
Tensor({4}, element::i64, std::vector<int64_t>{0, 0, 0, 0}),
Tensor({2, 1, 2, 6}, IN_ET, std::vector<T>{1, 13, 2, 14, 3, 15,
reference_tests::Tensor({4}, element::i64, std::vector<int64_t>{1, 1, 1, 2}),
reference_tests::Tensor({4}, element::i64, std::vector<int64_t>{0, 0, 0, 0}),
reference_tests::Tensor({4}, element::i64, std::vector<int64_t>{0, 0, 0, 0}),
reference_tests::Tensor({2, 1, 2, 6}, IN_ET, std::vector<T>{1, 13, 2, 14, 3, 15,
4, 16, 5, 17, 6, 18,
7, 19, 8, 20, 9, 21,
10, 22, 11, 23, 12, 24}),
"input_with_shape_4x1x2x3"),
// input_with_shape_4x1x2x3_1
BatchToSpaceParams(
Tensor({4, 1, 2, 3}, IN_ET, std::vector<T>{1, 2, 3, 4, 5, 6,
reference_tests::Tensor({4, 1, 2, 3}, IN_ET, std::vector<T>{1, 2, 3, 4, 5, 6,
7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18,
19, 20, 21, 22, 23, 24}),
Tensor({4}, element::i64, std::vector<int64_t>{1, 1, 2, 1}),
Tensor({4}, element::i64, std::vector<int64_t>{0, 0, 0, 0}),
Tensor({4}, element::i64, std::vector<int64_t>{0, 0, 0, 0}),
Tensor({2, 1, 4, 3}, IN_ET, std::vector<T>{1, 2, 3, 13, 14, 15,
reference_tests::Tensor({4}, element::i64, std::vector<int64_t>{1, 1, 2, 1}),
reference_tests::Tensor({4}, element::i64, std::vector<int64_t>{0, 0, 0, 0}),
reference_tests::Tensor({4}, element::i64, std::vector<int64_t>{0, 0, 0, 0}),
reference_tests::Tensor({2, 1, 4, 3}, IN_ET, std::vector<T>{1, 2, 3, 13, 14, 15,
4, 5, 6, 16, 17, 18,
7, 8, 9, 19, 20, 21,
10, 11, 12, 22, 23, 24}),
"input_with_shape_4x1x2x3_1"),
// input_with_shape_4x1x2x3_2
BatchToSpaceParams(
Tensor({4, 1, 2, 3}, IN_ET, std::vector<T>{1, 2, 3, 4, 5, 6,
reference_tests::Tensor({4, 1, 2, 3}, IN_ET, std::vector<T>{1, 2, 3, 4, 5, 6,
7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18,
19, 20, 21, 22, 23, 24}),
Tensor({4}, element::i64, std::vector<int64_t>{1, 1, 2, 2}),
Tensor({4}, element::i64, std::vector<int64_t>{0, 0, 0, 0}),
Tensor({4}, element::i64, std::vector<int64_t>{0, 0, 0, 0}),
Tensor({1, 1, 4, 6}, IN_ET, std::vector<T>{1, 7, 2, 8, 3, 9,
reference_tests::Tensor({4}, element::i64, std::vector<int64_t>{1, 1, 2, 2}),
reference_tests::Tensor({4}, element::i64, std::vector<int64_t>{0, 0, 0, 0}),
reference_tests::Tensor({4}, element::i64, std::vector<int64_t>{0, 0, 0, 0}),
reference_tests::Tensor({1, 1, 4, 6}, IN_ET, std::vector<T>{1, 7, 2, 8, 3, 9,
13, 19, 14, 20, 15, 21,
4, 10, 5, 11, 6, 12,
16, 22, 17, 23, 18, 24}),
@ -156,38 +156,38 @@ std::vector<BatchToSpaceParams> generateBatchToSpaceParams() {
// input_with_shape_with_crop_4x1x2x3
BatchToSpaceParams(
Tensor({4, 1, 2, 3}, IN_ET, std::vector<T>{1, 2, 3, 4, 5, 6,
reference_tests::Tensor({4, 1, 2, 3}, IN_ET, std::vector<T>{1, 2, 3, 4, 5, 6,
7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18,
19, 20, 21, 22, 23, 24}),
Tensor({4}, element::i64, std::vector<int64_t>{1, 1, 2, 2}),
Tensor({4}, element::i64, std::vector<int64_t>{0, 0, 0, 0}),
Tensor({4}, element::i64, std::vector<int64_t>{0, 0, 0, 2}),
Tensor({1, 1, 4, 4}, IN_ET, std::vector<T>{1, 7, 2, 8, 13, 19, 14, 20,
reference_tests::Tensor({4}, element::i64, std::vector<int64_t>{1, 1, 2, 2}),
reference_tests::Tensor({4}, element::i64, std::vector<int64_t>{0, 0, 0, 0}),
reference_tests::Tensor({4}, element::i64, std::vector<int64_t>{0, 0, 0, 2}),
reference_tests::Tensor({1, 1, 4, 4}, IN_ET, std::vector<T>{1, 7, 2, 8, 13, 19, 14, 20,
4, 10, 5, 11, 16, 22, 17, 23}),
"input_with_shape_with_crop_4x1x2x3"),
// input_with_shape_with_crop_4x1x2x3_1
BatchToSpaceParams(
Tensor({4, 1, 2, 3}, IN_ET, std::vector<T>{1, 2, 3, 4, 5, 6,
reference_tests::Tensor({4, 1, 2, 3}, IN_ET, std::vector<T>{1, 2, 3, 4, 5, 6,
7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18,
19, 20, 21, 22, 23, 24}),
Tensor({4}, element::i64, std::vector<int64_t>{1, 1, 2, 2}),
Tensor({4}, element::i64, std::vector<int64_t>{0, 0, 0, 2}),
Tensor({4}, element::i64, std::vector<int64_t>{0, 0, 0, 0}),
Tensor({1, 1, 4, 4}, IN_ET, std::vector<T>{2, 8, 3, 9, 14, 20, 15, 21,
reference_tests::Tensor({4}, element::i64, std::vector<int64_t>{1, 1, 2, 2}),
reference_tests::Tensor({4}, element::i64, std::vector<int64_t>{0, 0, 0, 2}),
reference_tests::Tensor({4}, element::i64, std::vector<int64_t>{0, 0, 0, 0}),
reference_tests::Tensor({1, 1, 4, 4}, IN_ET, std::vector<T>{2, 8, 3, 9, 14, 20, 15, 21,
5, 11, 6, 12, 17, 23, 18, 24}),
"input_with_shape_with_crop_4x1x2x3_1"),
// input_with_shape_with_crop_4x1x2x3_2
BatchToSpaceParams(
Tensor({4, 1, 2, 3}, IN_ET, std::vector<T>{1, 2, 3, 4, 5, 6,
reference_tests::Tensor({4, 1, 2, 3}, IN_ET, std::vector<T>{1, 2, 3, 4, 5, 6,
7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18,
19, 20, 21, 22, 23, 24}),
Tensor({4}, element::i64, std::vector<int64_t>{1, 1, 2, 2}),
Tensor({4}, element::i64, std::vector<int64_t>{0, 0, 1, 0}),
Tensor({4}, element::i64, std::vector<int64_t>{0, 0, 1, 0}),
Tensor({1, 1, 2, 6}, IN_ET, std::vector<T>{13, 19, 14, 20, 15, 21,
reference_tests::Tensor({4}, element::i64, std::vector<int64_t>{1, 1, 2, 2}),
reference_tests::Tensor({4}, element::i64, std::vector<int64_t>{0, 0, 1, 0}),
reference_tests::Tensor({4}, element::i64, std::vector<int64_t>{0, 0, 1, 0}),
reference_tests::Tensor({1, 1, 2, 6}, IN_ET, std::vector<T>{13, 19, 14, 20, 15, 21,
4, 10, 5, 11, 6, 12}),
"input_with_shape_with_crop_4x1x2x3_2"),
};

View File

@ -47,9 +47,9 @@ struct BinaryConvolutionParams {
PartialShape outputShape;
ov::element::Type inType;
ov::element::Type outType;
ov::runtime::Tensor inputData;
ov::Tensor inputData;
std::vector<uint8_t> filterData;
ov::runtime::Tensor refData;
ov::Tensor refData;
ov::Strides strides;
ov::CoordinateDiff padBegin;
ov::CoordinateDiff padEnd;

View File

@ -14,14 +14,14 @@ using namespace ov;
namespace {
struct BroadcastParams {
BroadcastParams(
const Tensor& dataTensor, const Tensor& targetShapeTensor,
const Tensor& expectedTensor, const std::string& testcaseName = "") :
const reference_tests::Tensor& dataTensor, const reference_tests::Tensor& targetShapeTensor,
const reference_tests::Tensor& expectedTensor, const std::string& testcaseName = "") :
dataTensor(dataTensor), targetShapeTensor(targetShapeTensor),
expectedTensor(expectedTensor), testcaseName(testcaseName) {}
Tensor dataTensor;
Tensor targetShapeTensor;
Tensor expectedTensor;
reference_tests::Tensor dataTensor;
reference_tests::Tensor targetShapeTensor;
reference_tests::Tensor expectedTensor;
std::string testcaseName;
};
@ -86,12 +86,13 @@ TEST_P(ReferenceBroadcastTestV3, CompareWithRefs) {
struct BroadcastParamsExplicitAxis : BroadcastParams {
BroadcastParamsExplicitAxis(
const Tensor& dataTensor, const Tensor& targetShapeTensor, const Tensor& axesMappingTensor,
const Tensor& expectedTensor, const std::string& testcaseName = "") :
const reference_tests::Tensor& dataTensor, const reference_tests::Tensor& targetShapeTensor,
const reference_tests::Tensor& axesMappingTensor, const reference_tests::Tensor& expectedTensor,
const std::string& testcaseName = "") :
BroadcastParams(dataTensor, targetShapeTensor, expectedTensor, testcaseName),
axesMappingTensor(axesMappingTensor) {}
Tensor axesMappingTensor;
reference_tests::Tensor axesMappingTensor;
};
class ReferenceBroadcastTestExplicitAxis : public testing::TestWithParam<BroadcastParamsExplicitAxis>, public CommonReferenceTest {
@ -253,29 +254,29 @@ std::vector<BroadcastParams> generateParams() {
using T = typename element_type_traits<ET>::value_type;
std::vector<BroadcastParams> params {
BroadcastParams(
Tensor(ET, {}, std::vector<T>{6}),
Tensor(element::u64, {1}, std::vector<uint64_t>{4}),
Tensor(ET, {4}, std::vector<T>{6, 6, 6, 6}),
reference_tests::Tensor(ET, {}, std::vector<T>{6}),
reference_tests::Tensor(element::u64, {1}, std::vector<uint64_t>{4}),
reference_tests::Tensor(ET, {4}, std::vector<T>{6, 6, 6, 6}),
"broadcast_scalar_vector"),
BroadcastParams(
Tensor(ET, {}, std::vector<T>{6}),
Tensor(element::u64, {2}, std::vector<uint64_t>{2, 2}),
Tensor(ET, {2, 2}, std::vector<T>{6, 6, 6, 6}),
reference_tests::Tensor(ET, {}, std::vector<T>{6}),
reference_tests::Tensor(element::u64, {2}, std::vector<uint64_t>{2, 2}),
reference_tests::Tensor(ET, {2, 2}, std::vector<T>{6, 6, 6, 6}),
"broadcast_scalar_matrix"),
BroadcastParams(
Tensor(ET, {}, std::vector<T>{6}),
Tensor(element::u64, {3}, std::vector<uint64_t>{2, 2, 2}),
Tensor(ET, {2, 2, 2}, std::vector<T>{6, 6, 6, 6, 6, 6, 6, 6}),
reference_tests::Tensor(ET, {}, std::vector<T>{6}),
reference_tests::Tensor(element::u64, {3}, std::vector<uint64_t>{2, 2, 2}),
reference_tests::Tensor(ET, {2, 2, 2}, std::vector<T>{6, 6, 6, 6, 6, 6, 6, 6}),
"broadcast_scalar_tensor"),
BroadcastParams(
Tensor(ET, {2, 2, 2}, std::vector<T>{2, 4, 6, 8, 16, 32, 64, 127}),
Tensor(element::u64, {3}, std::vector<uint64_t>{2, 2, 2}),
Tensor(ET, {2, 2, 2}, std::vector<T>{2, 4, 6, 8, 16, 32, 64, 127}),
reference_tests::Tensor(ET, {2, 2, 2}, std::vector<T>{2, 4, 6, 8, 16, 32, 64, 127}),
reference_tests::Tensor(element::u64, {3}, std::vector<uint64_t>{2, 2, 2}),
reference_tests::Tensor(ET, {2, 2, 2}, std::vector<T>{2, 4, 6, 8, 16, 32, 64, 127}),
"broadcast_trivial"),
BroadcastParams(
Tensor(ET, {2, 2}, std::vector<T>{1, 2, 3, 4}),
Tensor(element::u64, {3}, std::vector<uint64_t>{2, 2, 2}),
Tensor(ET, {2, 2, 2}, std::vector<T>{1, 2, 3, 4, 1, 2, 3, 4}),
reference_tests::Tensor(ET, {2, 2}, std::vector<T>{1, 2, 3, 4}),
reference_tests::Tensor(element::u64, {3}, std::vector<uint64_t>{2, 2, 2}),
reference_tests::Tensor(ET, {2, 2, 2}, std::vector<T>{1, 2, 3, 4, 1, 2, 3, 4}),
"broadcast_matrix_0"),
};
return params;
@ -315,40 +316,40 @@ std::vector<BroadcastParamsExplicitAxis> generateParamsExplicitAxis() {
using T = typename element_type_traits<ET>::value_type;
std::vector<BroadcastParamsExplicitAxis> params {
BroadcastParamsExplicitAxis(
Tensor(ET, {}, std::vector<T>{6}),
Tensor(element::u64, {2}, std::vector<uint64_t>{1, 2}),
Tensor(element::i64, {1}, std::vector<int64_t>{0}),
Tensor(ET, {1, 2}, std::vector<T>{6, 6}),
reference_tests::Tensor(ET, {}, std::vector<T>{6}),
reference_tests::Tensor(element::u64, {2}, std::vector<uint64_t>{1, 2}),
reference_tests::Tensor(element::i64, {1}, std::vector<int64_t>{0}),
reference_tests::Tensor(ET, {1, 2}, std::vector<T>{6, 6}),
"broadcast_scalar_vector_explicit_axis_0"),
BroadcastParamsExplicitAxis(
Tensor(ET, {3}, std::vector<T>{1, 2, 3}),
Tensor(element::u64, {2}, std::vector<uint64_t>{3, 4}),
Tensor(element::i64, {1}, std::vector<int64_t>{0}),
Tensor(ET, {3, 4}, std::vector<T>{1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3}),
reference_tests::Tensor(ET, {3}, std::vector<T>{1, 2, 3}),
reference_tests::Tensor(element::u64, {2}, std::vector<uint64_t>{3, 4}),
reference_tests::Tensor(element::i64, {1}, std::vector<int64_t>{0}),
reference_tests::Tensor(ET, {3, 4}, std::vector<T>{1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3}),
"broadcast_vector_colwise"),
BroadcastParamsExplicitAxis(
Tensor(ET, {4}, std::vector<T>{1, 2, 3, 4}),
Tensor(element::u64, {2}, std::vector<uint64_t>{3, 4}),
Tensor(element::i64, {1}, std::vector<int64_t>{1}),
Tensor(ET, {3, 4}, std::vector<T>{1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4}),
reference_tests::Tensor(ET, {4}, std::vector<T>{1, 2, 3, 4}),
reference_tests::Tensor(element::u64, {2}, std::vector<uint64_t>{3, 4}),
reference_tests::Tensor(element::i64, {1}, std::vector<int64_t>{1}),
reference_tests::Tensor(ET, {3, 4}, std::vector<T>{1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4}),
"broadcast_vector_rowwise"),
BroadcastParamsExplicitAxis(
Tensor(ET, {1}, std::vector<T>{4}),
Tensor(element::u64, {2}, std::vector<uint64_t>{3, 1}),
Tensor(element::i64, {1}, std::vector<int64_t>{1}),
Tensor(ET, {3, 1}, std::vector<T>{4, 4, 4}),
reference_tests::Tensor(ET, {1}, std::vector<T>{4}),
reference_tests::Tensor(element::u64, {2}, std::vector<uint64_t>{3, 1}),
reference_tests::Tensor(element::i64, {1}, std::vector<int64_t>{1}),
reference_tests::Tensor(ET, {3, 1}, std::vector<T>{4, 4, 4}),
"broadcast_scalar_to_matrix"),
BroadcastParamsExplicitAxis(
Tensor(ET, {2, 2}, std::vector<T>{1, 2, 3, 4}),
Tensor(element::u64, {3}, std::vector<uint64_t>{2, 2, 2}),
Tensor(element::i64, {2}, std::vector<int64_t>{0, 2}),
Tensor(ET, {2, 2, 2}, std::vector<T>{1, 2, 1, 2, 3, 4, 3, 4}),
reference_tests::Tensor(ET, {2, 2}, std::vector<T>{1, 2, 3, 4}),
reference_tests::Tensor(element::u64, {3}, std::vector<uint64_t>{2, 2, 2}),
reference_tests::Tensor(element::i64, {2}, std::vector<int64_t>{0, 2}),
reference_tests::Tensor(ET, {2, 2, 2}, std::vector<T>{1, 2, 1, 2, 3, 4, 3, 4}),
"broadcast_matrix_1"),
BroadcastParamsExplicitAxis(
Tensor(ET, {2, 2}, std::vector<T>{1, 2, 3, 4}),
Tensor(element::u64, {3}, std::vector<uint64_t>{2, 2, 2}),
Tensor(element::i64, {2}, std::vector<int64_t>{0, 1}),
Tensor(ET, {2, 2, 2}, std::vector<T>{1, 1, 2, 2, 3, 3, 4, 4}),
reference_tests::Tensor(ET, {2, 2}, std::vector<T>{1, 2, 3, 4}),
reference_tests::Tensor(element::u64, {3}, std::vector<uint64_t>{2, 2, 2}),
reference_tests::Tensor(element::i64, {2}, std::vector<int64_t>{0, 1}),
reference_tests::Tensor(ET, {2, 2, 2}, std::vector<T>{1, 1, 2, 2, 3, 3, 4, 4}),
"broadcast_matrix_2"),
};
return params;
@ -491,10 +492,10 @@ std::vector<BroadcastParamsExplicitAxis> generateParamsExplicitAxisReversed() {
using T = typename element_type_traits<ET>::value_type;
std::vector<BroadcastParamsExplicitAxis> params {
BroadcastParamsExplicitAxis(
Tensor(ET, {4}, std::vector<T>{1, 2, 3, 4}),
Tensor(element::u64, {2}, std::vector<uint64_t>{3, 4}),
Tensor(element::i64, {1}, std::vector<int64_t>{1}),
Tensor(ET, {3, 4}, std::vector<T>{1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4}),
reference_tests::Tensor(ET, {4}, std::vector<T>{1, 2, 3, 4}),
reference_tests::Tensor(element::u64, {2}, std::vector<uint64_t>{3, 4}),
reference_tests::Tensor(element::i64, {1}, std::vector<int64_t>{1}),
reference_tests::Tensor(ET, {3, 4}, std::vector<T>{1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4}),
"broadcast_vector_rowwise_reversed"),
};
return params;

View File

@ -27,13 +27,13 @@ struct BucketizeParams {
element::Type input_type;
PartialShape input_pshape;
runtime::Tensor input;
ov::Tensor input;
element::Type bucket_type;
PartialShape bucket_pshape;
runtime::Tensor buckets;
ov::Tensor buckets;
bool with_right_bound;
element::Type output_type;
runtime::Tensor expected_output;
ov::Tensor expected_output;
};
class ReferenceBucketizeLayerTest : public testing::TestWithParam<BucketizeParams>, public CommonReferenceTest {

View File

@ -26,8 +26,8 @@ struct CeilingParams {
PartialShape pshape;
element::Type inType;
element::Type outType;
runtime::Tensor inputData;
runtime::Tensor refData;
ov::Tensor inputData;
ov::Tensor refData;
};
class ReferenceCeilingLayerTest : public testing::TestWithParam<CeilingParams>, public CommonReferenceTest {

View File

@ -29,8 +29,8 @@ struct ClampParams {
ov::PartialShape pshape;
ov::element::Type inType;
ov::element::Type outType;
ov::runtime::Tensor inputData;
ov::runtime::Tensor refData;
ov::Tensor inputData;
ov::Tensor refData;
};
class ReferenceClampLayerTest : public testing::TestWithParam<ClampParams>, public CommonReferenceTest {

View File

@ -14,9 +14,9 @@ namespace ComparisonOpsRefTestDefinitions {
struct RefComparisonParams {
ngraph::helpers::ComparisonTypes compType;
Tensor input1;
Tensor input2;
Tensor expected;
reference_tests::Tensor input1;
reference_tests::Tensor input2;
reference_tests::Tensor expected;
};
struct Builder : ParamsBuilder<RefComparisonParams> {

View File

@ -14,16 +14,17 @@ namespace {
struct ConcatParams {
ConcatParams(
const PartialShape& dynamicShape,
const Tensor& A, const Tensor& B, const Tensor& C, const int32_t axis,
const Tensor& expected, const std::string& testcaseName = "") :
const reference_tests::Tensor& A, const reference_tests::Tensor& B,
const reference_tests::Tensor& C, const int32_t axis,
const reference_tests::Tensor& expected, const std::string& testcaseName = "") :
dynamicShape(dynamicShape), A(A), B(B), C(C), axis(axis), expected(expected), testcaseName(testcaseName) {}
PartialShape dynamicShape;
Tensor A;
Tensor B;
Tensor C;
reference_tests::Tensor A;
reference_tests::Tensor B;
reference_tests::Tensor C;
int32_t axis;
Tensor expected;
reference_tests::Tensor expected;
std::string testcaseName;
};
@ -84,51 +85,51 @@ std::vector<ConcatParams> generateParams() {
std::vector<ConcatParams> params {
ConcatParams(
PartialShape::dynamic(),
Tensor(ET, {2, 2}, std::vector<T>{2, 4, 8, 16}),
Tensor(ET, {2, 3}, std::vector<T>{1, 2, 4, 8, 16, 32}),
Tensor(ET, {2, 3}, std::vector<T>{2, 3, 5, 7, 11, 13}),
reference_tests::Tensor(ET, {2, 2}, std::vector<T>{2, 4, 8, 16}),
reference_tests::Tensor(ET, {2, 3}, std::vector<T>{1, 2, 4, 8, 16, 32}),
reference_tests::Tensor(ET, {2, 3}, std::vector<T>{2, 3, 5, 7, 11, 13}),
-1,
Tensor(ET, {2, 8}, std::vector<T>{2, 4, 1, 2, 4, 2, 3, 5, 8, 16, 8, 16, 32, 7, 11, 13}),
reference_tests::Tensor(ET, {2, 8}, std::vector<T>{2, 4, 1, 2, 4, 2, 3, 5, 8, 16, 8, 16, 32, 7, 11, 13}),
"concat_negative_axis"),
ConcatParams(
{},
Tensor(ET, {2, 2}, std::vector<T>{2, 4, 8, 16}),
Tensor(ET, {2, 3}, std::vector<T>{1, 2, 4, 8, 16, 32}),
Tensor(ET, {2, 3}, std::vector<T>{2, 3, 5, 7, 11, 13}),
reference_tests::Tensor(ET, {2, 2}, std::vector<T>{2, 4, 8, 16}),
reference_tests::Tensor(ET, {2, 3}, std::vector<T>{1, 2, 4, 8, 16, 32}),
reference_tests::Tensor(ET, {2, 3}, std::vector<T>{2, 3, 5, 7, 11, 13}),
1,
Tensor(ET, {2, 8}, std::vector<T>{2, 4, 1, 2, 4, 2, 3, 5, 8, 16, 8, 16, 32, 7, 11, 13}),
reference_tests::Tensor(ET, {2, 8}, std::vector<T>{2, 4, 1, 2, 4, 2, 3, 5, 8, 16, 8, 16, 32, 7, 11, 13}),
"concat_matrix_colwise"),
ConcatParams(
{},
Tensor(ET, {2, 2}, std::vector<T>{2, 4, 8, 16}),
Tensor(ET, {3, 2}, std::vector<T>{1, 2, 4, 8, 16, 32}),
Tensor(ET, {3, 2}, std::vector<T>{2, 3, 5, 7, 11, 13}),
reference_tests::Tensor(ET, {2, 2}, std::vector<T>{2, 4, 8, 16}),
reference_tests::Tensor(ET, {3, 2}, std::vector<T>{1, 2, 4, 8, 16, 32}),
reference_tests::Tensor(ET, {3, 2}, std::vector<T>{2, 3, 5, 7, 11, 13}),
0,
Tensor(ET, {8, 2}, std::vector<T>{2, 4, 8, 16, 1, 2, 4, 8, 16, 32, 2, 3, 5, 7, 11, 13}),
reference_tests::Tensor(ET, {8, 2}, std::vector<T>{2, 4, 8, 16, 1, 2, 4, 8, 16, 32, 2, 3, 5, 7, 11, 13}),
"concat_matrix_rowwise"),
ConcatParams(
{},
Tensor(ET, {4}, std::vector<T>{2, 4, 8, 16}),
Tensor(ET, {6}, std::vector<T>{1, 2, 4, 8, 16, 32}),
Tensor(ET, {2}, std::vector<T>{18, 19}),
reference_tests::Tensor(ET, {4}, std::vector<T>{2, 4, 8, 16}),
reference_tests::Tensor(ET, {6}, std::vector<T>{1, 2, 4, 8, 16, 32}),
reference_tests::Tensor(ET, {2}, std::vector<T>{18, 19}),
0,
Tensor(ET, {12}, std::vector<T>{2, 4, 8, 16, 1, 2, 4, 8, 16, 32, 18, 19}),
reference_tests::Tensor(ET, {12}, std::vector<T>{2, 4, 8, 16, 1, 2, 4, 8, 16, 32, 18, 19}),
"concat_vector"),
ConcatParams(
{},
Tensor(ET, {1, 1, 1, 1}, std::vector<T>{1}),
Tensor(ET, {1, 1, 1, 1}, std::vector<T>{2}),
Tensor(ET, {1, 1, 1, 1}, std::vector<T>{3}),
reference_tests::Tensor(ET, {1, 1, 1, 1}, std::vector<T>{1}),
reference_tests::Tensor(ET, {1, 1, 1, 1}, std::vector<T>{2}),
reference_tests::Tensor(ET, {1, 1, 1, 1}, std::vector<T>{3}),
0,
Tensor(ET, {3, 1, 1, 1}, std::vector<T>{1, 2, 3}),
reference_tests::Tensor(ET, {3, 1, 1, 1}, std::vector<T>{1, 2, 3}),
"concat_4d_tensor"),
ConcatParams(
{},
Tensor(ET, {1, 1}, std::vector<T>{1}),
Tensor(ET, {1, 1}, std::vector<T>{2}),
Tensor(ET, {1, 1}, std::vector<T>{3}),
reference_tests::Tensor(ET, {1, 1}, std::vector<T>{1}),
reference_tests::Tensor(ET, {1, 1}, std::vector<T>{2}),
reference_tests::Tensor(ET, {1, 1}, std::vector<T>{3}),
0,
Tensor(ET, {3, 1}, std::vector<T>{1, 2, 3}),
reference_tests::Tensor(ET, {3, 1}, std::vector<T>{1, 2, 3}),
"concat_2d_tensor"),
};
return params;
@ -239,16 +240,16 @@ INSTANTIATE_TEST_SUITE_P(smoke_Concat_With_Hardcoded_Refs, ReferenceConcatTestVe
struct ConcatParamsInPlace2dTensor {
ConcatParamsInPlace2dTensor(
const Tensor& A, const Tensor& B, const Tensor& C, const Tensor& D, const int32_t axis,
const Tensor& expected, const std::string& testcaseName = "") :
const reference_tests::Tensor& A, const reference_tests::Tensor& B, const reference_tests::Tensor& C, const reference_tests::Tensor& D, const int32_t axis,
const reference_tests::Tensor& expected, const std::string& testcaseName = "") :
A(A), B(B), C(C), D(D), axis(axis), expected(expected), testcaseName(testcaseName) {}
Tensor A;
Tensor B;
Tensor C;
Tensor D;
reference_tests::Tensor A;
reference_tests::Tensor B;
reference_tests::Tensor C;
reference_tests::Tensor D;
int32_t axis;
Tensor expected;
reference_tests::Tensor expected;
std::string testcaseName;
};
@ -308,12 +309,12 @@ std::vector<ConcatParamsInPlace2dTensor> generateParamsInPlace2dTensor() {
using T = typename element_type_traits<ET>::value_type;
std::vector<ConcatParamsInPlace2dTensor> params {
ConcatParamsInPlace2dTensor(
Tensor(ET, {1, 1}, std::vector<T>{1}),
Tensor(ET, {1, 1}, std::vector<T>{2}),
Tensor(ET, {1, 1}, std::vector<T>{3}),
Tensor(ET, {1, 1}, std::vector<T>{4}),
reference_tests::Tensor(ET, {1, 1}, std::vector<T>{1}),
reference_tests::Tensor(ET, {1, 1}, std::vector<T>{2}),
reference_tests::Tensor(ET, {1, 1}, std::vector<T>{3}),
reference_tests::Tensor(ET, {1, 1}, std::vector<T>{4}),
0,
Tensor(ET, {3, 1}, std::vector<T>{3, 7, 2}),
reference_tests::Tensor(ET, {3, 1}, std::vector<T>{3, 7, 2}),
"concat_in_place_2d_tensor"),
};
return params;
@ -344,16 +345,16 @@ INSTANTIATE_TEST_SUITE_P(smoke_Concat_With_Hardcoded_Refs, ReferenceConcatTestIn
struct ConcatParamsInPlacePropagate2dTensor {
ConcatParamsInPlacePropagate2dTensor(
const Tensor& A, const Tensor& B, const Tensor& C, const Tensor& D, const int32_t axis,
const Tensor& expected, const std::string& testcaseName = "") :
const reference_tests::Tensor& A, const reference_tests::Tensor& B, const reference_tests::Tensor& C, const reference_tests::Tensor& D, const int32_t axis,
const reference_tests::Tensor& expected, const std::string& testcaseName = "") :
A(A), B(B), C(C), D(D), axis(axis), expected(expected), testcaseName(testcaseName) {}
Tensor A;
Tensor B;
Tensor C;
Tensor D;
reference_tests::Tensor A;
reference_tests::Tensor B;
reference_tests::Tensor C;
reference_tests::Tensor D;
int32_t axis;
Tensor expected;
reference_tests::Tensor expected;
std::string testcaseName;
};
@ -414,12 +415,12 @@ std::vector<ConcatParamsInPlacePropagate2dTensor> generateParamsInPlacePropagate
using T = typename element_type_traits<ET>::value_type;
std::vector<ConcatParamsInPlacePropagate2dTensor> params {
ConcatParamsInPlacePropagate2dTensor(
Tensor(ET, {1, 1}, std::vector<T>{1}),
Tensor(ET, {1, 1}, std::vector<T>{2}),
Tensor(ET, {1, 1}, std::vector<T>{3}),
Tensor(ET, {1, 1}, std::vector<T>{4}),
reference_tests::Tensor(ET, {1, 1}, std::vector<T>{1}),
reference_tests::Tensor(ET, {1, 1}, std::vector<T>{2}),
reference_tests::Tensor(ET, {1, 1}, std::vector<T>{3}),
reference_tests::Tensor(ET, {1, 1}, std::vector<T>{4}),
0,
Tensor(ET, {3, 1}, std::vector<T>{3, 7, 2}),
reference_tests::Tensor(ET, {3, 1}, std::vector<T>{3, 7, 2}),
"concat_in_place_2d_tensor"),
};
return params;
@ -450,14 +451,14 @@ INSTANTIATE_TEST_SUITE_P(smoke_Concat_With_Hardcoded_Refs, ReferenceConcatTestIn
struct ConcatParamsInPlaceTree1 {
ConcatParamsInPlaceTree1(
const Tensor& A, const Tensor& B, const int32_t axis,
const Tensor& expected, const std::string& testcaseName = "") :
const reference_tests::Tensor& A, const reference_tests::Tensor& B, const int32_t axis,
const reference_tests::Tensor& expected, const std::string& testcaseName = "") :
A(A), B(B), axis(axis), expected(expected), testcaseName(testcaseName) {}
Tensor A;
Tensor B;
reference_tests::Tensor A;
reference_tests::Tensor B;
int32_t axis;
Tensor expected;
reference_tests::Tensor expected;
std::string testcaseName;
};
@ -510,10 +511,10 @@ std::vector<ConcatParamsInPlaceTree1> generateParamsInPlaceTree1() {
using T = typename element_type_traits<ET>::value_type;
std::vector<ConcatParamsInPlaceTree1> params {
ConcatParamsInPlaceTree1(
Tensor(ET, {1, 2, 2}, std::vector<T>{1, 1, 1, 1}),
Tensor(ET, {1, 2, 2}, std::vector<T>{1, 1, 1, 1}),
reference_tests::Tensor(ET, {1, 2, 2}, std::vector<T>{1, 1, 1, 1}),
reference_tests::Tensor(ET, {1, 2, 2}, std::vector<T>{1, 1, 1, 1}),
1,
Tensor(ET, {1, 4, 2}, std::vector<T>{4, 4, 4, 4, 4, 4, 4, 4}),
reference_tests::Tensor(ET, {1, 4, 2}, std::vector<T>{4, 4, 4, 4, 4, 4, 4, 4}),
"concat_in_place_tree_1"),
};
return params;
@ -544,14 +545,14 @@ INSTANTIATE_TEST_SUITE_P(smoke_Concat_With_Hardcoded_Refs, ReferenceConcatTestIn
struct ConcatParamsInPlaceTree2 {
ConcatParamsInPlaceTree2(
const Tensor& A, const Tensor& B, const int32_t axis,
const Tensor& expected, const std::string& testcaseName = "") :
const reference_tests::Tensor& A, const reference_tests::Tensor& B, const int32_t axis,
const reference_tests::Tensor& expected, const std::string& testcaseName = "") :
A(A), B(B), axis(axis), expected(expected), testcaseName(testcaseName) {}
Tensor A;
Tensor B;
reference_tests::Tensor A;
reference_tests::Tensor B;
int32_t axis;
Tensor expected;
reference_tests::Tensor expected;
std::string testcaseName;
};
@ -606,10 +607,10 @@ std::vector<ConcatParamsInPlaceTree2> generateParamsInPlaceTree2() {
using T = typename element_type_traits<ET>::value_type;
std::vector<ConcatParamsInPlaceTree2> params {
ConcatParamsInPlaceTree2(
Tensor(ET, {1, 2, 2}, std::vector<T>{1, 1, 1, 1}),
Tensor(ET, {1, 2, 2}, std::vector<T>{1, 1, 1, 1}),
reference_tests::Tensor(ET, {1, 2, 2}, std::vector<T>{1, 1, 1, 1}),
reference_tests::Tensor(ET, {1, 2, 2}, std::vector<T>{1, 1, 1, 1}),
1,
Tensor(ET, {1, 8, 2}, std::vector<T>{4, 4, 4, 4, 4, 4, 4, 4,
reference_tests::Tensor(ET, {1, 8, 2}, std::vector<T>{4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4}),
"concat_in_place_tree_2"),
};
@ -641,14 +642,14 @@ INSTANTIATE_TEST_SUITE_P(smoke_Concat_With_Hardcoded_Refs, ReferenceConcatTestIn
struct ConcatParamsInPlaceTree3 {
ConcatParamsInPlaceTree3(
const Tensor& A, const Tensor& B, const int32_t axis,
const Tensor& expected, const std::string& testcaseName = "") :
const reference_tests::Tensor& A, const reference_tests::Tensor& B, const int32_t axis,
const reference_tests::Tensor& expected, const std::string& testcaseName = "") :
A(A), B(B), axis(axis), expected(expected), testcaseName(testcaseName) {}
Tensor A;
Tensor B;
reference_tests::Tensor A;
reference_tests::Tensor B;
int32_t axis;
Tensor expected;
reference_tests::Tensor expected;
std::string testcaseName;
};
@ -705,10 +706,10 @@ std::vector<ConcatParamsInPlaceTree3> generateParamsInPlaceTree3() {
using T = typename element_type_traits<ET>::value_type;
std::vector<ConcatParamsInPlaceTree3> params {
ConcatParamsInPlaceTree3(
Tensor(ET, {1, 2, 2}, std::vector<T>{1, 1, 1, 1}),
Tensor(ET, {1, 2, 2}, std::vector<T>{1, 1, 1, 1}),
reference_tests::Tensor(ET, {1, 2, 2}, std::vector<T>{1, 1, 1, 1}),
reference_tests::Tensor(ET, {1, 2, 2}, std::vector<T>{1, 1, 1, 1}),
1,
Tensor(ET, {1, 16, 2}, std::vector<T>{2, 2, 2, 2, 2, 2, 2, 2,
reference_tests::Tensor(ET, {1, 16, 2}, std::vector<T>{2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2}),
@ -742,14 +743,14 @@ INSTANTIATE_TEST_SUITE_P(smoke_Concat_With_Hardcoded_Refs, ReferenceConcatTestIn
struct ConcatParamsInPlaceAddConcat {
ConcatParamsInPlaceAddConcat(
const Tensor& A, const Tensor& B, const int32_t axis,
const Tensor& expected, const std::string& testcaseName = "") :
const reference_tests::Tensor& A, const reference_tests::Tensor& B, const int32_t axis,
const reference_tests::Tensor& expected, const std::string& testcaseName = "") :
A(A), B(B), axis(axis), expected(expected), testcaseName(testcaseName) {}
Tensor A;
Tensor B;
reference_tests::Tensor A;
reference_tests::Tensor B;
int32_t axis;
Tensor expected;
reference_tests::Tensor expected;
std::string testcaseName;
};
@ -802,10 +803,10 @@ std::vector<ConcatParamsInPlaceAddConcat> generateParamsInPlaceAddConcat() {
using T = typename element_type_traits<ET>::value_type;
std::vector<ConcatParamsInPlaceAddConcat> params {
ConcatParamsInPlaceAddConcat(
Tensor(ET, {2, 2}, std::vector<T>{1, 1, 1, 1}),
Tensor(ET, {2, 2}, std::vector<T>{1, 1, 1, 1}),
reference_tests::Tensor(ET, {2, 2}, std::vector<T>{1, 1, 1, 1}),
reference_tests::Tensor(ET, {2, 2}, std::vector<T>{1, 1, 1, 1}),
0,
Tensor(ET, {4, 2}, std::vector<T>{4, 4, 4, 4, 8, 8, 8, 8}),
reference_tests::Tensor(ET, {4, 2}, std::vector<T>{4, 4, 4, 4, 8, 8, 8, 8}),
"concat_in_place_add_concat"),
};
return params;
@ -836,14 +837,14 @@ INSTANTIATE_TEST_SUITE_P(smoke_Concat_With_Hardcoded_Refs, ReferenceConcatTestIn
struct ConcatParamsInPlaceAddConcat2 {
ConcatParamsInPlaceAddConcat2(
const Tensor& A, const Tensor& B, const int32_t axis,
const Tensor& expected, const std::string& testcaseName = "") :
const reference_tests::Tensor& A, const reference_tests::Tensor& B, const int32_t axis,
const reference_tests::Tensor& expected, const std::string& testcaseName = "") :
A(A), B(B), axis(axis), expected(expected), testcaseName(testcaseName) {}
Tensor A;
Tensor B;
reference_tests::Tensor A;
reference_tests::Tensor B;
int32_t axis;
Tensor expected;
reference_tests::Tensor expected;
std::string testcaseName;
};
@ -900,10 +901,10 @@ std::vector<ConcatParamsInPlaceAddConcat2> generateParamsInPlaceAddConcat2() {
using T = typename element_type_traits<ET>::value_type;
std::vector<ConcatParamsInPlaceAddConcat2> params {
ConcatParamsInPlaceAddConcat2(
Tensor(ET, {1, 2, 2}, std::vector<T>{1, 1, 1, 1}),
Tensor(ET, {1, 2, 2}, std::vector<T>{1, 1, 1, 1}),
reference_tests::Tensor(ET, {1, 2, 2}, std::vector<T>{1, 1, 1, 1}),
reference_tests::Tensor(ET, {1, 2, 2}, std::vector<T>{1, 1, 1, 1}),
1,
Tensor(ET, {1, 6, 2}, std::vector<T>{4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}),
reference_tests::Tensor(ET, {1, 6, 2}, std::vector<T>{4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}),
"concat_in_place_add_concat_2"),
};
return params;
@ -934,15 +935,15 @@ INSTANTIATE_TEST_SUITE_P(smoke_Concat_With_Hardcoded_Refs, ReferenceConcatTestIn
struct ConcatParams5d {
ConcatParams5d(
const Tensor& A, const Tensor& B, const Tensor& C, const int32_t axis,
const Tensor& expected, const std::string& testcaseName = "") :
const reference_tests::Tensor& A, const reference_tests::Tensor& B, const reference_tests::Tensor& C, const int32_t axis,
const reference_tests::Tensor& expected, const std::string& testcaseName = "") :
A(A), B(B), C(C), axis(axis), expected(expected), testcaseName(testcaseName) {}
Tensor A;
Tensor B;
Tensor C;
reference_tests::Tensor A;
reference_tests::Tensor B;
reference_tests::Tensor C;
int32_t axis;
Tensor expected;
reference_tests::Tensor expected;
std::string testcaseName;
};
@ -995,27 +996,27 @@ std::vector<ConcatParams5d> generateParams5d() {
using T = typename element_type_traits<ET>::value_type;
std::vector<ConcatParams5d> params {
ConcatParams5d(
Tensor(ET, {2, 3, 4, 3, 2}, []() -> std::vector<T> {
reference_tests::Tensor(ET, {2, 3, 4, 3, 2}, []() -> std::vector<T> {
std::vector<T> data(2 * 3 * 4 * 3 * 2);
for (int i = 0; i < 2 * 3 * 4 * 3 * 2; i++) {
data[i] = static_cast<T>(i + 1);
}
return data;
}()),
Tensor(ET, {2, 3, 3, 3, 2}, []() -> std::vector<T> {
reference_tests::Tensor(ET, {2, 3, 3, 3, 2}, []() -> std::vector<T> {
std::vector<T> data(2 * 3 * 3 * 3 * 2);
for (int i = 0; i < 2 * 3 * 3 * 3 * 2; i++) {
data[i] = 1000 + static_cast<T>(i + 1);
}
return data;}()),
Tensor(ET, {2, 3, 2, 3, 2}, []() -> std::vector<T> {
reference_tests::Tensor(ET, {2, 3, 2, 3, 2}, []() -> std::vector<T> {
std::vector<T> data(2 * 3 * 2 * 3 * 2);
for (int i = 0; i < 2 * 3 * 2 * 3 * 2; i++) {
data[i] = 2000 + static_cast<T>(i + 1);
}
return data;}()),
2,
Tensor(ET, {2, 3, 9, 3, 2}, std::vector<T>{
reference_tests::Tensor(ET, {2, 3, 9, 3, 2}, std::vector<T>{
1., 2., 3., 4., 5., 6., 7., 8., 9., 10., 11., 12., 13., 14., 15.,
16., 17., 18., 19., 20., 21., 22., 23., 24., 1001., 1002., 1003., 1004., 1005., 1006.,
1007., 1008., 1009., 1010., 1011., 1012., 1013., 1014., 1015., 1016., 1017., 1018., 2001., 2002., 2003.,
@ -1064,14 +1065,14 @@ INSTANTIATE_TEST_SUITE_P(smoke_Concat_With_Hardcoded_Refs, ReferenceConcatTest5d
struct ConcatParamsZeroLength1dLast {
ConcatParamsZeroLength1dLast(
const Tensor& A, const Tensor& B, const int32_t axis,
const Tensor& expected, const std::string& testcaseName = "") :
const reference_tests::Tensor& A, const reference_tests::Tensor& B, const int32_t axis,
const reference_tests::Tensor& expected, const std::string& testcaseName = "") :
A(A), B(B), axis(axis), expected(expected), testcaseName(testcaseName) {}
Tensor A;
Tensor B;
reference_tests::Tensor A;
reference_tests::Tensor B;
int32_t axis;
Tensor expected;
reference_tests::Tensor expected;
std::string testcaseName;
};
@ -1121,10 +1122,10 @@ std::vector<ConcatParamsZeroLength1dLast> generateParamsZeroLength1dLast() {
using T = typename element_type_traits<ET>::value_type;
std::vector<ConcatParamsZeroLength1dLast> params {
ConcatParamsZeroLength1dLast(
Tensor(ET, {4}, std::vector<T>{1, 2, 3, 4}),
Tensor(ET, {0}, std::vector<T>{0}),
reference_tests::Tensor(ET, {4}, std::vector<T>{1, 2, 3, 4}),
reference_tests::Tensor(ET, {0}, std::vector<T>{0}),
0,
Tensor(ET, {4}, std::vector<T>{1, 2, 3, 4}),
reference_tests::Tensor(ET, {4}, std::vector<T>{1, 2, 3, 4}),
"concat_zero_length_1d_last"),
};
return params;
@ -1155,15 +1156,15 @@ INSTANTIATE_TEST_SUITE_P(smoke_Concat_With_Hardcoded_Refs, ReferenceConcatTestZe
struct ConcatParamsZeroLength1dMiddle {
ConcatParamsZeroLength1dMiddle(
const Tensor& A, const Tensor& B, const Tensor& C, const int32_t axis,
const Tensor& expected, const std::string& testcaseName = "") :
const reference_tests::Tensor& A, const reference_tests::Tensor& B, const reference_tests::Tensor& C, const int32_t axis,
const reference_tests::Tensor& expected, const std::string& testcaseName = "") :
A(A), B(B), C(C), axis(axis), expected(expected), testcaseName(testcaseName) {}
Tensor A;
Tensor B;
Tensor C;
reference_tests::Tensor A;
reference_tests::Tensor B;
reference_tests::Tensor C;
int32_t axis;
Tensor expected;
reference_tests::Tensor expected;
std::string testcaseName;
};
@ -1216,11 +1217,11 @@ std::vector<ConcatParamsZeroLength1dMiddle> generateParamsZeroLength1dMiddle() {
using T = typename element_type_traits<ET>::value_type;
std::vector<ConcatParamsZeroLength1dMiddle> params {
ConcatParamsZeroLength1dMiddle(
Tensor(ET, {4}, std::vector<T>{1, 2, 3, 4}),
Tensor(ET, {0}, std::vector<T>{0}),
Tensor(ET, {4}, std::vector<T>{5, 6, 7, 8}),
reference_tests::Tensor(ET, {4}, std::vector<T>{1, 2, 3, 4}),
reference_tests::Tensor(ET, {0}, std::vector<T>{0}),
reference_tests::Tensor(ET, {4}, std::vector<T>{5, 6, 7, 8}),
0,
Tensor(ET, {8}, std::vector<T>{1, 2, 3, 4, 5, 6, 7, 8}),
reference_tests::Tensor(ET, {8}, std::vector<T>{1, 2, 3, 4, 5, 6, 7, 8}),
"concat_zero_length_1d_middle"),
};
return params;
@ -1251,13 +1252,13 @@ INSTANTIATE_TEST_SUITE_P(smoke_Concat_With_Hardcoded_Refs, ReferenceConcatTestZe
struct ConcatParamsZeroZero {
ConcatParamsZeroZero(
const Tensor& A, const int32_t axis,
const Tensor& expected, const std::string& testcaseName = "") :
const reference_tests::Tensor& A, const int32_t axis,
const reference_tests::Tensor& expected, const std::string& testcaseName = "") :
A(A), axis(axis), expected(expected), testcaseName(testcaseName) {}
Tensor A;
reference_tests::Tensor A;
int32_t axis;
Tensor expected;
reference_tests::Tensor expected;
std::string testcaseName;
};
@ -1304,9 +1305,9 @@ std::vector<ConcatParamsZeroZero> generateParamsZeroZero() {
using T = typename element_type_traits<ET>::value_type;
std::vector<ConcatParamsZeroZero> params {
ConcatParamsZeroZero(
Tensor(ET, {0}, std::vector<T>{1}),
reference_tests::Tensor(ET, {0}, std::vector<T>{1}),
0,
Tensor(ET, {0}, std::vector<T>{}),
reference_tests::Tensor(ET, {0}, std::vector<T>{}),
"concat_zero_zero"),
};
return params;
@ -1337,15 +1338,15 @@ INSTANTIATE_TEST_SUITE_P(smoke_Concat_With_Hardcoded_Refs, ReferenceConcatTestZe
struct ConcatParamsZeroLength4dMiddle {
ConcatParamsZeroLength4dMiddle(
const Tensor& A, const Tensor& B, const Tensor& C, const int32_t axis,
const Tensor& expected, const std::string& testcaseName = "") :
const reference_tests::Tensor& A, const reference_tests::Tensor& B, const reference_tests::Tensor& C, const int32_t axis,
const reference_tests::Tensor& expected, const std::string& testcaseName = "") :
A(A), B(B), C(C), axis(axis), expected(expected), testcaseName(testcaseName) {}
Tensor A;
Tensor B;
Tensor C;
reference_tests::Tensor A;
reference_tests::Tensor B;
reference_tests::Tensor C;
int32_t axis;
Tensor expected;
reference_tests::Tensor expected;
std::string testcaseName;
};
@ -1398,11 +1399,11 @@ std::vector<ConcatParamsZeroLength4dMiddle> generateParamsZeroLength4dMiddle() {
using T = typename element_type_traits<ET>::value_type;
std::vector<ConcatParamsZeroLength4dMiddle> params {
ConcatParamsZeroLength4dMiddle(
Tensor(ET, {2, 2, 1, 1}, std::vector<T>{1, 2, 3, 4}),
Tensor(ET, {2, 2, 0, 1}, std::vector<T>{0}),
Tensor(ET, {2, 2, 1, 1}, std::vector<T>{5, 6, 7, 8}),
reference_tests::Tensor(ET, {2, 2, 1, 1}, std::vector<T>{1, 2, 3, 4}),
reference_tests::Tensor(ET, {2, 2, 0, 1}, std::vector<T>{0}),
reference_tests::Tensor(ET, {2, 2, 1, 1}, std::vector<T>{5, 6, 7, 8}),
2,
Tensor(ET, {2, 2, 2, 1}, std::vector<T>{1, 5, 2, 6, 3, 7, 4, 8}),
reference_tests::Tensor(ET, {2, 2, 2, 1}, std::vector<T>{1, 5, 2, 6, 3, 7, 4, 8}),
"concat_zero_length_4d_middle"),
};
return params;

View File

@ -31,8 +31,8 @@ struct ConstantParams {
PartialShape inputShape;
element::Type inType;
element::Type refType;
runtime::Tensor inputData;
runtime::Tensor refData;
ov::Tensor inputData;
ov::Tensor refData;
std::string testcaseName;
};

View File

@ -27,8 +27,8 @@ struct ConvertParams {
ov::PartialShape pshape;
ov::element::Type inType;
ov::element::Type outType;
ov::runtime::Tensor inputData;
ov::runtime::Tensor refData;
ov::Tensor inputData;
ov::Tensor refData;
};
class ReferenceConversionLayerTest : public testing::TestWithParam<ConvertParams>, public CommonReferenceTest {

View File

@ -26,7 +26,7 @@ public:
public:
template <typename T>
static std::shared_ptr<Model> CreateFunction(const Tensor& input) {
static std::shared_ptr<Model> CreateFunction(const reference_tests::Tensor& input) {
const auto in = std::make_shared<op::v0::Parameter>(input.type, input.shape);
std::shared_ptr<Node> conv;
conv = std::make_shared<T>(in);
@ -35,7 +35,7 @@ public:
}
template <typename T>
static std::shared_ptr<Model> CreateFunction3(const Tensor& input1, const Tensor& input2, const Tensor& input3) {
static std::shared_ptr<Model> CreateFunction3(const reference_tests::Tensor& input1, const reference_tests::Tensor& input2, const reference_tests::Tensor& input3) {
const auto in1 = std::make_shared<op::v0::Parameter>(input1.type, input1.shape);
const auto in2 = std::make_shared<op::v0::Parameter>(input2.type, input2.shape);
const auto in3 = std::make_shared<op::v0::Parameter>(input3.type, input3.shape);
@ -54,10 +54,10 @@ TEST_F(ReferenceConvertColorI420LayerTest, CompareWithHardcodedRefs_r_u8_single_
auto exp_out = std::vector<uint8_t> {0xff, 0, 0, 0xff, 0, 0, 0xff, 0, 0, 0xff, 0, 0,
0xff, 0, 0, 0xff, 0, 0, 0xff, 0, 0, 0xff, 0, 0};
auto out_shape = Shape{1, 2, 4, 3};
Tensor inp_tensor(input_shape, element::u8, input);
reference_tests::Tensor inp_tensor(input_shape, element::u8, input);
inputData = {inp_tensor.data};
function = CreateFunction<op::v8::I420toRGB>(inp_tensor);
Tensor exp_tensor_u8(out_shape, element::u8, exp_out);
reference_tests::Tensor exp_tensor_u8(out_shape, element::u8, exp_out);
refOutData = {exp_tensor_u8.data};
Exec();
}
@ -71,10 +71,10 @@ TEST_F(ReferenceConvertColorI420LayerTest, CompareWithHardcodedRefs_color_u8_sin
37, 37, 164, 217, 216, 255, 37, 37, 164, 217, 216, 255};
auto out_shape = Shape{1, 4, 2, 3};
Tensor inp_tensor(input_shape, element::u8, input);
reference_tests::Tensor inp_tensor(input_shape, element::u8, input);
inputData = {inp_tensor.data};
Tensor exp_tensor_u8(out_shape, element::u8, exp_out);
reference_tests::Tensor exp_tensor_u8(out_shape, element::u8, exp_out);
refOutData = {exp_tensor_u8.data};
function = CreateFunction<op::v8::I420toBGR>(inp_tensor);
@ -91,10 +91,10 @@ TEST_F(ReferenceConvertColorI420LayerTest, CompareWithHardcodedRefs_g_fp32_singl
0, 255.f, 0, 0, 255.f, 0, 0, 255.f, 0, 0, 255.f, 0};
auto out_shape = Shape{1, 2, 4, 3};
Tensor inp_tensor(input_shape, element::f32, input);
reference_tests::Tensor inp_tensor(input_shape, element::f32, input);
inputData = {inp_tensor.data};
Tensor exp_tensor(out_shape, element::f32, exp_out);
reference_tests::Tensor exp_tensor(out_shape, element::f32, exp_out);
refOutData = {exp_tensor.data};
function = CreateFunction<op::v8::I420toRGB>(inp_tensor);
@ -122,12 +122,12 @@ TEST_F(ReferenceConvertColorI420LayerTest, CompareWithHardcodedRefs_batch_fp32_t
255., 0, 0, 255., 0, 0, 255., 0, 0, 255., 0, 0};
auto out_shape = Shape{3, 2, 2, 3};
Tensor inp_tensor_y(input_shape_y, element::f32, input_y);
Tensor inp_tensor_u(input_shape_u, element::f32, input_u);
Tensor inp_tensor_v(input_shape_v, element::f32, input_v);
reference_tests::Tensor inp_tensor_y(input_shape_y, element::f32, input_y);
reference_tests::Tensor inp_tensor_u(input_shape_u, element::f32, input_u);
reference_tests::Tensor inp_tensor_v(input_shape_v, element::f32, input_v);
inputData = {inp_tensor_y.data, inp_tensor_u.data, inp_tensor_v.data};
Tensor exp_tensor(out_shape, element::f32, exp_out);
reference_tests::Tensor exp_tensor(out_shape, element::f32, exp_out);
refOutData = {exp_tensor.data};
function = CreateFunction3<op::v8::I420toBGR>(inp_tensor_y, inp_tensor_u, inp_tensor_v);
@ -157,12 +157,12 @@ TEST_F(ReferenceConvertColorI420LayerTest, CompareWithHardcodedRefs_color4x4_f32
0, 0, 255, 0, 0, 255, 0, 0, 255, 0, 0, 255};
auto out_shape = Shape{1, 2, 2, 3};
Tensor inp_tensor_y(input_shape_y, element::f32, input_y);
Tensor inp_tensor_u(input_shape_u, element::f32, input_u);
Tensor inp_tensor_v(input_shape_v, element::f32, input_v);
reference_tests::Tensor inp_tensor_y(input_shape_y, element::f32, input_y);
reference_tests::Tensor inp_tensor_u(input_shape_u, element::f32, input_u);
reference_tests::Tensor inp_tensor_v(input_shape_v, element::f32, input_v);
inputData = {inp_tensor_y.data, inp_tensor_u.data, inp_tensor_v.data};
Tensor exp_tensor(out_shape, element::f32, exp_out);
reference_tests::Tensor exp_tensor(out_shape, element::f32, exp_out);
refOutData = {exp_tensor.data};
function = CreateFunction3<op::v8::I420toRGB>(inp_tensor_y, inp_tensor_u, inp_tensor_v);

View File

@ -26,7 +26,7 @@ public:
public:
template <typename T>
static std::shared_ptr<Model> CreateFunction(const Tensor& input) {
static std::shared_ptr<Model> CreateFunction(const reference_tests::Tensor& input) {
const auto in = std::make_shared<op::v0::Parameter>(input.type, input.shape);
std::shared_ptr<Node> conv;
conv = std::make_shared<T>(in);
@ -35,7 +35,7 @@ public:
}
template <typename T>
static std::shared_ptr<Model> CreateFunction2(const Tensor& input1, const Tensor& input2) {
static std::shared_ptr<Model> CreateFunction2(const reference_tests::Tensor& input1, const reference_tests::Tensor& input2) {
const auto in1 = std::make_shared<op::v0::Parameter>(input1.type, input1.shape);
const auto in2 = std::make_shared<op::v0::Parameter>(input2.type, input2.shape);
std::shared_ptr<Node> conv;
@ -50,10 +50,10 @@ TEST_F(ReferenceConvertColorNV12LayerTest, CompareWithHardcodedRefs_r_u8_single_
auto input_shape = Shape{1, 3, 2, 1};
auto exp_out = std::vector<uint8_t> {0xff, 0, 0, 0xff, 0, 0, 0xff, 0, 0, 0xff, 0, 0};
auto out_shape = Shape{1, 2, 2, 3};
Tensor inp_tensor(input_shape, element::u8, input);
reference_tests::Tensor inp_tensor(input_shape, element::u8, input);
inputData = {inp_tensor.data};
function = CreateFunction<op::v8::NV12toRGB>(inp_tensor);
Tensor exp_tensor_u8(out_shape, element::u8, exp_out);
reference_tests::Tensor exp_tensor_u8(out_shape, element::u8, exp_out);
refOutData = {exp_tensor_u8.data};
Exec();
}
@ -64,10 +64,10 @@ TEST_F(ReferenceConvertColorNV12LayerTest, CompareWithHardcodedRefs_color_u8_sin
auto exp_out = std::vector<uint8_t> {37, 37, 164, 215, 216, 255, 37, 37, 164, 215, 216, 255};
auto out_shape = Shape{1, 2, 2, 3};
Tensor inp_tensor(input_shape, element::u8, input);
reference_tests::Tensor inp_tensor(input_shape, element::u8, input);
inputData = {inp_tensor.data};
Tensor exp_tensor_u8(out_shape, element::u8, exp_out);
reference_tests::Tensor exp_tensor_u8(out_shape, element::u8, exp_out);
refOutData = {exp_tensor_u8.data};
function = CreateFunction<op::v8::NV12toBGR>(inp_tensor);
@ -81,10 +81,10 @@ TEST_F(ReferenceConvertColorNV12LayerTest, CompareWithHardcodedRefs_g_fp32_singl
auto exp_out = std::vector<float> {0, 255.f, 0, 0, 255.f, 0, 0, 255.f, 0, 0, 255.f, 0};
auto out_shape = Shape{1, 2, 2, 3};
Tensor inp_tensor(input_shape, element::f32, input);
reference_tests::Tensor inp_tensor(input_shape, element::f32, input);
inputData = {inp_tensor.data};
Tensor exp_tensor(out_shape, element::f32, exp_out);
reference_tests::Tensor exp_tensor(out_shape, element::f32, exp_out);
refOutData = {exp_tensor.data};
function = CreateFunction<op::v8::NV12toRGB>(inp_tensor);
@ -108,11 +108,11 @@ TEST_F(ReferenceConvertColorNV12LayerTest, CompareWithHardcodedRefs_batch_fp32_t
255., 0, 0, 255., 0, 0, 255., 0, 0, 255., 0, 0};
auto out_shape = Shape{3, 2, 2, 3};
Tensor inp_tensor_y(input_shape_y, element::f32, input_y);
Tensor inp_tensor_uv(input_shape_uv, element::f32, input_uv);
reference_tests::Tensor inp_tensor_y(input_shape_y, element::f32, input_y);
reference_tests::Tensor inp_tensor_uv(input_shape_uv, element::f32, input_uv);
inputData = {inp_tensor_y.data, inp_tensor_uv.data};
Tensor exp_tensor(out_shape, element::f32, exp_out);
reference_tests::Tensor exp_tensor(out_shape, element::f32, exp_out);
refOutData = {exp_tensor.data};
function = CreateFunction2<op::v8::NV12toBGR>(inp_tensor_y, inp_tensor_uv);
@ -130,11 +130,11 @@ TEST_F(ReferenceConvertColorNV12LayerTest, CompareWithHardcodedRefs_color2x2_f32
auto exp_out = std::vector<float> {164, 37, 37, 255, 216, 215, 164, 37, 37, 255, 216, 215};
auto out_shape = Shape{1, 2, 2, 3};
Tensor inp_tensor_y(input_shape_y, element::f32, input_y);
Tensor inp_tensor_uv(input_shape_uv, element::f32, input_uv);
reference_tests::Tensor inp_tensor_y(input_shape_y, element::f32, input_y);
reference_tests::Tensor inp_tensor_uv(input_shape_uv, element::f32, input_uv);
inputData = {inp_tensor_y.data, inp_tensor_uv.data};
Tensor exp_tensor(out_shape, element::f32, exp_out);
reference_tests::Tensor exp_tensor(out_shape, element::f32, exp_out);
refOutData = {exp_tensor.data};
function = CreateFunction2<op::v8::NV12toRGB>(inp_tensor_y, inp_tensor_uv);

View File

@ -58,9 +58,9 @@ struct ConvolutionParams {
ov::element::Type inType;
ov::element::Type filterType;
ov::element::Type outType;
ov::runtime::Tensor inputData;
ov::runtime::Tensor filterData;
ov::runtime::Tensor refData;
ov::Tensor inputData;
ov::Tensor filterData;
ov::Tensor refData;
ov::Strides strides;
ov::CoordinateDiff padBegin;
ov::CoordinateDiff padEnd;

View File

@ -58,9 +58,9 @@ struct ConvolutionBackpropParams {
ov::element::Type inType;
ov::element::Type filterType;
ov::element::Type outType;
ov::runtime::Tensor inputData;
ov::runtime::Tensor filterData;
ov::runtime::Tensor refData;
ov::Tensor inputData;
ov::Tensor filterData;
ov::Tensor refData;
ov::Strides strides;
ov::CoordinateDiff padBegin;
ov::CoordinateDiff padEnd;

View File

@ -13,8 +13,8 @@ namespace reference_tests {
namespace {
struct CosParams {
Tensor input;
Tensor expected;
reference_tests::Tensor input;
reference_tests::Tensor expected;
};
struct Builder : ParamsBuilder<CosParams> {

View File

@ -13,8 +13,8 @@ namespace reference_tests {
namespace {
struct CoshParams {
Tensor input;
Tensor expected;
reference_tests::Tensor input;
reference_tests::Tensor expected;
};
struct Builder : ParamsBuilder<CoshParams> {

View File

@ -13,15 +13,15 @@ using namespace ov;
namespace {
struct CTCGreedyDecoderParams {
CTCGreedyDecoderParams(
const Tensor& dataTensor, const Tensor& masksTensor, int64_t ctcMergedRepeat,
const Tensor& expectedTensor, const std::string& testcaseName = "") :
const reference_tests::Tensor& dataTensor, const reference_tests::Tensor& masksTensor, int64_t ctcMergedRepeat,
const reference_tests::Tensor& expectedTensor, const std::string& testcaseName = "") :
dataTensor(dataTensor), masksTensor(masksTensor), ctcMergedRepeat(ctcMergedRepeat),
expectedTensor(expectedTensor), testcaseName(testcaseName) {}
Tensor dataTensor;
Tensor masksTensor;
reference_tests::Tensor dataTensor;
reference_tests::Tensor masksTensor;
bool ctcMergedRepeat;
Tensor expectedTensor;
reference_tests::Tensor expectedTensor;
std::string testcaseName;
};
@ -72,41 +72,41 @@ std::vector<CTCGreedyDecoderParams> generateParams() {
using T = typename element_type_traits<IN_ET>::value_type;
std::vector<CTCGreedyDecoderParams> params {
CTCGreedyDecoderParams(
Tensor(IN_ET, {3, 1, 3}, std::vector<T>{0.1f, 0.2f, 0.f, 0.4f, 0.3f, 0.f, 0.5f, 0.6f, 0.f}),
Tensor(IN_ET, {3, 1}, std::vector<T>{1.0f, 1.0f, 1.0f}),
reference_tests::Tensor(IN_ET, {3, 1, 3}, std::vector<T>{0.1f, 0.2f, 0.f, 0.4f, 0.3f, 0.f, 0.5f, 0.6f, 0.f}),
reference_tests::Tensor(IN_ET, {3, 1}, std::vector<T>{1.0f, 1.0f, 1.0f}),
false,
Tensor(IN_ET, {1, 3, 1, 1}, std::vector<T>{1.0f, 0.0f, 1.0f}),
reference_tests::Tensor(IN_ET, {1, 3, 1, 1}, std::vector<T>{1.0f, 0.0f, 1.0f}),
"ctc_greedy_decoder"),
CTCGreedyDecoderParams(
Tensor(IN_ET, {3, 2, 3}, std::vector<T>{
reference_tests::Tensor(IN_ET, {3, 2, 3}, std::vector<T>{
0.1f, 0.2f, 0.f, 0.15f, 0.25f, 0.f, 0.4f, 0.3f, 0.f, 0.45f, 0.35f, 0.f, 0.5f, 0.6f, 0.f, 0.55f, 0.65f, 0.f}),
Tensor(IN_ET, {3, 2}, std::vector<T>{1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f}),
reference_tests::Tensor(IN_ET, {3, 2}, std::vector<T>{1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f}),
false,
Tensor(IN_ET, {2, 3, 1, 1}, std::vector<T>{1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f}),
reference_tests::Tensor(IN_ET, {2, 3, 1, 1}, std::vector<T>{1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f}),
"ctc_greedy_decoder_multiple_batches"),
CTCGreedyDecoderParams(
Tensor(IN_ET, {3, 1, 3}, std::vector<T>{0.1f, 0.2f, 0.f, 0.4f, 0.3f, 0.f, 0.5f, 0.6f, 0.f}),
Tensor(IN_ET, {3, 1}, std::vector<T>{1.0f, 1.0f, 0.0f}),
reference_tests::Tensor(IN_ET, {3, 1, 3}, std::vector<T>{0.1f, 0.2f, 0.f, 0.4f, 0.3f, 0.f, 0.5f, 0.6f, 0.f}),
reference_tests::Tensor(IN_ET, {3, 1}, std::vector<T>{1.0f, 1.0f, 0.0f}),
false,
Tensor(IN_ET, {1, 3, 1, 1}, std::vector<T>{1.0f, 0.0f, -1.0f}),
reference_tests::Tensor(IN_ET, {1, 3, 1, 1}, std::vector<T>{1.0f, 0.0f, -1.0f}),
"ctc_greedy_decoder_single_batch_short_sequence"),
CTCGreedyDecoderParams(
Tensor(IN_ET, {3, 1, 3}, std::vector<T>{0.1f, 0.2f, 0.f, 0.3f, 0.4f, 0.f, 0.6f, 0.5f, 0.f}),
Tensor(IN_ET, {3, 1}, std::vector<T>{1.0f, 1.0f, 1.0f}),
reference_tests::Tensor(IN_ET, {3, 1, 3}, std::vector<T>{0.1f, 0.2f, 0.f, 0.3f, 0.4f, 0.f, 0.6f, 0.5f, 0.f}),
reference_tests::Tensor(IN_ET, {3, 1}, std::vector<T>{1.0f, 1.0f, 1.0f}),
true,
Tensor(IN_ET, {1, 3, 1, 1}, std::vector<T>{1.0f, 0.0f, -1.0f}),
reference_tests::Tensor(IN_ET, {1, 3, 1, 1}, std::vector<T>{1.0f, 0.0f, -1.0f}),
"ctc_greedy_decoder_merge"),
CTCGreedyDecoderParams(
Tensor(IN_ET, {3, 1, 3}, std::vector<T>{0.1f, 0.2f, 0.f, 0.3f, 0.4f, 0.f, 0.6f, 0.5f, 0.f}),
Tensor(IN_ET, {3, 1}, std::vector<T>{1.0f, 1.0f, 1.0f}),
reference_tests::Tensor(IN_ET, {3, 1, 3}, std::vector<T>{0.1f, 0.2f, 0.f, 0.3f, 0.4f, 0.f, 0.6f, 0.5f, 0.f}),
reference_tests::Tensor(IN_ET, {3, 1}, std::vector<T>{1.0f, 1.0f, 1.0f}),
false,
Tensor(IN_ET, {1, 3, 1, 1}, std::vector<T>{1.0f, 1.0f, 0.0f}),
reference_tests::Tensor(IN_ET, {1, 3, 1, 1}, std::vector<T>{1.0f, 1.0f, 0.0f}),
"ctc_greedy_decoder_single_no_merge"),
CTCGreedyDecoderParams(
Tensor(IN_ET, {2, 2, 3}, std::vector<T>{0.1f, 0.2f, 0.f, 0.4f, 0.3f, 0.f, 0.5f, 0.6f, 0.f, 0.7f, 0.8f, 0.f}),
Tensor(IN_ET, {2, 2}, std::vector<T>{1.0f, 1.0f, 1.0f, 0.0f}),
reference_tests::Tensor(IN_ET, {2, 2, 3}, std::vector<T>{0.1f, 0.2f, 0.f, 0.4f, 0.3f, 0.f, 0.5f, 0.6f, 0.f, 0.7f, 0.8f, 0.f}),
reference_tests::Tensor(IN_ET, {2, 2}, std::vector<T>{1.0f, 1.0f, 1.0f, 0.0f}),
false,
Tensor(IN_ET, {2, 2, 1, 1}, std::vector<T>{1.0f, 1.0f, 0.0f, -1.0f}),
reference_tests::Tensor(IN_ET, {2, 2, 1, 1}, std::vector<T>{1.0f, 1.0f, 0.0f, -1.0f}),
"ctc_greedy_decoder_multiple_sequences"),
};
return params;

View File

@ -14,32 +14,32 @@ using namespace ov;
namespace {
struct CTCGreedyDecoderSeqLenParams {
CTCGreedyDecoderSeqLenParams(
const Tensor& dataTensor, const Tensor& seqLenTensor, const Tensor& blankIndexTensor, int64_t mergeRepeated,
const Tensor& expectedTensor, const Tensor& expectedTensor2, const std::string& testcaseName = "") :
const reference_tests::Tensor& dataTensor, const reference_tests::Tensor& seqLenTensor, const reference_tests::Tensor& blankIndexTensor, int64_t mergeRepeated,
const reference_tests::Tensor& expectedTensor, const reference_tests::Tensor& expectedTensor2, const std::string& testcaseName = "") :
dataTensor(dataTensor), seqLenTensor(seqLenTensor), blankIndexTensor(blankIndexTensor), mergeRepeated(mergeRepeated),
expectedTensor(expectedTensor), expectedTensor2(expectedTensor2), testcaseName(testcaseName) {}
Tensor dataTensor;
Tensor seqLenTensor;
Tensor blankIndexTensor;
reference_tests::Tensor dataTensor;
reference_tests::Tensor seqLenTensor;
reference_tests::Tensor blankIndexTensor;
bool mergeRepeated;
Tensor expectedTensor;
Tensor expectedTensor2;
reference_tests::Tensor expectedTensor;
reference_tests::Tensor expectedTensor2;
std::string testcaseName;
};
struct CTCGreedyDecoderSeqLenParamsNoOptionalInput {
CTCGreedyDecoderSeqLenParamsNoOptionalInput(
const Tensor& dataTensor, const Tensor& seqLenTensor, int64_t mergeRepeated,
const Tensor& expectedTensor, const Tensor& expectedTensor2, const std::string& testcaseName = "") :
const reference_tests::Tensor& dataTensor, const reference_tests::Tensor& seqLenTensor, int64_t mergeRepeated,
const reference_tests::Tensor& expectedTensor, const reference_tests::Tensor& expectedTensor2, const std::string& testcaseName = "") :
dataTensor(dataTensor), seqLenTensor(seqLenTensor), mergeRepeated(mergeRepeated),
expectedTensor(expectedTensor), expectedTensor2(expectedTensor2), testcaseName(testcaseName) {}
Tensor dataTensor;
Tensor seqLenTensor;
reference_tests::Tensor dataTensor;
reference_tests::Tensor seqLenTensor;
bool mergeRepeated;
Tensor expectedTensor;
Tensor expectedTensor2;
reference_tests::Tensor expectedTensor;
reference_tests::Tensor expectedTensor2;
std::string testcaseName;
};
@ -137,39 +137,39 @@ std::vector<CTCGreedyDecoderSeqLenParams> generateParams() {
using T = typename element_type_traits<ET>::value_type;
std::vector<CTCGreedyDecoderSeqLenParams> params {
CTCGreedyDecoderSeqLenParams(
Tensor(ET, {1, 3, 3}, std::vector<T>{0.1f, 0.2f, 0.f, 0.4f, 0.3f, 0.f, 0.5f, 0.6f, 0.f}),
Tensor(element::i32, {1}, std::vector<int32_t>{2}),
Tensor(element::i32, {}, std::vector<int32_t>{2}),
reference_tests::Tensor(ET, {1, 3, 3}, std::vector<T>{0.1f, 0.2f, 0.f, 0.4f, 0.3f, 0.f, 0.5f, 0.6f, 0.f}),
reference_tests::Tensor(element::i32, {1}, std::vector<int32_t>{2}),
reference_tests::Tensor(element::i32, {}, std::vector<int32_t>{2}),
false,
Tensor(element::i32, {1, 3}, std::vector<int32_t>{1, 0, -1}),
Tensor(element::i32, {1}, std::vector<int32_t>{2}),
reference_tests::Tensor(element::i32, {1, 3}, std::vector<int32_t>{1, 0, -1}),
reference_tests::Tensor(element::i32, {1}, std::vector<int32_t>{2}),
"evaluate_ctc_greedy_decoder_seq_len"),
CTCGreedyDecoderSeqLenParams(
Tensor(ET, {1, 3, 3}, std::vector<T>{0.1f, 0.2f, 0.f, 0.4f, 0.3f, 0.f, 0.5f, 0.6f, 0.f}),
Tensor(element::i32, {1}, std::vector<int32_t>{2}),
Tensor(element::i32, {}, std::vector<int32_t>{2}),
reference_tests::Tensor(ET, {1, 3, 3}, std::vector<T>{0.1f, 0.2f, 0.f, 0.4f, 0.3f, 0.f, 0.5f, 0.6f, 0.f}),
reference_tests::Tensor(element::i32, {1}, std::vector<int32_t>{2}),
reference_tests::Tensor(element::i32, {}, std::vector<int32_t>{2}),
true,
Tensor(element::i32, {1, 3}, std::vector<int32_t>{1, 0, -1}),
Tensor(element::i32, {1}, std::vector<int32_t>{2}),
reference_tests::Tensor(element::i32, {1, 3}, std::vector<int32_t>{1, 0, -1}),
reference_tests::Tensor(element::i32, {1}, std::vector<int32_t>{2}),
"evaluate_ctc_greedy_decoder_seq_len_merge"),
CTCGreedyDecoderSeqLenParams(
Tensor(ET, {2, 3, 3}, std::vector<T>{0.1f, 0.2f, 0.f, 0.15f, 0.25f, 0.f, 0.4f, 0.3f, 0.f,
reference_tests::Tensor(ET, {2, 3, 3}, std::vector<T>{0.1f, 0.2f, 0.f, 0.15f, 0.25f, 0.f, 0.4f, 0.3f, 0.f,
0.45f, 0.35f, 0.f, 0.5f, 0.6f, 0.f, 0.55f, 0.65f, 0.f}),
Tensor(element::i32, {2}, std::vector<int32_t>{1, 1}),
Tensor(element::i32, {}, std::vector<int32_t>{2}),
reference_tests::Tensor(element::i32, {2}, std::vector<int32_t>{1, 1}),
reference_tests::Tensor(element::i32, {}, std::vector<int32_t>{2}),
false,
Tensor(element::i32, {2, 3}, std::vector<int32_t>{1, -1, -1, 0, -1, -1}),
Tensor(element::i32, {2}, std::vector<int32_t>{1, 1}),
reference_tests::Tensor(element::i32, {2, 3}, std::vector<int32_t>{1, -1, -1, 0, -1, -1}),
reference_tests::Tensor(element::i32, {2}, std::vector<int32_t>{1, 1}),
"evaluate_ctc_greedy_decoder_seq_len_multiple_batches"),
CTCGreedyDecoderSeqLenParams(
Tensor(ET, {3, 3, 3}, std::vector<T>{0.1f, 0.2f, 0.f, 0.15f, 0.25f, 0.f, 0.4f, 0.3f, 0.f,
reference_tests::Tensor(ET, {3, 3, 3}, std::vector<T>{0.1f, 0.2f, 0.f, 0.15f, 0.25f, 0.f, 0.4f, 0.3f, 0.f,
0.45f, 0.35f, 0.f, 0.5f, 0.6f, 0.f, 0.55f, 0.65f, 0.f,
0.1f, 0.2f, 0.f, 0.15f, 0.25f, 0.f, 0.4f, 0.3f, 0.f}),
Tensor(element::i32, {3}, std::vector<int32_t>{2, 3, 1}),
Tensor(element::i32, {}, std::vector<int32_t>{2}),
reference_tests::Tensor(element::i32, {3}, std::vector<int32_t>{2, 3, 1}),
reference_tests::Tensor(element::i32, {}, std::vector<int32_t>{2}),
false,
Tensor(element::i32, {3, 3}, std::vector<int32_t>{1, 1, -1, 0, 1, 1, 1, -1, -1}),
Tensor(element::i32, {3}, std::vector<int32_t>{2, 3, 1}),
reference_tests::Tensor(element::i32, {3, 3}, std::vector<int32_t>{1, 1, -1, 0, 1, 1, 1, -1, -1}),
reference_tests::Tensor(element::i32, {3}, std::vector<int32_t>{2, 3, 1}),
"evaluate_ctc_greedy_decoder_seq_len_multiple_batches2"),
};
return params;
@ -195,11 +195,11 @@ std::vector<CTCGreedyDecoderSeqLenParamsNoOptionalInput> generateParamsNoOptiona
using T = typename element_type_traits<ET>::value_type;
std::vector<CTCGreedyDecoderSeqLenParamsNoOptionalInput> params {
CTCGreedyDecoderSeqLenParamsNoOptionalInput(
Tensor(ET, {1, 3, 3}, std::vector<T>{0.1f, 0.2f, 0.f, 0.4f, 0.3f, 0.f, 0.5f, 0.6f, 0.f}),
Tensor(element::i32, {1}, std::vector<int32_t>{2}),
reference_tests::Tensor(ET, {1, 3, 3}, std::vector<T>{0.1f, 0.2f, 0.f, 0.4f, 0.3f, 0.f, 0.5f, 0.6f, 0.f}),
reference_tests::Tensor(element::i32, {1}, std::vector<int32_t>{2}),
false,
Tensor(element::i32, {1, 3}, std::vector<int32_t>{1, 0, -1}),
Tensor(element::i32, {1}, std::vector<int32_t>{2}),
reference_tests::Tensor(element::i32, {1, 3}, std::vector<int32_t>{1, 0, -1}),
reference_tests::Tensor(element::i32, {1}, std::vector<int32_t>{2}),
"evaluate_ctc_greedy_decoder_seq_len_no_optional_input"),
};
return params;

View File

@ -13,8 +13,8 @@ using namespace ov;
namespace {
struct CTCLossParams {
CTCLossParams(const bool collapseRepeated, const bool mergeRepeated, const bool findUnique, const Tensor& logitsTensor, const Tensor& logitsLenTensor,
const Tensor& labelsTensor, const Tensor& labelsLenTensor, const Tensor& blankIdxTensor, const Tensor& expectedTensor)
CTCLossParams(const bool collapseRepeated, const bool mergeRepeated, const bool findUnique, const reference_tests::Tensor& logitsTensor, const reference_tests::Tensor& logitsLenTensor,
const reference_tests::Tensor& labelsTensor, const reference_tests::Tensor& labelsLenTensor, const reference_tests::Tensor& blankIdxTensor, const reference_tests::Tensor& expectedTensor)
: preprocessCollapseRepeated(collapseRepeated),
ctcMergeRepeated(mergeRepeated),
unique(findUnique),
@ -28,12 +28,12 @@ struct CTCLossParams {
bool preprocessCollapseRepeated;
bool ctcMergeRepeated;
bool unique;
Tensor logits;
Tensor logitsLen;
Tensor labels;
Tensor labelsLen;
Tensor blankIdx;
Tensor expected;
reference_tests::Tensor logits;
reference_tests::Tensor logitsLen;
reference_tests::Tensor labels;
reference_tests::Tensor labelsLen;
reference_tests::Tensor blankIdx;
reference_tests::Tensor expected;
};
class ReferenceCTCLossLayerTest : public testing::TestWithParam<CTCLossParams>, public CommonReferenceTest {
@ -80,89 +80,89 @@ TEST_P(ReferenceCTCLossLayerTest, CompareWithRefs) {
INSTANTIATE_TEST_SUITE_P(
smoke_CTCLoss_With_Hardcoded_Refs, ReferenceCTCLossLayerTest,
::testing::Values(CTCLossParams(false, false, false, // collapse repeated, merge repeated, unique
Tensor({2, 3, 3}, element::f32, std::vector<float> {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits
Tensor({2}, element::i32, std::vector<int> {3, 3}), // logitsLen
Tensor({2, 3}, element::i32, std::vector<int> {0, 1, 2, 1, 1, 1}), // labels
Tensor({2}, element::i32, std::vector<int> {2, 1}), // labelsLen
Tensor({}, element::i32, std::vector<int> {2}), // blankIdx
Tensor({2}, element::f32, std::vector<float> {1.41223f, 14.1359f})), // refOut
reference_tests::Tensor({2, 3, 3}, element::f32, std::vector<float> {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits
reference_tests::Tensor({2}, element::i32, std::vector<int> {3, 3}), // logitsLen
reference_tests::Tensor({2, 3}, element::i32, std::vector<int> {0, 1, 2, 1, 1, 1}), // labels
reference_tests::Tensor({2}, element::i32, std::vector<int> {2, 1}), // labelsLen
reference_tests::Tensor({}, element::i32, std::vector<int> {2}), // blankIdx
reference_tests::Tensor({2}, element::f32, std::vector<float> {1.41223f, 14.1359f})), // refOut
CTCLossParams(false, false, true, // collapse repeated, merge repeated, unique
Tensor({2, 3, 3}, element::f32, std::vector<float> {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits
Tensor({2}, element::i32, std::vector<int> {3, 3}), // logitsLen
Tensor({2, 3}, element::i32, std::vector<int> {0, 1, 2, 1, 1, 1}), // labels
Tensor({2}, element::i32, std::vector<int> {2, 1}), // labelsLen
Tensor({}, element::i32, std::vector<int> {2}), // blankIdx
Tensor({2}, element::f32, std::vector<float> {1.41223f, 14.1359f})), // refOut
reference_tests::Tensor({2, 3, 3}, element::f32, std::vector<float> {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits
reference_tests::Tensor({2}, element::i32, std::vector<int> {3, 3}), // logitsLen
reference_tests::Tensor({2, 3}, element::i32, std::vector<int> {0, 1, 2, 1, 1, 1}), // labels
reference_tests::Tensor({2}, element::i32, std::vector<int> {2, 1}), // labelsLen
reference_tests::Tensor({}, element::i32, std::vector<int> {2}), // blankIdx
reference_tests::Tensor({2}, element::f32, std::vector<float> {1.41223f, 14.1359f})), // refOut
CTCLossParams(false, true, false, // collapse repeated, merge repeated, unique
Tensor({2, 3, 3}, element::f32, std::vector<float> {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits
Tensor({2}, element::i32, std::vector<int> {3, 3}), // logitsLen
Tensor({2, 3}, element::i32, std::vector<int> {0, 1, 2, 1, 1, 1}), // labels
Tensor({2}, element::i32, std::vector<int> {2, 1}), // labelsLen
Tensor({}, element::i32, std::vector<int> {2}), // blankIdx
Tensor({2}, element::f32, std::vector<float> {1.41156f, 13.2745f})), // refOut
reference_tests::Tensor({2, 3, 3}, element::f32, std::vector<float> {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits
reference_tests::Tensor({2}, element::i32, std::vector<int> {3, 3}), // logitsLen
reference_tests::Tensor({2, 3}, element::i32, std::vector<int> {0, 1, 2, 1, 1, 1}), // labels
reference_tests::Tensor({2}, element::i32, std::vector<int> {2, 1}), // labelsLen
reference_tests::Tensor({}, element::i32, std::vector<int> {2}), // blankIdx
reference_tests::Tensor({2}, element::f32, std::vector<float> {1.41156f, 13.2745f})), // refOut
CTCLossParams(true, false, false, // collapse repeated, merge repeated, unique
Tensor({2, 3, 3}, element::f32, std::vector<float> {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits
Tensor({2}, element::i32, std::vector<int> {3, 3}), // logitsLen
Tensor({2, 3}, element::i32, std::vector<int> {0, 1, 2, 1, 1, 1}), // labels
Tensor({2}, element::i32, std::vector<int> {2, 1}), // labelsLen
Tensor({}, element::i32, std::vector<int> {2}), // blankIdx
Tensor({2}, element::f32, std::vector<float> {1.41223f, 14.1359f})), // refOut
reference_tests::Tensor({2, 3, 3}, element::f32, std::vector<float> {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits
reference_tests::Tensor({2}, element::i32, std::vector<int> {3, 3}), // logitsLen
reference_tests::Tensor({2, 3}, element::i32, std::vector<int> {0, 1, 2, 1, 1, 1}), // labels
reference_tests::Tensor({2}, element::i32, std::vector<int> {2, 1}), // labelsLen
reference_tests::Tensor({}, element::i32, std::vector<int> {2}), // blankIdx
reference_tests::Tensor({2}, element::f32, std::vector<float> {1.41223f, 14.1359f})), // refOut
CTCLossParams(false, true, true, // collapse repeated, merge repeated, unique
Tensor({2, 3, 3}, element::f32, std::vector<float> {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits
Tensor({2}, element::i32, std::vector<int> {3, 3}), // logitsLen
Tensor({2, 3}, element::i32, std::vector<int> {0, 1, 2, 1, 1, 1}), // labels
Tensor({2}, element::i32, std::vector<int> {2, 1}), // labelsLen
Tensor({}, element::i32, std::vector<int> {2}), // blankIdx
Tensor({2}, element::f32, std::vector<float> {1.41156f, 13.2745f})), // refOut
reference_tests::Tensor({2, 3, 3}, element::f32, std::vector<float> {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits
reference_tests::Tensor({2}, element::i32, std::vector<int> {3, 3}), // logitsLen
reference_tests::Tensor({2, 3}, element::i32, std::vector<int> {0, 1, 2, 1, 1, 1}), // labels
reference_tests::Tensor({2}, element::i32, std::vector<int> {2, 1}), // labelsLen
reference_tests::Tensor({}, element::i32, std::vector<int> {2}), // blankIdx
reference_tests::Tensor({2}, element::f32, std::vector<float> {1.41156f, 13.2745f})), // refOut
CTCLossParams(true, true, true, // collapse repeated, merge repeated, unique
Tensor({2, 3, 3}, element::f32, std::vector<float> {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits
Tensor({2}, element::i32, std::vector<int> {3, 3}), // logitsLen
Tensor({2, 3}, element::i32, std::vector<int> {0, 1, 2, 1, 1, 1}), // labels
Tensor({2}, element::i32, std::vector<int> {2, 1}), // labelsLen
Tensor({}, element::i32, std::vector<int> {2}), // blankIdx
Tensor({2}, element::f32, std::vector<float> {1.41223f, 13.2745f})), // refOut
reference_tests::Tensor({2, 3, 3}, element::f32, std::vector<float> {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits
reference_tests::Tensor({2}, element::i32, std::vector<int> {3, 3}), // logitsLen
reference_tests::Tensor({2, 3}, element::i32, std::vector<int> {0, 1, 2, 1, 1, 1}), // labels
reference_tests::Tensor({2}, element::i32, std::vector<int> {2, 1}), // labelsLen
reference_tests::Tensor({}, element::i32, std::vector<int> {2}), // blankIdx
reference_tests::Tensor({2}, element::f32, std::vector<float> {1.41223f, 13.2745f})), // refOut
// floating point type - float16
CTCLossParams(false, false, false, // collapse repeated, merge repeated, unique
Tensor({2, 3, 3}, element::f16, std::vector<float16> {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits
Tensor({2}, element::i32, std::vector<int> {3, 3}), // logitsLen
Tensor({2, 3}, element::i32, std::vector<int> {0, 1, 2, 1, 1, 1}), // labels
Tensor({2}, element::i32, std::vector<int> {2, 1}), // labelsLen
Tensor({}, element::i32, std::vector<int> {2}), // blankIdx
Tensor({2}, element::f16, std::vector<float16> {1.41223f, 14.1359f})), // refOut
reference_tests::Tensor({2, 3, 3}, element::f16, std::vector<float16> {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits
reference_tests::Tensor({2}, element::i32, std::vector<int> {3, 3}), // logitsLen
reference_tests::Tensor({2, 3}, element::i32, std::vector<int> {0, 1, 2, 1, 1, 1}), // labels
reference_tests::Tensor({2}, element::i32, std::vector<int> {2, 1}), // labelsLen
reference_tests::Tensor({}, element::i32, std::vector<int> {2}), // blankIdx
reference_tests::Tensor({2}, element::f16, std::vector<float16> {1.41223f, 14.1359f})), // refOut
CTCLossParams(false, false, true, // collapse repeated, merge repeated, unique
Tensor({2, 3, 3}, element::f16, std::vector<float16> {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits
Tensor({2}, element::i32, std::vector<int> {3, 3}), // logitsLen
Tensor({2, 3}, element::i32, std::vector<int> {0, 1, 2, 1, 1, 1}), // labels
Tensor({2}, element::i32, std::vector<int> {2, 1}), // labelsLen
Tensor({}, element::i32, std::vector<int> {2}), // blankIdx
Tensor({2}, element::f16, std::vector<float16> {1.41223f, 14.1359f})), // refOut
reference_tests::Tensor({2, 3, 3}, element::f16, std::vector<float16> {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits
reference_tests::Tensor({2}, element::i32, std::vector<int> {3, 3}), // logitsLen
reference_tests::Tensor({2, 3}, element::i32, std::vector<int> {0, 1, 2, 1, 1, 1}), // labels
reference_tests::Tensor({2}, element::i32, std::vector<int> {2, 1}), // labelsLen
reference_tests::Tensor({}, element::i32, std::vector<int> {2}), // blankIdx
reference_tests::Tensor({2}, element::f16, std::vector<float16> {1.41223f, 14.1359f})), // refOut
CTCLossParams(false, true, false, // collapse repeated, merge repeated, unique
Tensor({2, 3, 3}, element::f16, std::vector<float16> {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits
Tensor({2}, element::i32, std::vector<int> {3, 3}), // logitsLen
Tensor({2, 3}, element::i32, std::vector<int> {0, 1, 2, 1, 1, 1}), // labels
Tensor({2}, element::i32, std::vector<int> {2, 1}), // labelsLen
Tensor({}, element::i32, std::vector<int> {2}), // blankIdx
Tensor({2}, element::f16, std::vector<float16> {1.41156f, 13.2745f})), // refOut
reference_tests::Tensor({2, 3, 3}, element::f16, std::vector<float16> {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits
reference_tests::Tensor({2}, element::i32, std::vector<int> {3, 3}), // logitsLen
reference_tests::Tensor({2, 3}, element::i32, std::vector<int> {0, 1, 2, 1, 1, 1}), // labels
reference_tests::Tensor({2}, element::i32, std::vector<int> {2, 1}), // labelsLen
reference_tests::Tensor({}, element::i32, std::vector<int> {2}), // blankIdx
reference_tests::Tensor({2}, element::f16, std::vector<float16> {1.41156f, 13.2745f})), // refOut
CTCLossParams(true, false, false, // collapse repeated, merge repeated, unique
Tensor({2, 3, 3}, element::f16, std::vector<float16> {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits
Tensor({2}, element::i32, std::vector<int> {3, 3}), // logitsLen
Tensor({2, 3}, element::i32, std::vector<int> {0, 1, 2, 1, 1, 1}), // labels
Tensor({2}, element::i32, std::vector<int> {2, 1}), // labelsLen
Tensor({}, element::i32, std::vector<int> {2}), // blankIdx
Tensor({2}, element::f16, std::vector<float16> {1.41223f, 14.1359f})), // refOut
reference_tests::Tensor({2, 3, 3}, element::f16, std::vector<float16> {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits
reference_tests::Tensor({2}, element::i32, std::vector<int> {3, 3}), // logitsLen
reference_tests::Tensor({2, 3}, element::i32, std::vector<int> {0, 1, 2, 1, 1, 1}), // labels
reference_tests::Tensor({2}, element::i32, std::vector<int> {2, 1}), // labelsLen
reference_tests::Tensor({}, element::i32, std::vector<int> {2}), // blankIdx
reference_tests::Tensor({2}, element::f16, std::vector<float16> {1.41223f, 14.1359f})), // refOut
CTCLossParams(false, true, true, // collapse repeated, merge repeated, unique
Tensor({2, 3, 3}, element::f16, std::vector<float16> {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits
Tensor({2}, element::i32, std::vector<int> {3, 3}), // logitsLen
Tensor({2, 3}, element::i32, std::vector<int> {0, 1, 2, 1, 1, 1}), // labels
Tensor({2}, element::i32, std::vector<int> {2, 1}), // labelsLen
Tensor({}, element::i32, std::vector<int> {2}), // blankIdx
Tensor({2}, element::f16, std::vector<float16> {1.41156f, 13.2745f})), // refOut
reference_tests::Tensor({2, 3, 3}, element::f16, std::vector<float16> {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits
reference_tests::Tensor({2}, element::i32, std::vector<int> {3, 3}), // logitsLen
reference_tests::Tensor({2, 3}, element::i32, std::vector<int> {0, 1, 2, 1, 1, 1}), // labels
reference_tests::Tensor({2}, element::i32, std::vector<int> {2, 1}), // labelsLen
reference_tests::Tensor({}, element::i32, std::vector<int> {2}), // blankIdx
reference_tests::Tensor({2}, element::f16, std::vector<float16> {1.41156f, 13.2745f})), // refOut
CTCLossParams(true, true, true, // collapse repeated, merge repeated, unique
Tensor({2, 3, 3}, element::f16, std::vector<float16> {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits
Tensor({2}, element::i32, std::vector<int> {3, 3}), // logitsLen
Tensor({2, 3}, element::i32, std::vector<int> {0, 1, 2, 1, 1, 1}), // labels
Tensor({2}, element::i32, std::vector<int> {2, 1}), // labelsLen
Tensor({}, element::i32, std::vector<int> {2}), // blankIdx
Tensor({2}, element::f16, std::vector<float16> {1.41223f, 13.2745f}))), // refOut
reference_tests::Tensor({2, 3, 3}, element::f16, std::vector<float16> {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits
reference_tests::Tensor({2}, element::i32, std::vector<int> {3, 3}), // logitsLen
reference_tests::Tensor({2, 3}, element::i32, std::vector<int> {0, 1, 2, 1, 1, 1}), // labels
reference_tests::Tensor({2}, element::i32, std::vector<int> {2, 1}), // labelsLen
reference_tests::Tensor({}, element::i32, std::vector<int> {2}), // blankIdx
reference_tests::Tensor({2}, element::f16, std::vector<float16> {1.41223f, 13.2745f}))), // refOut
ReferenceCTCLossLayerTest::getTestCaseName);
} // namespace

View File

@ -49,9 +49,9 @@ struct CumSumParams {
element::Type axisType;
element::Type inType;
element::Type outType;
ov::runtime::Tensor axisData;
ov::runtime::Tensor inputData;
ov::runtime::Tensor refData;
ov::Tensor axisData;
ov::Tensor inputData;
ov::Tensor refData;
bool testDefaults = false;
};

View File

@ -87,11 +87,11 @@ struct DeformableConvolutionParams {
ov::element::Type offsetType;
ov::element::Type outType;
ov::element::Type maskType;
ov::runtime::Tensor inputData;
ov::runtime::Tensor filterData;
ov::runtime::Tensor offsetData;
ov::runtime::Tensor refData;
ov::runtime::Tensor maskData;
ov::Tensor inputData;
ov::Tensor filterData;
ov::Tensor offsetData;
ov::Tensor refData;
ov::Tensor maskData;
ov::Strides strides;
ov::CoordinateDiff padBegin;
ov::CoordinateDiff padEnd;

View File

@ -116,10 +116,10 @@ struct DeformablePSROIPoolingParams {
ov::element::Type roisType;
ov::element::Type offsetsType;
ov::element::Type outType;
ov::runtime::Tensor inputData;
ov::runtime::Tensor roisData;
ov::runtime::Tensor offsetsData;
ov::runtime::Tensor refData;
ov::Tensor inputData;
ov::Tensor roisData;
ov::Tensor offsetsData;
ov::Tensor refData;
std::string testcaseName;
};

View File

@ -12,15 +12,15 @@ using namespace ov;
namespace {
struct DepthToSpaceParams {
DepthToSpaceParams(const Tensor& dataTensor, const std::string mode, const int32_t blockSize,
const Tensor& expectedTensor, const std::string& testcaseName = "") :
DepthToSpaceParams(const reference_tests::Tensor& dataTensor, const std::string mode, const int32_t blockSize,
const reference_tests::Tensor& expectedTensor, const std::string& testcaseName = "") :
dataTensor(dataTensor), mode(mode), blockSize(blockSize), expectedTensor(expectedTensor),
testcaseName(testcaseName) {}
Tensor dataTensor;
reference_tests::Tensor dataTensor;
std::string mode;
int32_t blockSize;
Tensor expectedTensor;
reference_tests::Tensor expectedTensor;
std::string testcaseName;
};
@ -68,61 +68,61 @@ std::vector<DepthToSpaceParams> generateDepthToSpaceParams() {
std::vector<DepthToSpaceParams> depthToSpaceParams {
// depth_to_space_block_first_K1_BS2
DepthToSpaceParams(
Tensor({1, 8, 2}, IN_ET, std::vector<T>{0, 2, 8, 10, 16, 18, 24, 26, 1, 3, 9, 11, 17, 19, 25, 27}),
reference_tests::Tensor({1, 8, 2}, IN_ET, std::vector<T>{0, 2, 8, 10, 16, 18, 24, 26, 1, 3, 9, 11, 17, 19, 25, 27}),
"BLOCKS_FIRST",
2,
Tensor({1, 4, 4}, IN_ET, std::vector<T>{0, 1, 2, 3, 8, 9, 10, 11, 16, 17, 18, 19, 24, 25, 26, 27}),
reference_tests::Tensor({1, 4, 4}, IN_ET, std::vector<T>{0, 1, 2, 3, 8, 9, 10, 11, 16, 17, 18, 19, 24, 25, 26, 27}),
"depth_to_space_block_first_K1_BS2"),
// depth_to_space_block_first_K2_BS2
DepthToSpaceParams(
Tensor({1, 8, 2, 2}, IN_ET, std::vector<T>{0, 2, 8, 10, 16, 18, 24, 26, 1, 3, 9,
reference_tests::Tensor({1, 8, 2, 2}, IN_ET, std::vector<T>{0, 2, 8, 10, 16, 18, 24, 26, 1, 3, 9,
11, 17, 19, 25, 27, 4, 6, 12, 14, 20, 22,
28, 30, 5, 7, 13, 15, 21, 23, 29, 31}),
"BLOCKS_FIRST",
2,
Tensor({1, 2, 4, 4}, IN_ET, std::vector<T>{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
reference_tests::Tensor({1, 2, 4, 4}, IN_ET, std::vector<T>{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31}),
"depth_to_space_block_first_K2_BS2"),
// depth_to_space_block_first_K2_BS4
DepthToSpaceParams(
Tensor({1, 16, 2, 1}, IN_ET, std::vector<T>{0, 16, 1, 17, 2, 18, 3, 19, 4, 20, 5,
reference_tests::Tensor({1, 16, 2, 1}, IN_ET, std::vector<T>{0, 16, 1, 17, 2, 18, 3, 19, 4, 20, 5,
21, 6, 22, 7, 23, 8, 24, 9, 25, 10, 26,
11, 27, 12, 28, 13, 29, 14, 30, 15, 31}),
"BLOCKS_FIRST",
4,
Tensor({1, 1, 8, 4}, IN_ET, std::vector<T>{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
reference_tests::Tensor({1, 1, 8, 4}, IN_ET, std::vector<T>{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31}),
"depth_to_space_block_first_K2_BS4"),
// depth_to_space_depth_first_1K_BS2
DepthToSpaceParams(
Tensor({1, 8, 2}, IN_ET, std::vector<T>{0, 2, 1, 3, 4, 6, 5, 7, 8, 10, 9, 11, 12, 14, 13, 15}),
reference_tests::Tensor({1, 8, 2}, IN_ET, std::vector<T>{0, 2, 1, 3, 4, 6, 5, 7, 8, 10, 9, 11, 12, 14, 13, 15}),
"DEPTH_FIRST",
2,
Tensor({1, 4, 4}, IN_ET, std::vector<T>{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}),
reference_tests::Tensor({1, 4, 4}, IN_ET, std::vector<T>{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}),
"depth_to_space_depth_first_1K_BS2"),
// depth_to_space_depth_first_2K_BS2
DepthToSpaceParams(
Tensor({1, 8, 2, 2}, IN_ET, std::vector<T>{0, 2, 8, 10, 16, 18, 24, 26, 1, 3, 9,
reference_tests::Tensor({1, 8, 2, 2}, IN_ET, std::vector<T>{0, 2, 8, 10, 16, 18, 24, 26, 1, 3, 9,
11, 17, 19, 25, 27, 4, 6, 12, 14, 20, 22,
28, 30, 5, 7, 13, 15, 21, 23, 29, 31}),
"DEPTH_FIRST",
2,
Tensor({1, 2, 4, 4}, IN_ET, std::vector<T>{0, 16, 2, 18, 1, 17, 3, 19, 8, 24, 10, 26, 9, 25, 11, 27,
reference_tests::Tensor({1, 2, 4, 4}, IN_ET, std::vector<T>{0, 16, 2, 18, 1, 17, 3, 19, 8, 24, 10, 26, 9, 25, 11, 27,
4, 20, 6, 22, 5, 21, 7, 23, 12, 28, 14, 30, 13, 29, 15, 31}),
"depth_to_space_depth_first_2K_BS2"),
// depth_to_space_depth_first_2K_BS4
DepthToSpaceParams(
Tensor({1, 16, 2, 1}, IN_ET, std::vector<T>{0, 16, 1, 17, 2, 18, 3, 19, 4, 20, 5,
reference_tests::Tensor({1, 16, 2, 1}, IN_ET, std::vector<T>{0, 16, 1, 17, 2, 18, 3, 19, 4, 20, 5,
21, 6, 22, 7, 23, 8, 24, 9, 25, 10, 26,
11, 27, 12, 28, 13, 29, 14, 30, 15, 31}),
"DEPTH_FIRST",
4,
Tensor({1, 1, 8, 4}, IN_ET, std::vector<T>{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
reference_tests::Tensor({1, 1, 8, 4}, IN_ET, std::vector<T>{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31}),
"depth_to_space_depth_first_2K_BS4"),
};

View File

@ -142,12 +142,12 @@ template <class IT>
ov::PartialShape auxLocShape;
ov::PartialShape auxConfShape;
ov::element::Type inType;
ov::runtime::Tensor locData;
ov::runtime::Tensor confData;
ov::runtime::Tensor priorBoxesData;
ov::runtime::Tensor refData;
ov::runtime::Tensor auxLocData;
ov::runtime::Tensor auxConfData;
ov::Tensor locData;
ov::Tensor confData;
ov::Tensor priorBoxesData;
ov::Tensor refData;
ov::Tensor auxLocData;
ov::Tensor auxConfData;
std::string testcaseName;
};

View File

@ -37,8 +37,8 @@ struct DFTParams {
Shape m_expected_shape;
element::Type_t m_input_type;
element::Type_t m_expected_type;
runtime::Tensor m_input_value;
runtime::Tensor m_expected_value;
ov::Tensor m_input_value;
ov::Tensor m_expected_value;
std::shared_ptr<op::v0::Constant> m_axes;
std::shared_ptr<op::v0::Constant> m_signal;
};

View File

@ -31,9 +31,9 @@ struct DivideParams {
PartialShape pshape2;
element::Type inType;
element::Type outType;
runtime::Tensor inputData1;
runtime::Tensor inputData2;
runtime::Tensor refData;
ov::Tensor inputData1;
ov::Tensor inputData2;
ov::Tensor refData;
};
struct DivideRoundingParams : public DivideParams {

View File

@ -13,9 +13,9 @@ using namespace ov;
namespace {
struct EinsumParams {
std::vector<Tensor> inputs;
std::vector<reference_tests::Tensor> inputs;
std::string equation;
Tensor expectedResult;
reference_tests::Tensor expectedResult;
std::string testcaseName;
};

View File

@ -27,8 +27,8 @@ struct EluParams {
ov::PartialShape pshape;
ov::element::Type inType;
ov::element::Type outType;
ov::runtime::Tensor inputData;
ov::runtime::Tensor refData;
ov::Tensor inputData;
ov::Tensor refData;
};
class ReferenceEluLayerTest : public testing::TestWithParam<EluParams>, public CommonReferenceTest {

View File

@ -40,11 +40,11 @@ struct EmbeddingSegmentsSumParams {
ov::PartialShape _iShape;
ov::element::Type _iType;
ov::runtime::Tensor _iData;
ov::Tensor _iData;
ov::PartialShape _refShape;
ov::element::Type _refType;
ov::runtime::Tensor _refData;
ov::Tensor _refData;
std::shared_ptr<ngraph::opset1::Constant> _indices;
std::shared_ptr<ngraph::opset1::Constant> _segmentIds;

View File

@ -37,11 +37,11 @@ struct EmbeddingBagOffsetsSumParams {
}
ov::PartialShape _iShape;
ov::element::Type _iType;
ov::runtime::Tensor _iData;
ov::Tensor _iData;
ov::PartialShape _refShape;
ov::element::Type _refType;
ov::runtime::Tensor _refData;
ov::Tensor _refData;
std::shared_ptr<ngraph::opset1::Constant> _indices;
std::shared_ptr<ngraph::opset1::Constant> _offsets;

View File

@ -33,11 +33,11 @@ struct EmbeddingBagPackedSumParams {
}
ov::PartialShape _iShape;
ov::element::Type _iType;
ov::runtime::Tensor _iData;
ov::Tensor _iData;
ov::PartialShape _refShape;
ov::element::Type _refType;
ov::runtime::Tensor _refData;
ov::Tensor _refData;
std::shared_ptr<ngraph::opset1::Constant> _indices;
std::shared_ptr<ngraph::opset1::Constant> _perSampleWeights; // Optional, default is tensor of ones.

View File

@ -37,8 +37,8 @@ struct ErfParams {
ov::PartialShape pshape;
ov::element::Type inType;
ov::element::Type outType;
ov::runtime::Tensor inputData;
ov::runtime::Tensor refData;
ov::Tensor inputData;
ov::Tensor refData;
};
class ReferenceErfLayerTest : public testing::TestWithParam<ErfParams>, public CommonReferenceTest {

View File

@ -26,8 +26,8 @@ struct ExpParams {
ov::PartialShape pshape;
ov::element::Type inType;
ov::element::Type outType;
ov::runtime::Tensor inputData;
ov::runtime::Tensor refData;
ov::Tensor inputData;
ov::Tensor refData;
};
class ReferenceExpLayerTest : public testing::TestWithParam<ExpParams>, public CommonReferenceTest {

View File

@ -46,13 +46,13 @@ struct ExperimentalDOParams {
PartialShape imageSizeInfoShape;
ov::element::Type inType;
ov::element::Type outType;
ov::runtime::Tensor roisData;
ov::runtime::Tensor deltasData;
ov::runtime::Tensor scoresData;
ov::runtime::Tensor imageSizeInfoData;
ov::runtime::Tensor refBoxesData;
ov::runtime::Tensor refClassesData;
ov::runtime::Tensor refScoresData;
ov::Tensor roisData;
ov::Tensor deltasData;
ov::Tensor scoresData;
ov::Tensor imageSizeInfoData;
ov::Tensor refBoxesData;
ov::Tensor refClassesData;
ov::Tensor refScoresData;
std::string testcaseName;
};

View File

@ -56,10 +56,10 @@ struct ExperimentalPGGParams {
size_t actualComparisonSize;
ov::element::Type inType;
ov::element::Type outType;
ov::runtime::Tensor priorsData;
ov::runtime::Tensor featureMapData;
ov::runtime::Tensor imageSizeInfoData;
ov::runtime::Tensor refData;
ov::Tensor priorsData;
ov::Tensor featureMapData;
ov::Tensor imageSizeInfoData;
ov::Tensor refData;
std::string testcaseName;
};

View File

@ -45,12 +45,12 @@ struct ExperimentalGPParams {
PartialShape scoresShape;
ov::element::Type inType;
ov::element::Type outType;
ov::runtime::Tensor imageSizeInfoData;
ov::runtime::Tensor anchorsData;
ov::runtime::Tensor deltasData;
ov::runtime::Tensor scoresData;
ov::runtime::Tensor refRoisData;
ov::runtime::Tensor refScoresData;
ov::Tensor imageSizeInfoData;
ov::Tensor anchorsData;
ov::Tensor deltasData;
ov::Tensor scoresData;
ov::Tensor refRoisData;
ov::Tensor refScoresData;
std::string testcaseName;
};

View File

@ -11,15 +11,15 @@ using namespace ov;
using namespace reference_tests;
struct ExperimentalROIParams {
ExperimentalROIParams(const std::vector<Tensor>& experimental_detectron_roi_feature_inputs,
const std::vector<Tensor>& expected_results,
ExperimentalROIParams(const std::vector<reference_tests::Tensor>& experimental_detectron_roi_feature_inputs,
const std::vector<reference_tests::Tensor>& expected_results,
const std::string& test_case_name)
: inputs{experimental_detectron_roi_feature_inputs},
expected_results{expected_results},
test_case_name{test_case_name} {}
std::vector<Tensor> inputs;
std::vector<Tensor> expected_results;
std::vector<reference_tests::Tensor> inputs;
std::vector<reference_tests::Tensor> expected_results;
std::string test_case_name;
};
@ -44,7 +44,7 @@ public:
}
private:
std::shared_ptr<Model> create_function(const std::vector<Tensor>& inputs) {
std::shared_ptr<Model> create_function(const std::vector<reference_tests::Tensor>& inputs) {
op::v6::ExperimentalDetectronROIFeatureExtractor::Attributes attrs;
attrs.aligned = false;
attrs.output_size = 3;
@ -76,13 +76,13 @@ INSTANTIATE_TEST_SUITE_P(
ReferenceExperimentalROILayerTest,
::testing::Values(
ExperimentalROIParams(
std::vector<Tensor>{Tensor(Shape{2, 4},
std::vector<reference_tests::Tensor>{reference_tests::Tensor(Shape{2, 4},
ov::element::f32,
std::vector<float>{0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0}),
Tensor(Shape{1, 2, 2, 3},
reference_tests::Tensor(Shape{1, 2, 2, 3},
ov::element::f32,
std::vector<float>{0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0})},
std::vector<Tensor>{Tensor(Shape{2, 2, 3, 3},
std::vector<reference_tests::Tensor>{reference_tests::Tensor(Shape{2, 2, 3, 3},
ov::element::f32,
std::vector<float>{1.416667,
1.75,
@ -120,18 +120,18 @@ INSTANTIATE_TEST_SUITE_P(
5.083333,
5.25,
5.416667}),
Tensor(Shape{2, 4},
reference_tests::Tensor(Shape{2, 4},
ov::element::f32,
std::vector<float>{0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0})},
"experimental_detectron_roi_feature_eval_f32"),
ExperimentalROIParams(
std::vector<Tensor>{Tensor(Shape{2, 4},
std::vector<reference_tests::Tensor>{reference_tests::Tensor(Shape{2, 4},
ov::element::f16,
std::vector<ngraph::float16>{0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0}),
Tensor(Shape{1, 2, 2, 3},
reference_tests::Tensor(Shape{1, 2, 2, 3},
ov::element::f16,
std::vector<ngraph::float16>{0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0})},
std::vector<Tensor>{Tensor(Shape{2, 2, 3, 3},
std::vector<reference_tests::Tensor>{reference_tests::Tensor(Shape{2, 2, 3, 3},
ov::element::f16,
std::vector<ngraph::float16>{1.416667,
1.75,
@ -169,18 +169,18 @@ INSTANTIATE_TEST_SUITE_P(
5.083333,
5.25,
5.416667}),
Tensor(Shape{2, 4},
reference_tests::Tensor(Shape{2, 4},
ov::element::f16,
std::vector<ngraph::float16>{0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0})},
"experimental_detectron_roi_feature_eval_f16"),
ExperimentalROIParams(
std::vector<Tensor>{Tensor(Shape{2, 4},
std::vector<reference_tests::Tensor>{reference_tests::Tensor(Shape{2, 4},
ov::element::bf16,
std::vector<ngraph::bfloat16>{0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0}),
Tensor(Shape{1, 2, 2, 3},
reference_tests::Tensor(Shape{1, 2, 2, 3},
ov::element::bf16,
std::vector<ngraph::bfloat16>{0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0})},
std::vector<Tensor>{Tensor(Shape{2, 2, 3, 3},
std::vector<reference_tests::Tensor>{reference_tests::Tensor(Shape{2, 2, 3, 3},
ov::element::bf16,
std::vector<ngraph::bfloat16>{1.416667,
1.75,
@ -218,7 +218,7 @@ INSTANTIATE_TEST_SUITE_P(
5.083333,
5.25,
5.416667}),
Tensor(Shape{2, 4},
reference_tests::Tensor(Shape{2, 4},
ov::element::bf16,
std::vector<ngraph::bfloat16>{0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0})},
"experimental_detectron_roi_feature_eval_bf16")));

View File

@ -13,15 +13,15 @@ using namespace ov;
namespace {
struct ExperimentalDetectronTopKROIsParams {
ExperimentalDetectronTopKROIsParams(
const Tensor& dataTensor, const Tensor& probsTensor, const int32_t numRois,
const Tensor& expectedTensor, const std::string& testcaseName = "") :
const reference_tests::Tensor& dataTensor, const reference_tests::Tensor& probsTensor, const int32_t numRois,
const reference_tests::Tensor& expectedTensor, const std::string& testcaseName = "") :
dataTensor(dataTensor), probsTensor(probsTensor), numRois(numRois),
expectedTensor(expectedTensor), testcaseName(testcaseName) {}
Tensor dataTensor;
Tensor probsTensor;
reference_tests::Tensor dataTensor;
reference_tests::Tensor probsTensor;
int32_t numRois;
Tensor expectedTensor;
reference_tests::Tensor expectedTensor;
std::string testcaseName;
};
@ -72,17 +72,17 @@ std::vector<ExperimentalDetectronTopKROIsParams> generateParams() {
using T = typename element_type_traits<ET>::value_type;
std::vector<ExperimentalDetectronTopKROIsParams> params {
ExperimentalDetectronTopKROIsParams(
Tensor(ET, {2, 4}, std::vector<T>{1.0f, 1.0f, 3.0f, 4.0f, 2.0f, 1.0f, 5.0f, 7.0f}),
Tensor(ET, {2}, std::vector<T>{0.5f, 0.3f}),
reference_tests::Tensor(ET, {2, 4}, std::vector<T>{1.0f, 1.0f, 3.0f, 4.0f, 2.0f, 1.0f, 5.0f, 7.0f}),
reference_tests::Tensor(ET, {2}, std::vector<T>{0.5f, 0.3f}),
1,
Tensor(ET, {1, 4}, std::vector<T>{1.0, 1.0, 3.0, 4.0}),
reference_tests::Tensor(ET, {1, 4}, std::vector<T>{1.0, 1.0, 3.0, 4.0}),
"experimental_detectron_topk_rois_eval"),
ExperimentalDetectronTopKROIsParams(
Tensor(ET, {4, 4}, std::vector<T>{1.0f, 1.0f, 4.0f, 5.0f, 3.0f, 2.0f, 7.0f, 9.0f,
reference_tests::Tensor(ET, {4, 4}, std::vector<T>{1.0f, 1.0f, 4.0f, 5.0f, 3.0f, 2.0f, 7.0f, 9.0f,
10.0f, 15.0f, 13.0f, 17.0f, 13.0f, 10.0f, 18.0f, 15.0f}),
Tensor(ET, {4}, std::vector<T>{0.1f, 0.7f, 0.5f, 0.9f}),
reference_tests::Tensor(ET, {4}, std::vector<T>{0.1f, 0.7f, 0.5f, 0.9f}),
2,
Tensor(ET, {2, 4}, std::vector<T>{13.0f, 10.0f, 18.0f, 15.0f, 3.0f, 2.0f, 7.0f, 9.0f}),
reference_tests::Tensor(ET, {2, 4}, std::vector<T>{13.0f, 10.0f, 18.0f, 15.0f, 3.0f, 2.0f, 7.0f, 9.0f}),
"experimental_detectron_topk_rois_eval"),
};
return params;

View File

@ -13,12 +13,12 @@ using namespace ov;
namespace {
struct ExtractImagePatchesParams {
Tensor data;
reference_tests::Tensor data;
Shape sizes;
Strides strides;
Shape rates;
op::PadType autoPad;
Tensor expectedResult;
reference_tests::Tensor expectedResult;
std::string testcaseName;
};

View File

@ -44,8 +44,8 @@ struct FakeQuantizeParams {
Shape m_expected_shape;
element::Type m_input_type;
element::Type m_expected_type;
runtime::Tensor m_input_data;
runtime::Tensor m_expected_data;
ov::Tensor m_input_data;
ov::Tensor m_expected_data;
std::shared_ptr<op::v0::Constant> m_input_low;
std::shared_ptr<op::v0::Constant> m_input_high;
std::shared_ptr<op::v0::Constant> m_output_low;

View File

@ -26,8 +26,8 @@ struct FloorParams {
PartialShape pshape;
element::Type inType;
element::Type outType;
runtime::Tensor inputData;
runtime::Tensor refData;
ov::Tensor inputData;
ov::Tensor refData;
};
class ReferenceFloorLayerTest : public testing::TestWithParam<FloorParams>, public CommonReferenceTest {

View File

@ -31,9 +31,9 @@ struct FloorModParams {
PartialShape pshape2;
element::Type inType;
element::Type outType;
runtime::Tensor inputData1;
runtime::Tensor inputData2;
runtime::Tensor refData;
ov::Tensor inputData1;
ov::Tensor inputData2;
ov::Tensor refData;
};
class ReferenceFloorModLayerTest : public testing::TestWithParam<FloorModParams>, public CommonReferenceTest {

View File

@ -15,15 +15,15 @@ using namespace ov;
namespace {
struct GatherParams {
GatherParams(
const Tensor& dataTensor, const Tensor& indicesTensor, const Tensor& axisTensor,
const Tensor& expectedTensor, const std::string& testcaseName = "") :
const reference_tests::Tensor& dataTensor, const reference_tests::Tensor& indicesTensor, const reference_tests::Tensor& axisTensor,
const reference_tests::Tensor& expectedTensor, const std::string& testcaseName = "") :
dataTensor(dataTensor), indicesTensor(indicesTensor), axisTensor(axisTensor),
expectedTensor(expectedTensor), testcaseName(testcaseName) {}
Tensor dataTensor;
Tensor indicesTensor;
Tensor axisTensor;
Tensor expectedTensor;
reference_tests::Tensor dataTensor;
reference_tests::Tensor indicesTensor;
reference_tests::Tensor axisTensor;
reference_tests::Tensor expectedTensor;
std::string testcaseName;
};
@ -73,16 +73,16 @@ TEST_P(ReferenceGatherTest, CompareWithRefs) {
struct GatherParamsV7 {
GatherParamsV7(
const Tensor& dataTensor, const Tensor& indicesTensor, const Tensor& axisTensor, int64_t batchDims,
const Tensor& expectedTensor, const std::string& testcaseName = "") :
const reference_tests::Tensor& dataTensor, const reference_tests::Tensor& indicesTensor, const reference_tests::Tensor& axisTensor, int64_t batchDims,
const reference_tests::Tensor& expectedTensor, const std::string& testcaseName = "") :
dataTensor(dataTensor), indicesTensor(indicesTensor), axisTensor(axisTensor), batchDims(batchDims),
expectedTensor(expectedTensor), testcaseName(testcaseName) {}
Tensor dataTensor;
Tensor indicesTensor;
Tensor axisTensor;
reference_tests::Tensor dataTensor;
reference_tests::Tensor indicesTensor;
reference_tests::Tensor axisTensor;
int64_t batchDims;
Tensor expectedTensor;
reference_tests::Tensor expectedTensor;
std::string testcaseName;
};
@ -155,25 +155,25 @@ std::vector<GatherParams> generateParams() {
using T_A = typename element_type_traits<ET_A>::value_type;
std::vector<GatherParams> params {
GatherParams(
Tensor(ET, {3, 2}, std::vector<T>{
reference_tests::Tensor(ET, {3, 2}, std::vector<T>{
10, 11, 20, 21, 30, 31}),
Tensor(ET_I, {2, 2, 3, 4}, std::vector<T_I>{
reference_tests::Tensor(ET_I, {2, 2, 3, 4}, std::vector<T_I>{
0, 1, 1, 2, 0, 1, 1, 2, 0, 1, 1, 2, 0, 1, 1, 2, 0, 1, 1, 2, 0, 1, 1, 2,
0, 1, 1, 2, 0, 1, 1, 2, 0, 1, 1, 2, 0, 1, 1, 2, 0, 1, 1, 2, 0, 1, 1, 2}),
Tensor(ET_A, {}, std::vector<T_A>{0}),
Tensor(ET, {2, 2, 3, 4, 2}, std::vector<T>{
reference_tests::Tensor(ET_A, {}, std::vector<T_A>{0}),
reference_tests::Tensor(ET, {2, 2, 3, 4, 2}, std::vector<T>{
10, 11, 20, 21, 20, 21, 30, 31, 10, 11, 20, 21, 20, 21, 30, 31, 10, 11, 20, 21, 20, 21, 30, 31,
10, 11, 20, 21, 20, 21, 30, 31, 10, 11, 20, 21, 20, 21, 30, 31, 10, 11, 20, 21, 20, 21, 30, 31,
10, 11, 20, 21, 20, 21, 30, 31, 10, 11, 20, 21, 20, 21, 30, 31, 10, 11, 20, 21, 20, 21, 30, 31,
10, 11, 20, 21, 20, 21, 30, 31, 10, 11, 20, 21, 20, 21, 30, 31, 10, 11, 20, 21, 20, 21, 30, 31}),
"gather_4d_indices_axis_0"),
GatherParams(
Tensor(ET, {3, 2}, std::vector<T>{
reference_tests::Tensor(ET, {3, 2}, std::vector<T>{
10, 11, 20, 21, 30, 31}),
Tensor(ET_I, {2, 2}, std::vector<T_I>{
reference_tests::Tensor(ET_I, {2, 2}, std::vector<T_I>{
0, 1, 1, 2}),
Tensor(ET_A, {}, std::vector<T_A>{0}),
Tensor(ET, {2, 2, 2}, std::vector<T>{
reference_tests::Tensor(ET_A, {}, std::vector<T_A>{0}),
reference_tests::Tensor(ET, {2, 2, 2}, std::vector<T>{
10, 11, 20, 21, 20, 21, 30, 31}),
"gather_axis_0"),
};
@ -187,11 +187,11 @@ std::vector<GatherParams> generateParamsFloatValue() {
using T_A = typename element_type_traits<ET_A>::value_type;
std::vector<GatherParams> params {
GatherParams(
Tensor(ET, {3, 2}, std::vector<T>{
reference_tests::Tensor(ET, {3, 2}, std::vector<T>{
1.0f, 1.1f,
2.0f, 2.1f,
3.0f, 3.1f}),
Tensor(ET_I, {2, 2, 3, 4}, std::vector<T_I>{
reference_tests::Tensor(ET_I, {2, 2, 3, 4}, std::vector<T_I>{
0, 1, 1, 2,
0, 1, 1, 2,
0, 1, 1, 2,
@ -208,8 +208,8 @@ std::vector<GatherParams> generateParamsFloatValue() {
0, 1, 1, 2,
0, 1, 1, 2,
0, 1, 1, 2}),
Tensor(ET_A, {}, std::vector<T_A>{0}),
Tensor(ET, {2, 2, 3, 4, 2}, std::vector<T>{
reference_tests::Tensor(ET_A, {}, std::vector<T_A>{0}),
reference_tests::Tensor(ET, {2, 2, 3, 4, 2}, std::vector<T>{
1.0f, 1.1f,
2.0f, 2.1f,
2.0f, 2.1f,
@ -276,11 +276,11 @@ std::vector<GatherParams> generateParamsFloatValue() {
3.0f, 3.1f}),
"gather_4d_indices_axis_0_2d_input"),
GatherParams(
Tensor(ET, {3, 2}, std::vector<T>{
reference_tests::Tensor(ET, {3, 2}, std::vector<T>{
1.0f, 1.1f,
2.0f, 2.1f,
3.0f, 3.1f}),
Tensor(ET_I, {2, 3, 4}, std::vector<T_I>{
reference_tests::Tensor(ET_I, {2, 3, 4}, std::vector<T_I>{
0, 1, 1, 2,
0, 1, 1, 2,
0, 1, 1, 2,
@ -288,8 +288,8 @@ std::vector<GatherParams> generateParamsFloatValue() {
0, 1, 1, 2,
0, 1, 1, 2,
0, 1, 1, 2}),
Tensor(ET_A, {}, std::vector<T_A>{0}),
Tensor(ET, {2, 3, 4, 2}, std::vector<T>{
reference_tests::Tensor(ET_A, {}, std::vector<T_A>{0}),
reference_tests::Tensor(ET, {2, 3, 4, 2}, std::vector<T>{
1.0f, 1.1f,
2.0f, 2.1f,
2.0f, 2.1f,
@ -322,14 +322,14 @@ std::vector<GatherParams> generateParamsFloatValue() {
3.0f, 3.1f}),
"gather_3d_indices_axis_0_2d_input"),
GatherParams(
Tensor(ET, {3, 2}, std::vector<T>{
reference_tests::Tensor(ET, {3, 2}, std::vector<T>{
1.0f, 1.1f,
2.0f, 2.1f,
3.0f, 3.1f}),
Tensor(ET_I, {2, 2}, std::vector<T_I>{
reference_tests::Tensor(ET_I, {2, 2}, std::vector<T_I>{
0, 1, 1, 2}),
Tensor(ET_A, {}, std::vector<T_A>{0}),
Tensor(ET, {2, 2, 2}, std::vector<T>{
reference_tests::Tensor(ET_A, {}, std::vector<T_A>{0}),
reference_tests::Tensor(ET, {2, 2, 2}, std::vector<T>{
1.0f, 1.1f,
2.0f, 2.1f,
@ -337,14 +337,14 @@ std::vector<GatherParams> generateParamsFloatValue() {
3.0f, 3.1f}),
"gather_2d_indices_axis_0_2d_input"),
GatherParams(
Tensor(ET, {3, 2}, std::vector<T>{
reference_tests::Tensor(ET, {3, 2}, std::vector<T>{
1.0f, 1.1f,
2.0f, 2.1f,
3.0f, 3.1f}),
Tensor(ET_I, {2, 2}, std::vector<T_I>{
reference_tests::Tensor(ET_I, {2, 2}, std::vector<T_I>{
0, -2, 1, 2}),
Tensor(ET_A, {}, std::vector<T_A>{0}),
Tensor(ET, {2, 2, 2}, std::vector<T>{
reference_tests::Tensor(ET_A, {}, std::vector<T_A>{0}),
reference_tests::Tensor(ET, {2, 2, 2}, std::vector<T>{
1.0f, 1.1f,
2.0f, 2.1f,
@ -352,37 +352,37 @@ std::vector<GatherParams> generateParamsFloatValue() {
3.0f, 3.1f}),
"gather_2d_negative_and_positive_indices_axis_0_2d_input"),
GatherParams(
Tensor(ET, {3}, std::vector<T>{
reference_tests::Tensor(ET, {3}, std::vector<T>{
1.0f, 2.0f, 3.0f}),
Tensor(ET_I, {2}, std::vector<T_I>{
reference_tests::Tensor(ET_I, {2}, std::vector<T_I>{
1, 0}),
Tensor(ET_A, {}, std::vector<T_A>{0}),
Tensor(ET, {2}, std::vector<T>{
reference_tests::Tensor(ET_A, {}, std::vector<T_A>{0}),
reference_tests::Tensor(ET, {2}, std::vector<T>{
2.0f, 1.0f}),
"gather_1d_indices_axis_0_1d_input"),
GatherParams(
Tensor(ET, {3, 2}, std::vector<T>{
reference_tests::Tensor(ET, {3, 2}, std::vector<T>{
1.0f, 1.1f, 2.0f, 2.1f, 3.0f, 3.1f}),
Tensor(ET_I, {}, std::vector<T_I>{1}),
Tensor(ET_A, {}, std::vector<T_A>{0}),
Tensor(ET, {2}, std::vector<T>{
reference_tests::Tensor(ET_I, {}, std::vector<T_I>{1}),
reference_tests::Tensor(ET_A, {}, std::vector<T_A>{0}),
reference_tests::Tensor(ET, {2}, std::vector<T>{
2.0f, 2.1f}),
"gather_scalar_indices_axis_0_2d_input"),
GatherParams(
Tensor(ET, {3, 3}, std::vector<T>{
reference_tests::Tensor(ET, {3, 3}, std::vector<T>{
1.0f, 1.1f, 1.2f,
2.0f, 2.1f, 2.2f,
3.0f, 3.1f, 3.2f}),
Tensor(ET_I, {1, 2}, std::vector<T_I>{
reference_tests::Tensor(ET_I, {1, 2}, std::vector<T_I>{
0, 2}),
Tensor(ET_A, {}, std::vector<T_A>{1}),
Tensor(ET, {3, 1, 2}, std::vector<T>{
reference_tests::Tensor(ET_A, {}, std::vector<T_A>{1}),
reference_tests::Tensor(ET, {3, 1, 2}, std::vector<T>{
1.0f, 1.2f,
2.0f, 2.2f,
3.0f, 3.2f}),
"gather_2d_indices_axis_1_2d_input"),
GatherParams(
Tensor(ET, {2, 2, 3, 3}, std::vector<T>{
reference_tests::Tensor(ET, {2, 2, 3, 3}, std::vector<T>{
1.0f, 1.1f, 1.2f,
2.0f, 2.1f, 2.2f,
3.0f, 3.1f, 3.2f,
@ -399,10 +399,10 @@ std::vector<GatherParams> generateParamsFloatValue() {
111.0f, 111.1f, 111.2f,
112.0f, 112.1f, 112.2f,
113.0f, 113.1f, 113.2f}),
Tensor(ET_I, {2}, std::vector<T_I>{
reference_tests::Tensor(ET_I, {2}, std::vector<T_I>{
0, 2}),
Tensor(ET_A, {}, std::vector<T_A>{2}),
Tensor(ET, {2, 2, 2, 3}, std::vector<T>{
reference_tests::Tensor(ET_A, {}, std::vector<T_A>{2}),
reference_tests::Tensor(ET, {2, 2, 2, 3}, std::vector<T>{
1.0f, 1.1f, 1.2f,
3.0f, 3.1f, 3.2f,
@ -417,11 +417,11 @@ std::vector<GatherParams> generateParamsFloatValue() {
113.0f, 113.1f, 113.2f}),
"gather_1d_indices_axis_2_4d_input"),
GatherParams(
Tensor(ET, {3, 3}, std::vector<T>{
reference_tests::Tensor(ET, {3, 3}, std::vector<T>{
1.0f, 1.1f, 1.2f, 2.0f, 2.1f, 2.2f, 3.0f, 3.1f, 3.2f}),
Tensor(ET_I, {}, std::vector<T_I>{0}),
Tensor(ET_A, {}, std::vector<T_A>{1}),
Tensor(ET, {3}, std::vector<T>{
reference_tests::Tensor(ET_I, {}, std::vector<T_I>{0}),
reference_tests::Tensor(ET_A, {}, std::vector<T_A>{1}),
reference_tests::Tensor(ET, {3}, std::vector<T>{
1.0f, 2.0f, 3.0f}),
"gather_scalar_indices_axis_1_2d_input"),
};
@ -461,38 +461,38 @@ std::vector<GatherParamsV7> generateParamsV7() {
using T_A = typename element_type_traits<ET_A>::value_type;
std::vector<GatherParamsV7> params {
GatherParamsV7(
Tensor(ET, {3}, std::vector<T>{
reference_tests::Tensor(ET, {3}, std::vector<T>{
1, 2, 3}),
Tensor(ET_I, {2}, std::vector<T_I>{
reference_tests::Tensor(ET_I, {2}, std::vector<T_I>{
2, 0}),
Tensor(ET_A, {}, std::vector<T_A>{0}),
reference_tests::Tensor(ET_A, {}, std::vector<T_A>{0}),
0,
Tensor(ET, {2}, std::vector<T>{
reference_tests::Tensor(ET, {2}, std::vector<T>{
3, 1}),
"gather_v7_1d"),
GatherParamsV7(
Tensor(ET, {3, 2}, std::vector<T>{
reference_tests::Tensor(ET, {3, 2}, std::vector<T>{
10, 11, 20, 21, 30, 31}),
Tensor(ET_I, {2, 2}, std::vector<T_I>{
reference_tests::Tensor(ET_I, {2, 2}, std::vector<T_I>{
0, 1, 1, 2}),
Tensor(ET_A, {}, std::vector<T_A>{0}),
reference_tests::Tensor(ET_A, {}, std::vector<T_A>{0}),
0,
Tensor(ET, {2, 2, 2}, std::vector<T>{
reference_tests::Tensor(ET, {2, 2, 2}, std::vector<T>{
10, 11, 20, 21, 20, 21, 30, 31}),
"gather_v7_axis_0"),
GatherParamsV7(
Tensor(ET, {2, 3}, std::vector<T>{
reference_tests::Tensor(ET, {2, 3}, std::vector<T>{
1, 2, 3,
4, 5, 6}),
Tensor(ET_I, {2, 2, 2}, std::vector<T_I>{
reference_tests::Tensor(ET_I, {2, 2, 2}, std::vector<T_I>{
0, 1,
1, 2,
2, 0,
1, 2}),
Tensor(ET_A, {}, std::vector<T_A>{1}),
reference_tests::Tensor(ET_A, {}, std::vector<T_A>{1}),
1,
Tensor(ET, {2, 2, 2}, std::vector<T>{
reference_tests::Tensor(ET, {2, 2, 2}, std::vector<T>{
1, 2,
2, 3,
@ -500,33 +500,33 @@ std::vector<GatherParamsV7> generateParamsV7() {
5, 6}),
"gather_v7_data_int32_3d_indices_axis_1_batch_dims_1"),
GatherParamsV7(
Tensor(ET, {2, 5}, std::vector<T>{
reference_tests::Tensor(ET, {2, 5}, std::vector<T>{
1, 2, 3, 4, 5,
6, 7, 8, 9, 10}),
Tensor(ET_I, {2, 3}, std::vector<T_I>{
reference_tests::Tensor(ET_I, {2, 3}, std::vector<T_I>{
0, 0, 4,
4, 0, 0}),
Tensor(ET_A, {}, std::vector<T_A>{1}),
reference_tests::Tensor(ET_A, {}, std::vector<T_A>{1}),
1,
Tensor(ET, {2, 3}, std::vector<T>{
reference_tests::Tensor(ET, {2, 3}, std::vector<T>{
1, 1, 5,
10, 6, 6}),
"gather_v7_data_int32_2d_indices_axis_1_batch_dims_1"),
GatherParamsV7(
Tensor(ET, {2, 5}, std::vector<T>{
reference_tests::Tensor(ET, {2, 5}, std::vector<T>{
1, 2, 3, 4, 5,
6, 7, 8, 9, 10}),
Tensor(ET_I, {2, 3}, std::vector<T_I>{
reference_tests::Tensor(ET_I, {2, 3}, std::vector<T_I>{
0, 0, 4,
4, 0, 0}),
Tensor(ET_A, {}, std::vector<T_A>{1}),
reference_tests::Tensor(ET_A, {}, std::vector<T_A>{1}),
-1,
Tensor(ET, {2, 3}, std::vector<T>{
reference_tests::Tensor(ET, {2, 3}, std::vector<T>{
1, 1, 5,
10, 6, 6}),
"gather_v7_data_int32_2d_indices_axis_1_negative_batch_dims"),
GatherParamsV7(
Tensor(ET, {2, 1, 5, 4}, std::vector<T>{
reference_tests::Tensor(ET, {2, 1, 5, 4}, std::vector<T>{
1, 2, 3, 4,
5, 6, 7, 8,
9, 10, 11, 12,
@ -538,12 +538,12 @@ std::vector<GatherParamsV7> generateParamsV7() {
29, 30, 31, 32,
33, 34, 35, 36,
37, 38, 39, 40}),
Tensor(ET_I, {2, 3}, std::vector<T_I>{
reference_tests::Tensor(ET_I, {2, 3}, std::vector<T_I>{
1, 2, 4,
4, 3, 2}),
Tensor(ET_A, {}, std::vector<T_A>{2}),
reference_tests::Tensor(ET_A, {}, std::vector<T_A>{2}),
1,
Tensor(ET, {2, 1, 3, 4}, std::vector<T>{
reference_tests::Tensor(ET, {2, 1, 3, 4}, std::vector<T>{
5, 6, 7, 8,
9, 10, 11, 12,
17, 18, 19, 20,
@ -560,13 +560,13 @@ template <>
std::vector<GatherParamsV7> generateParamsV7<element::boolean, element::i32, element::i64>() {
std::vector<GatherParamsV7> params {
GatherParamsV7(
Tensor(element::boolean, {3, 2}, std::vector<char>{
reference_tests::Tensor(element::boolean, {3, 2}, std::vector<char>{
1, 1, 1, 0, 0, 1}),
Tensor(element::i32, {2, 2}, std::vector<int32_t>{
reference_tests::Tensor(element::i32, {2, 2}, std::vector<int32_t>{
0, 1, 1, 2}),
Tensor(element::i64, {}, std::vector<int64_t>{0}),
reference_tests::Tensor(element::i64, {}, std::vector<int64_t>{0}),
0,
Tensor(element::boolean, {2, 2, 2}, std::vector<char>{
reference_tests::Tensor(element::boolean, {2, 2, 2}, std::vector<char>{
1, 1, 1, 0, 1, 0, 0, 1}),
"gather_v7_axis_0_bool"),
};
@ -580,11 +580,11 @@ std::vector<GatherParamsV7> generateParamsFloatValueV7() {
using T_A = typename element_type_traits<ET_A>::value_type;
std::vector<GatherParamsV7> params {
GatherParamsV7(
Tensor(ET, {3, 2}, std::vector<T>{
reference_tests::Tensor(ET, {3, 2}, std::vector<T>{
1.0f, 1.1f,
2.0f, 2.1f,
3.0f, 3.1f}),
Tensor(ET_I, {2, 2, 3, 4}, std::vector<T_I>{
reference_tests::Tensor(ET_I, {2, 2, 3, 4}, std::vector<T_I>{
0, 1, 1, 2,
0, 1, 1, 2,
0, 1, 1, 2,
@ -601,9 +601,9 @@ std::vector<GatherParamsV7> generateParamsFloatValueV7() {
0, 1, 1, 2,
0, 1, 1, 2,
0, 1, 1, 2}),
Tensor(ET_A, {}, std::vector<T_A>{0}),
reference_tests::Tensor(ET_A, {}, std::vector<T_A>{0}),
0,
Tensor(ET, {2, 2, 3, 4, 2}, std::vector<T>{
reference_tests::Tensor(ET, {2, 2, 3, 4, 2}, std::vector<T>{
1.0f, 1.1f,
2.0f, 2.1f,
2.0f, 2.1f,
@ -670,11 +670,11 @@ std::vector<GatherParamsV7> generateParamsFloatValueV7() {
3.0f, 3.1f}),
"gather_v7_4d_indices_axis_0_2d_input"),
GatherParamsV7(
Tensor(ET, {3, 2}, std::vector<T>{
reference_tests::Tensor(ET, {3, 2}, std::vector<T>{
1.0f, 1.1f,
2.0f, 2.1f,
3.0f, 3.1f}),
Tensor(ET_I, {2, 3, 4}, std::vector<T_I>{
reference_tests::Tensor(ET_I, {2, 3, 4}, std::vector<T_I>{
0, 1, 1, 2,
0, 1, 1, 2,
0, 1, 1, 2,
@ -682,9 +682,9 @@ std::vector<GatherParamsV7> generateParamsFloatValueV7() {
0, 1, 1, 2,
0, 1, 1, 2,
0, 1, 1, 2}),
Tensor(ET_A, {}, std::vector<T_A>{0}),
reference_tests::Tensor(ET_A, {}, std::vector<T_A>{0}),
0,
Tensor(ET, {2, 3, 4, 2}, std::vector<T>{
reference_tests::Tensor(ET, {2, 3, 4, 2}, std::vector<T>{
1.0f, 1.1f,
2.0f, 2.1f,
2.0f, 2.1f,
@ -717,15 +717,15 @@ std::vector<GatherParamsV7> generateParamsFloatValueV7() {
3.0f, 3.1f}),
"gather_v7_3d_indices_axis_0_2d_input"),
GatherParamsV7(
Tensor(ET, {3, 2}, std::vector<T>{
reference_tests::Tensor(ET, {3, 2}, std::vector<T>{
1.0f, 1.1f,
2.0f, 2.1f,
3.0f, 3.1f}),
Tensor(ET_I, {2, 2}, std::vector<T_I>{
reference_tests::Tensor(ET_I, {2, 2}, std::vector<T_I>{
0, 1, 1, 2}),
Tensor(ET_A, {}, std::vector<T_A>{0}),
reference_tests::Tensor(ET_A, {}, std::vector<T_A>{0}),
0,
Tensor(ET, {2, 2, 2}, std::vector<T>{
reference_tests::Tensor(ET, {2, 2, 2}, std::vector<T>{
1.0f, 1.1f,
2.0f, 2.1f,
@ -733,15 +733,15 @@ std::vector<GatherParamsV7> generateParamsFloatValueV7() {
3.0f, 3.1f}),
"gather_v7_2d_indices_axis_0_2d_input"),
GatherParamsV7(
Tensor(ET, {3, 2}, std::vector<T>{
reference_tests::Tensor(ET, {3, 2}, std::vector<T>{
1.0f, 1.1f,
2.0f, 2.1f,
3.0f, 3.1f}),
Tensor(ET_I, {2, 2}, std::vector<T_I>{
reference_tests::Tensor(ET_I, {2, 2}, std::vector<T_I>{
0, -2, 1, 2}),
Tensor(ET_A, {}, std::vector<T_A>{0}),
reference_tests::Tensor(ET_A, {}, std::vector<T_A>{0}),
0,
Tensor(ET, {2, 2, 2}, std::vector<T>{
reference_tests::Tensor(ET, {2, 2, 2}, std::vector<T>{
1.0f, 1.1f,
2.0f, 2.1f,
@ -749,40 +749,40 @@ std::vector<GatherParamsV7> generateParamsFloatValueV7() {
3.0f, 3.1f}),
"gather_v7_2d_negative_and_positive_indices_axis_0_2d_input"),
GatherParamsV7(
Tensor(ET, {3}, std::vector<T>{
reference_tests::Tensor(ET, {3}, std::vector<T>{
1.0f, 2.0f, 3.0f}),
Tensor(ET_I, {2}, std::vector<T_I>{
reference_tests::Tensor(ET_I, {2}, std::vector<T_I>{
1, 0}),
Tensor(ET_A, {}, std::vector<T_A>{0}),
reference_tests::Tensor(ET_A, {}, std::vector<T_A>{0}),
0,
Tensor(ET, {2}, std::vector<T>{
reference_tests::Tensor(ET, {2}, std::vector<T>{
2.0f, 1.0f}),
"gather_v7_1d_indices_axis_0_1d_input"),
GatherParamsV7(
Tensor(ET, {3, 2}, std::vector<T>{
reference_tests::Tensor(ET, {3, 2}, std::vector<T>{
1.0f, 1.1f, 2.0f, 2.1f, 3.0f, 3.1f}),
Tensor(ET_I, {}, std::vector<T_I>{1}),
Tensor(ET_A, {}, std::vector<T_A>{0}),
reference_tests::Tensor(ET_I, {}, std::vector<T_I>{1}),
reference_tests::Tensor(ET_A, {}, std::vector<T_A>{0}),
0,
Tensor(ET, {2}, std::vector<T>{
reference_tests::Tensor(ET, {2}, std::vector<T>{
2.0f, 2.1f}),
"gather_v7_scalar_indices_axis_0_2d_input"),
GatherParamsV7(
Tensor(ET, {3, 3}, std::vector<T>{
reference_tests::Tensor(ET, {3, 3}, std::vector<T>{
1.0f, 1.1f, 1.2f,
2.0f, 2.1f, 2.2f,
3.0f, 3.1f, 3.2f}),
Tensor(ET_I, {1, 2}, std::vector<T_I>{
reference_tests::Tensor(ET_I, {1, 2}, std::vector<T_I>{
0, 2}),
Tensor(ET_A, {}, std::vector<T_A>{1}),
reference_tests::Tensor(ET_A, {}, std::vector<T_A>{1}),
0,
Tensor(ET, {3, 1, 2}, std::vector<T>{
reference_tests::Tensor(ET, {3, 1, 2}, std::vector<T>{
1.0f, 1.2f,
2.0f, 2.2f,
3.0f, 3.2f}),
"gather_v7_2d_indices_axis_1_2d_input"),
GatherParamsV7(
Tensor(ET, {2, 2, 3, 3}, std::vector<T>{
reference_tests::Tensor(ET, {2, 2, 3, 3}, std::vector<T>{
1.0f, 1.1f, 1.2f,
2.0f, 2.1f, 2.2f,
3.0f, 3.1f, 3.2f,
@ -799,11 +799,11 @@ std::vector<GatherParamsV7> generateParamsFloatValueV7() {
111.0f, 111.1f, 111.2f,
112.0f, 112.1f, 112.2f,
113.0f, 113.1f, 113.2f}),
Tensor(ET_I, {2}, std::vector<T_I>{
reference_tests::Tensor(ET_I, {2}, std::vector<T_I>{
0, 2}),
Tensor(ET_A, {}, std::vector<T_A>{2}),
reference_tests::Tensor(ET_A, {}, std::vector<T_A>{2}),
0,
Tensor(ET, {2, 2, 2, 3}, std::vector<T>{
reference_tests::Tensor(ET, {2, 2, 2, 3}, std::vector<T>{
1.0f, 1.1f, 1.2f,
3.0f, 3.1f, 3.2f,
@ -818,16 +818,16 @@ std::vector<GatherParamsV7> generateParamsFloatValueV7() {
113.0f, 113.1f, 113.2f}),
"gather_v7_1d_indices_axis_2_4d_input"),
GatherParamsV7(
Tensor(ET, {3, 3}, std::vector<T>{
reference_tests::Tensor(ET, {3, 3}, std::vector<T>{
1.0f, 1.1f, 1.2f, 2.0f, 2.1f, 2.2f, 3.0f, 3.1f, 3.2f}),
Tensor(ET_I, {}, std::vector<T_I>{0}),
Tensor(ET_A, {}, std::vector<T_A>{1}),
reference_tests::Tensor(ET_I, {}, std::vector<T_I>{0}),
reference_tests::Tensor(ET_A, {}, std::vector<T_A>{1}),
0,
Tensor(ET, {3}, std::vector<T>{
reference_tests::Tensor(ET, {3}, std::vector<T>{
1.0f, 2.0f, 3.0f}),
"gather_v7_scalar_indices_axis_1_2d_input"),
GatherParamsV7(
Tensor(ET, {2, 5, 2}, std::vector<T>{
reference_tests::Tensor(ET, {2, 5, 2}, std::vector<T>{
1.0f, 2.0f,
3.0f, 4.0f,
5.0f, 6.0f,
@ -839,15 +839,15 @@ std::vector<GatherParamsV7> generateParamsFloatValueV7() {
15.0f, 16.0f,
17.0f, 18.0f,
19.0f, 20.0f}),
Tensor(ET_I, {2, 2, 3}, std::vector<T_I>{
reference_tests::Tensor(ET_I, {2, 2, 3}, std::vector<T_I>{
0, 0, 4,
4, 0, 0,
1, 2, 4,
4, 3, 2}),
Tensor(ET_A, {}, std::vector<T_A>{1}),
reference_tests::Tensor(ET_A, {}, std::vector<T_A>{1}),
1,
Tensor(ET, {2, 2, 3, 2}, std::vector<T>{
reference_tests::Tensor(ET, {2, 2, 3, 2}, std::vector<T>{
1.0f, 2.0f,
1.0f, 2.0f,
9.0f, 10.0f,
@ -903,13 +903,13 @@ std::vector<GatherParamsV7> generateParamsV8() {
using T_A = typename element_type_traits<ET_A>::value_type;
std::vector<GatherParamsV7> params {
GatherParamsV7(
Tensor(ET, {5}, std::vector<T>{
reference_tests::Tensor(ET, {5}, std::vector<T>{
1, 2, 3, 4, 5}),
Tensor(ET_I, {3}, std::vector<T_I>{
reference_tests::Tensor(ET_I, {3}, std::vector<T_I>{
0, -2, -1}),
Tensor(ET_A, {}, std::vector<T_A>{0}),
reference_tests::Tensor(ET_A, {}, std::vector<T_A>{0}),
0,
Tensor(ET, {3}, std::vector<T>{
reference_tests::Tensor(ET, {3}, std::vector<T>{
1, 4, 5}),
"gather_v8_1d_negative_indices"),
};

View File

@ -13,15 +13,15 @@ using namespace ov;
namespace {
struct GatherElementsParams {
GatherElementsParams(
const Tensor& dataTensor, const Tensor& indicesTensor, int64_t axis,
const Tensor& expectedTensor, const std::string& testcaseName = "") :
const reference_tests::Tensor& dataTensor, const reference_tests::Tensor& indicesTensor, int64_t axis,
const reference_tests::Tensor& expectedTensor, const std::string& testcaseName = "") :
dataTensor(dataTensor), indicesTensor(indicesTensor), axis(axis),
expectedTensor(expectedTensor), testcaseName(testcaseName) {}
Tensor dataTensor;
Tensor indicesTensor;
reference_tests::Tensor dataTensor;
reference_tests::Tensor indicesTensor;
int64_t axis;
Tensor expectedTensor;
reference_tests::Tensor expectedTensor;
std::string testcaseName;
};
@ -87,53 +87,53 @@ std::vector<GatherElementsParams> generateParams() {
using T = typename element_type_traits<IN_ET>::value_type;
std::vector<GatherElementsParams> params {
GatherElementsParams(
Tensor(IN_ET, {3}, std::vector<T>{1, 2, 3}),
Tensor(element::i32, {7}, std::vector<int32_t>{1, 2, 0, 2, 0, 0, 2}),
reference_tests::Tensor(IN_ET, {3}, std::vector<T>{1, 2, 3}),
reference_tests::Tensor(element::i32, {7}, std::vector<int32_t>{1, 2, 0, 2, 0, 0, 2}),
0,
Tensor(IN_ET, {7}, std::vector<T>{2, 3, 1, 3, 1, 1, 3}),
reference_tests::Tensor(IN_ET, {7}, std::vector<T>{2, 3, 1, 3, 1, 1, 3}),
"evaluate_1D_gather_elements_3_indices_int32"),
GatherElementsParams(
Tensor(IN_ET, {2, 2}, std::vector<T>{1, 2, 3, 4}),
Tensor(element::i32, {2, 2}, std::vector<int32_t>{0, 1, 0, 0}),
reference_tests::Tensor(IN_ET, {2, 2}, std::vector<T>{1, 2, 3, 4}),
reference_tests::Tensor(element::i32, {2, 2}, std::vector<int32_t>{0, 1, 0, 0}),
0,
Tensor(IN_ET, {2, 2}, std::vector<T>{1, 4, 1, 2}),
reference_tests::Tensor(IN_ET, {2, 2}, std::vector<T>{1, 4, 1, 2}),
"evaluate_2D_gather_elements_2x2_indices_int32_axis_0"),
GatherElementsParams(
Tensor(IN_ET, {2, 2}, std::vector<T>{1, 2, 3, 4}),
Tensor(element::i32, {2, 2}, std::vector<int32_t>{0, 1, 0, 0}),
reference_tests::Tensor(IN_ET, {2, 2}, std::vector<T>{1, 2, 3, 4}),
reference_tests::Tensor(element::i32, {2, 2}, std::vector<int32_t>{0, 1, 0, 0}),
1,
Tensor(IN_ET, {2, 2}, std::vector<T>{1, 2, 3, 3}),
reference_tests::Tensor(IN_ET, {2, 2}, std::vector<T>{1, 2, 3, 3}),
"evaluate_2D_gather_elements_2x2_indices_int32_axis_1"),
GatherElementsParams(
Tensor(IN_ET, {2, 2}, std::vector<T>{1, 2, 3, 4}),
Tensor(element::i32, {2, 2}, std::vector<int32_t>{0, 1, 0, 0}),
reference_tests::Tensor(IN_ET, {2, 2}, std::vector<T>{1, 2, 3, 4}),
reference_tests::Tensor(element::i32, {2, 2}, std::vector<int32_t>{0, 1, 0, 0}),
-1,
Tensor(IN_ET, {2, 2}, std::vector<T>{1, 2, 3, 3}),
reference_tests::Tensor(IN_ET, {2, 2}, std::vector<T>{1, 2, 3, 3}),
"evaluate_2D_gather_elements_2x2_indices_int32_axis_minus_1"),
GatherElementsParams(
Tensor(IN_ET, {3, 3}, std::vector<T>{1, 2, 3, 4, 5, 6, 7, 8, 9}),
Tensor(element::i32, {2, 3}, std::vector<int32_t>{1, 2, 0, 2, 0, 0}),
reference_tests::Tensor(IN_ET, {3, 3}, std::vector<T>{1, 2, 3, 4, 5, 6, 7, 8, 9}),
reference_tests::Tensor(element::i32, {2, 3}, std::vector<int32_t>{1, 2, 0, 2, 0, 0}),
0,
Tensor(IN_ET, {2, 3}, std::vector<T>{4, 8, 3, 7, 2, 3}),
reference_tests::Tensor(IN_ET, {2, 3}, std::vector<T>{4, 8, 3, 7, 2, 3}),
"evaluate_2D_gather_elements_2x3_indices_int32"),
GatherElementsParams(
Tensor(IN_ET, {3, 2, 2}, std::vector<T>{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}),
Tensor(element::i32, {3, 2, 2}, std::vector<int32_t>{1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1}),
reference_tests::Tensor(IN_ET, {3, 2, 2}, std::vector<T>{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}),
reference_tests::Tensor(element::i32, {3, 2, 2}, std::vector<int32_t>{1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1}),
-1,
Tensor(IN_ET, {3, 2, 2}, std::vector<T>{2, 1, 3, 4, 6, 6, 8, 7, 9, 9, 12, 12}),
reference_tests::Tensor(IN_ET, {3, 2, 2}, std::vector<T>{2, 1, 3, 4, 6, 6, 8, 7, 9, 9, 12, 12}),
"evaluate_3D_gather_elements_3x2x2_indices_int32"),
GatherElementsParams(
Tensor(IN_ET, {3, 2, 2, 2}, std::vector<T>{1, 2, 3, 4, 5, 6, 7, 8,
reference_tests::Tensor(IN_ET, {3, 2, 2, 2}, std::vector<T>{1, 2, 3, 4, 5, 6, 7, 8,
9, 10, 11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23, 24}),
Tensor(element::i32, {3, 2, 2, 4}, std::vector<int32_t>{1, 0, 0, 0, 0, 1, 1, 0,
reference_tests::Tensor(element::i32, {3, 2, 2, 4}, std::vector<int32_t>{1, 0, 0, 0, 0, 1, 1, 0,
1, 1, 1, 1, 1, 0, 0, 1,
0, 0, 0, 1, 1, 1, 1, 0,
0, 0, 0, 0, 1, 0, 1, 0,
1, 1, 1, 1, 1, 0, 1, 0,
1, 0, 0, 1, 0, 0, 0, 0}),
-1,
Tensor(IN_ET, {3, 2, 2, 4}, std::vector<T>{2, 1, 1, 1, 3, 4, 4, 3,
reference_tests::Tensor(IN_ET, {3, 2, 2, 4}, std::vector<T>{2, 1, 1, 1, 3, 4, 4, 3,
6, 6, 6, 6, 8, 7, 7, 8,
9, 9, 9, 10, 12, 12, 12, 11,
13, 13, 13, 13, 16, 15, 16, 15,
@ -141,22 +141,22 @@ std::vector<GatherElementsParams> generateParams() {
22, 21, 21, 22, 23, 23, 23, 23}),
"evaluate_4D_gather_elements_3x2x2x2_indices_int64"),
GatherElementsParams(
Tensor(IN_ET, {3, 2, 2}, std::vector<T>{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}),
Tensor(element::i32, {3, 2, 2}, std::vector<int32_t>{1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1}),
reference_tests::Tensor(IN_ET, {3, 2, 2}, std::vector<T>{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}),
reference_tests::Tensor(element::i32, {3, 2, 2}, std::vector<int32_t>{1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1}),
-1,
Tensor(IN_ET, {3, 2, 2}, std::vector<T>{2, 1, 3, 4, 6, 6, 8, 7, 9, 9, 12, 12}),
reference_tests::Tensor(IN_ET, {3, 2, 2}, std::vector<T>{2, 1, 3, 4, 6, 6, 8, 7, 9, 9, 12, 12}),
"evaluate_3D_gather_elements_3x2x2_indices_int64"),
GatherElementsParams(
Tensor(IN_ET, {3, 3}, std::vector<T>{1, 2, 3, 4, 5, 6, 7, 8, 9}),
Tensor(element::i32, {2, 3}, std::vector<int32_t>{1, 2, 0, 2, 0, 0}),
reference_tests::Tensor(IN_ET, {3, 3}, std::vector<T>{1, 2, 3, 4, 5, 6, 7, 8, 9}),
reference_tests::Tensor(element::i32, {2, 3}, std::vector<int32_t>{1, 2, 0, 2, 0, 0}),
0,
Tensor(IN_ET, {2, 3}, std::vector<T>{4, 8, 3, 7, 2, 3}),
reference_tests::Tensor(IN_ET, {2, 3}, std::vector<T>{4, 8, 3, 7, 2, 3}),
"evaluate_2D_gather_elements_2x3_data_float32"),
GatherElementsParams(
Tensor(IN_ET, {2, 2, 1}, std::vector<T>{5, 4, 1, 4}),
Tensor(element::i32, {4, 2, 1}, std::vector<int32_t>{0, 0, 1, 1, 1, 1, 0, 1}),
reference_tests::Tensor(IN_ET, {2, 2, 1}, std::vector<T>{5, 4, 1, 4}),
reference_tests::Tensor(element::i32, {4, 2, 1}, std::vector<int32_t>{0, 0, 1, 1, 1, 1, 0, 1}),
0,
Tensor(IN_ET, {4, 2, 1}, std::vector<T>{5, 4, 1, 4, 1, 4, 5, 4}),
reference_tests::Tensor(IN_ET, {4, 2, 1}, std::vector<T>{5, 4, 1, 4, 1, 4, 5, 4}),
"evaluate_2D_gather_elements_2x2x1_data_float32"),
};
return params;
@ -166,10 +166,10 @@ template <>
std::vector<GatherElementsParams> generateParams<element::Type_t::boolean>() {
std::vector<GatherElementsParams> params {
GatherElementsParams(
Tensor(element::boolean, {3, 2}, std::vector<char>{true, false, true, true, false, false}),
Tensor(element::i32, {2, 2}, std::vector<int32_t>{0, 1, 0, 2}),
reference_tests::Tensor(element::boolean, {3, 2}, std::vector<char>{true, false, true, true, false, false}),
reference_tests::Tensor(element::i32, {2, 2}, std::vector<int32_t>{0, 1, 0, 2}),
0,
Tensor(element::boolean, {2, 2}, std::vector<char>{true, true, true, false}),
reference_tests::Tensor(element::boolean, {2, 2}, std::vector<char>{true, true, true, false}),
"evaluate_2D_gather_elements_3x2_data_bool"),
};
return params;
@ -178,16 +178,16 @@ std::vector<GatherElementsParams> generateParams<element::Type_t::boolean>() {
std::vector<GatherElementsParams> generateParamsNegative() {
std::vector<GatherElementsParams> params {
GatherElementsParams(
Tensor(element::i32, {3}, std::vector<int32_t>{1, 2, 3}),
Tensor(element::i32, {7}, std::vector<int32_t>{1, 2, 0, 2, 0, 0, 8}),
reference_tests::Tensor(element::i32, {3}, std::vector<int32_t>{1, 2, 3}),
reference_tests::Tensor(element::i32, {7}, std::vector<int32_t>{1, 2, 0, 2, 0, 0, 8}),
0,
Tensor(element::i32, {7}, std::vector<int32_t>{2, 3, 1, 3, 1, 1, 3}),
reference_tests::Tensor(element::i32, {7}, std::vector<int32_t>{2, 3, 1, 3, 1, 1, 3}),
"evaluate_1D_gather_elements_negative_test"),
GatherElementsParams(
Tensor(element::i32, {3, 3}, std::vector<int32_t>{1, 2, 3, 4, 5, 6, 7, 8, 9}),
Tensor(element::i32, {2, 3}, std::vector<int32_t>{1, 3, 0, 2, 0, 0}),
reference_tests::Tensor(element::i32, {3, 3}, std::vector<int32_t>{1, 2, 3, 4, 5, 6, 7, 8, 9}),
reference_tests::Tensor(element::i32, {2, 3}, std::vector<int32_t>{1, 3, 0, 2, 0, 0}),
0,
Tensor(element::i32, {2, 3}, std::vector<int32_t>{4, 8, 3, 7, 2, 3}),
reference_tests::Tensor(element::i32, {2, 3}, std::vector<int32_t>{4, 8, 3, 7, 2, 3}),
"evaluate_2D_gather_elements_negative_test"),
};
return params;

View File

@ -13,15 +13,15 @@ using namespace ov;
namespace {
struct GatherNDParams {
GatherNDParams(
const Tensor& dataTensor, const Tensor& indicesTensor, int64_t batchDims,
const Tensor& expectedTensor, const std::string& testcaseName = "") :
const reference_tests::Tensor& dataTensor, const reference_tests::Tensor& indicesTensor, int64_t batchDims,
const reference_tests::Tensor& expectedTensor, const std::string& testcaseName = "") :
dataTensor(dataTensor), indicesTensor(indicesTensor), batchDims(batchDims),
expectedTensor(expectedTensor), testcaseName(testcaseName) {}
Tensor dataTensor;
Tensor indicesTensor;
reference_tests::Tensor dataTensor;
reference_tests::Tensor indicesTensor;
int32_t batchDims;
Tensor expectedTensor;
reference_tests::Tensor expectedTensor;
std::string testcaseName;
};
@ -79,102 +79,102 @@ std::vector<GatherNDParams> generateParams() {
using T = typename element_type_traits<IN_ET>::value_type;
std::vector<GatherNDParams> params {
GatherNDParams(
Tensor(IN_ET, {3, 3}, std::vector<T>{10, 11, 12, 13, 14, 15, 16, 17, 18}),
Tensor(element::i32, {2}, std::vector<int32_t>{1, 2}),
reference_tests::Tensor(IN_ET, {3, 3}, std::vector<T>{10, 11, 12, 13, 14, 15, 16, 17, 18}),
reference_tests::Tensor(element::i32, {2}, std::vector<int32_t>{1, 2}),
0,
Tensor(IN_ET, {}, std::vector<T>{15}),
reference_tests::Tensor(IN_ET, {}, std::vector<T>{15}),
"gather_nd_single_indices"),
GatherNDParams(
Tensor(IN_ET, {2, 2}, std::vector<T>{10, 11, 12, 13}),
Tensor(element::i32, {2, 2}, std::vector<int32_t>{0, 0, 1, 1}),
reference_tests::Tensor(IN_ET, {2, 2}, std::vector<T>{10, 11, 12, 13}),
reference_tests::Tensor(element::i32, {2, 2}, std::vector<int32_t>{0, 0, 1, 1}),
0,
Tensor(IN_ET, {2}, std::vector<T>{10, 13}),
reference_tests::Tensor(IN_ET, {2}, std::vector<T>{10, 13}),
"gather_nd_scalar_from_2d"),
GatherNDParams(
Tensor(IN_ET, {2, 2}, std::vector<T>{10, 11, 12, 13}),
Tensor(element::i32, {2, 1}, std::vector<int32_t>{1, 0}),
reference_tests::Tensor(IN_ET, {2, 2}, std::vector<T>{10, 11, 12, 13}),
reference_tests::Tensor(element::i32, {2, 1}, std::vector<int32_t>{1, 0}),
0,
Tensor(IN_ET, {2, 2}, std::vector<T>{12, 13, 10, 11}),
reference_tests::Tensor(IN_ET, {2, 2}, std::vector<T>{12, 13, 10, 11}),
"gather_nd_1d_from_2d"),
GatherNDParams(
Tensor(IN_ET, {2, 2, 2}, std::vector<T>{10, 11, 12, 13, 20, 21, 22, 23}),
Tensor(element::i32, {2, 3}, std::vector<int32_t>{0, 0, 1, 1, 0, 1}),
reference_tests::Tensor(IN_ET, {2, 2, 2}, std::vector<T>{10, 11, 12, 13, 20, 21, 22, 23}),
reference_tests::Tensor(element::i32, {2, 3}, std::vector<int32_t>{0, 0, 1, 1, 0, 1}),
0,
Tensor(IN_ET, {2}, std::vector<T>{11, 21}),
reference_tests::Tensor(IN_ET, {2}, std::vector<T>{11, 21}),
"gather_nd_scalar_from_3d"),
GatherNDParams(
Tensor(IN_ET, {2, 2, 2}, std::vector<T>{10, 11, 12, 13, 20, 21, 22, 23}),
Tensor(element::i32, {2, 2}, std::vector<int32_t>{0, 1, 1, 0}),
reference_tests::Tensor(IN_ET, {2, 2, 2}, std::vector<T>{10, 11, 12, 13, 20, 21, 22, 23}),
reference_tests::Tensor(element::i32, {2, 2}, std::vector<int32_t>{0, 1, 1, 0}),
0,
Tensor(IN_ET, {2, 2}, std::vector<T>{12, 13, 20, 21}),
reference_tests::Tensor(IN_ET, {2, 2}, std::vector<T>{12, 13, 20, 21}),
"gather_nd_1d_from_3d"),
GatherNDParams(
Tensor(IN_ET, {2, 2, 2}, std::vector<T>{10, 11, 12, 13, 20, 21, 22, 23}),
Tensor(element::i32, {1, 1}, std::vector<int32_t>{1}),
reference_tests::Tensor(IN_ET, {2, 2, 2}, std::vector<T>{10, 11, 12, 13, 20, 21, 22, 23}),
reference_tests::Tensor(element::i32, {1, 1}, std::vector<int32_t>{1}),
0,
Tensor(IN_ET, {1, 2, 2}, std::vector<T>{20, 21, 22, 23}),
reference_tests::Tensor(IN_ET, {1, 2, 2}, std::vector<T>{20, 21, 22, 23}),
"gather_nd_2d_from_3d"),
GatherNDParams(
Tensor(IN_ET, {2, 2}, std::vector<T>{10, 11, 12, 13}),
Tensor(element::i32, {2, 1, 2}, std::vector<int32_t>{0, 0, 0, 1}),
reference_tests::Tensor(IN_ET, {2, 2}, std::vector<T>{10, 11, 12, 13}),
reference_tests::Tensor(element::i32, {2, 1, 2}, std::vector<int32_t>{0, 0, 0, 1}),
0,
Tensor(IN_ET, {2, 1}, std::vector<T>{10, 11}),
reference_tests::Tensor(IN_ET, {2, 1}, std::vector<T>{10, 11}),
"gather_nd_batch_scalar_from_2d"),
GatherNDParams(
Tensor(IN_ET, {2, 2}, std::vector<T>{10, 11, 12, 13}),
Tensor(element::i32, {2, 1, 1}, std::vector<int32_t>{1, 0}),
reference_tests::Tensor(IN_ET, {2, 2}, std::vector<T>{10, 11, 12, 13}),
reference_tests::Tensor(element::i32, {2, 1, 1}, std::vector<int32_t>{1, 0}),
0,
Tensor(IN_ET, {2, 1, 2}, std::vector<T>{12, 13, 10, 11}),
reference_tests::Tensor(IN_ET, {2, 1, 2}, std::vector<T>{12, 13, 10, 11}),
"gather_nd_batch_1d_from_2d"),
GatherNDParams(
Tensor(IN_ET, {2, 2, 2}, std::vector<T>{10, 11, 12, 13, 20, 21, 22, 23}),
Tensor(element::i32, {2, 2, 3}, std::vector<int32_t>{0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0}),
reference_tests::Tensor(IN_ET, {2, 2, 2}, std::vector<T>{10, 11, 12, 13, 20, 21, 22, 23}),
reference_tests::Tensor(element::i32, {2, 2, 3}, std::vector<int32_t>{0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0}),
0,
Tensor(IN_ET, {2, 2}, std::vector<T>{11, 21, 13, 22}),
reference_tests::Tensor(IN_ET, {2, 2}, std::vector<T>{11, 21, 13, 22}),
"gather_nd_batch_scalar_from_3d"),
GatherNDParams(
Tensor(IN_ET, {2, 2, 2}, std::vector<T>{10, 11, 12, 13, 20, 21, 22, 23}),
Tensor(element::i32, {2, 2, 2}, std::vector<int32_t>{0, 1, 1, 0, 0, 0, 1, 1}),
reference_tests::Tensor(IN_ET, {2, 2, 2}, std::vector<T>{10, 11, 12, 13, 20, 21, 22, 23}),
reference_tests::Tensor(element::i32, {2, 2, 2}, std::vector<int32_t>{0, 1, 1, 0, 0, 0, 1, 1}),
0,
Tensor(IN_ET, {2, 2, 2}, std::vector<T>{12, 13, 20, 21, 10, 11, 22, 23}),
reference_tests::Tensor(IN_ET, {2, 2, 2}, std::vector<T>{12, 13, 20, 21, 10, 11, 22, 23}),
"gather_nd_batch_1d_from_3d"),
GatherNDParams(
Tensor(IN_ET, {2, 2, 2}, std::vector<T>{10, 11, 12, 13, 20, 21, 22, 23}),
Tensor(element::i32, {2, 2, 2}, std::vector<int32_t>{0, -1, -1, 0, 0, 0, 1, 1}),
reference_tests::Tensor(IN_ET, {2, 2, 2}, std::vector<T>{10, 11, 12, 13, 20, 21, 22, 23}),
reference_tests::Tensor(element::i32, {2, 2, 2}, std::vector<int32_t>{0, -1, -1, 0, 0, 0, 1, 1}),
0,
Tensor(IN_ET, {2, 2, 2}, std::vector<T>{12, 13, 20, 21, 10, 11, 22, 23}),
reference_tests::Tensor(IN_ET, {2, 2, 2}, std::vector<T>{12, 13, 20, 21, 10, 11, 22, 23}),
"gather_nd_batch_1d_from_3d_negative"),
GatherNDParams(
Tensor(IN_ET, {2, 2, 2}, std::vector<T>{10, 11, 12, 13, 20, 21, 22, 23}),
Tensor(element::i32, {2, 1, 1}, std::vector<int32_t>{1, 0}),
reference_tests::Tensor(IN_ET, {2, 2, 2}, std::vector<T>{10, 11, 12, 13, 20, 21, 22, 23}),
reference_tests::Tensor(element::i32, {2, 1, 1}, std::vector<int32_t>{1, 0}),
0,
Tensor(IN_ET, {2, 1, 2, 2}, std::vector<T>{20, 21, 22, 23, 10, 11, 12, 13}),
reference_tests::Tensor(IN_ET, {2, 1, 2, 2}, std::vector<T>{20, 21, 22, 23, 10, 11, 12, 13}),
"gather_nd_batch_2d_from_3d"),
GatherNDParams(
Tensor(IN_ET, {2, 3, 4}, std::vector<T>{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
reference_tests::Tensor(IN_ET, {2, 3, 4}, std::vector<T>{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24}),
Tensor(element::i32, {2, 1}, std::vector<int32_t>{1, 0}),
reference_tests::Tensor(element::i32, {2, 1}, std::vector<int32_t>{1, 0}),
1,
Tensor(IN_ET, {2, 4}, std::vector<T>{5, 6, 7, 8, 13, 14, 15, 16}),
reference_tests::Tensor(IN_ET, {2, 4}, std::vector<T>{5, 6, 7, 8, 13, 14, 15, 16}),
"gather_nd_batch_dims1"),
GatherNDParams(
Tensor(IN_ET, {2, 3, 4, 2}, std::vector<T>{
reference_tests::Tensor(IN_ET, {2, 3, 4, 2}, std::vector<T>{
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48}),
Tensor(element::i32, {2, 3, 3, 2}, std::vector<int32_t>{
reference_tests::Tensor(element::i32, {2, 3, 3, 2}, std::vector<int32_t>{
1, 0, 3, 1, 2, 1, 0, 1, 1, 1, 2, 0, 3, 0, 3, 1, 2, 1,
2, 0, 1, 1, 3, 1, 1, 1, 2, 0, 2, 0, 0, 0, 3, 1, 3, 1}),
2,
Tensor(IN_ET, {6, 3}, std::vector<T>{
reference_tests::Tensor(IN_ET, {6, 3}, std::vector<T>{
3, 8, 6, 10, 12, 13, 23, 24, 22, 29, 28, 32, 36, 37, 37, 41, 48, 48}),
"gather_nd_batch_dims2"),
GatherNDParams(
Tensor(IN_ET, {2, 3, 4}, std::vector<T>{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
reference_tests::Tensor(IN_ET, {2, 3, 4}, std::vector<T>{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24}),
Tensor(element::i32, {2, 3, 1, 1}, std::vector<int32_t>{1, 0, 2, 0, 2, 2}),
reference_tests::Tensor(element::i32, {2, 3, 1, 1}, std::vector<int32_t>{1, 0, 2, 0, 2, 2}),
2,
Tensor(IN_ET, {6, 1}, std::vector<T>{2, 5, 11, 13, 19, 23}),
reference_tests::Tensor(IN_ET, {6, 1}, std::vector<T>{2, 5, 11, 13, 19, 23}),
"gather_nd_batch_dims2_lead_dims"),
};
return params;
@ -261,105 +261,105 @@ std::vector<GatherNDParams> generateParams_v8() {
using T = typename element_type_traits<IN_ET>::value_type;
std::vector<GatherNDParams> params {
GatherNDParams(
Tensor(IN_ET, {3, 3}, std::vector<T>{10, 11, 12, 13, 14, 15, 16, 17, 18}),
Tensor(element::i32, {2}, std::vector<int32_t>{1, 2}),
reference_tests::Tensor(IN_ET, {3, 3}, std::vector<T>{10, 11, 12, 13, 14, 15, 16, 17, 18}),
reference_tests::Tensor(element::i32, {2}, std::vector<int32_t>{1, 2}),
0,
Tensor(IN_ET, {}, std::vector<T>{15}),
reference_tests::Tensor(IN_ET, {}, std::vector<T>{15}),
"gather_nd_8_single_indices"),
GatherNDParams(
Tensor(IN_ET, {2, 2}, std::vector<T>{10, 11, 12, 13}),
Tensor(element::i32, {2, 2}, std::vector<int32_t>{0, 0, 1, 1}),
reference_tests::Tensor(IN_ET, {2, 2}, std::vector<T>{10, 11, 12, 13}),
reference_tests::Tensor(element::i32, {2, 2}, std::vector<int32_t>{0, 0, 1, 1}),
0,
Tensor(IN_ET, {2}, std::vector<T>{10, 13}),
reference_tests::Tensor(IN_ET, {2}, std::vector<T>{10, 13}),
"gather_nd_8_scalar_from_2d"),
GatherNDParams(
Tensor(IN_ET, {2, 2}, std::vector<T>{10, 11, 12, 13}),
Tensor(element::i32, {2, 1}, std::vector<int32_t>{1, 0}),
reference_tests::Tensor(IN_ET, {2, 2}, std::vector<T>{10, 11, 12, 13}),
reference_tests::Tensor(element::i32, {2, 1}, std::vector<int32_t>{1, 0}),
0,
Tensor(IN_ET, {2, 2}, std::vector<T>{12, 13, 10, 11}),
reference_tests::Tensor(IN_ET, {2, 2}, std::vector<T>{12, 13, 10, 11}),
"gather_nd_8_1d_from_2d"),
GatherNDParams(
Tensor(IN_ET, {2, 2, 2}, std::vector<T>{10, 11, 12, 13, 20, 21, 22, 23}),
Tensor(element::i32, {2, 3}, std::vector<int32_t>{0, 0, 1, 1, 0, 1}),
reference_tests::Tensor(IN_ET, {2, 2, 2}, std::vector<T>{10, 11, 12, 13, 20, 21, 22, 23}),
reference_tests::Tensor(element::i32, {2, 3}, std::vector<int32_t>{0, 0, 1, 1, 0, 1}),
0,
Tensor(IN_ET, {2}, std::vector<T>{11, 21}),
reference_tests::Tensor(IN_ET, {2}, std::vector<T>{11, 21}),
"gather_nd_8_scalar_from_3d"),
GatherNDParams(
Tensor(IN_ET, {2, 2, 2}, std::vector<T>{10, 11, 12, 13, 20, 21, 22, 23}),
Tensor(element::i32, {2, 2}, std::vector<int32_t>{0, 1, 1, 0}),
reference_tests::Tensor(IN_ET, {2, 2, 2}, std::vector<T>{10, 11, 12, 13, 20, 21, 22, 23}),
reference_tests::Tensor(element::i32, {2, 2}, std::vector<int32_t>{0, 1, 1, 0}),
0,
Tensor(IN_ET, {2, 2}, std::vector<T>{12, 13, 20, 21}),
reference_tests::Tensor(IN_ET, {2, 2}, std::vector<T>{12, 13, 20, 21}),
"gather_nd_8_1d_from_3d"),
GatherNDParams(
Tensor(IN_ET, {2, 2, 2}, std::vector<T>{10, 11, 12, 13, 20, 21, 22, 23}),
Tensor(element::i32, {1, 1}, std::vector<int32_t>{1}),
reference_tests::Tensor(IN_ET, {2, 2, 2}, std::vector<T>{10, 11, 12, 13, 20, 21, 22, 23}),
reference_tests::Tensor(element::i32, {1, 1}, std::vector<int32_t>{1}),
0,
Tensor(IN_ET, {1, 2, 2}, std::vector<T>{20, 21, 22, 23}),
reference_tests::Tensor(IN_ET, {1, 2, 2}, std::vector<T>{20, 21, 22, 23}),
"gather_nd_8_2d_from_3d"),
GatherNDParams(
Tensor(IN_ET, {2, 2}, std::vector<T>{10, 11, 12, 13}),
Tensor(element::i32, {2, 1, 2}, std::vector<int32_t>{0, 0, 0, 1}),
reference_tests::Tensor(IN_ET, {2, 2}, std::vector<T>{10, 11, 12, 13}),
reference_tests::Tensor(element::i32, {2, 1, 2}, std::vector<int32_t>{0, 0, 0, 1}),
0,
Tensor(IN_ET, {2, 1}, std::vector<T>{10, 11}),
reference_tests::Tensor(IN_ET, {2, 1}, std::vector<T>{10, 11}),
"gather_nd_8_batch_scalar_from_2d"),
GatherNDParams(
Tensor(IN_ET, {2, 2}, std::vector<T>{10, 11, 12, 13}),
Tensor(element::i32, {2, 1, 1}, std::vector<int32_t>{1, 0}),
reference_tests::Tensor(IN_ET, {2, 2}, std::vector<T>{10, 11, 12, 13}),
reference_tests::Tensor(element::i32, {2, 1, 1}, std::vector<int32_t>{1, 0}),
0,
Tensor(IN_ET, {2, 1, 2}, std::vector<T>{12, 13, 10, 11}),
reference_tests::Tensor(IN_ET, {2, 1, 2}, std::vector<T>{12, 13, 10, 11}),
"gather_nd_8_batch_1d_from_2d"),
GatherNDParams(
Tensor(IN_ET, {2, 2, 2}, std::vector<T>{10, 11, 12, 13, 20, 21, 22, 23}),
Tensor(element::i32, {2, 2, 3}, std::vector<int32_t>{0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0}),
reference_tests::Tensor(IN_ET, {2, 2, 2}, std::vector<T>{10, 11, 12, 13, 20, 21, 22, 23}),
reference_tests::Tensor(element::i32, {2, 2, 3}, std::vector<int32_t>{0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0}),
0,
Tensor(IN_ET, {2, 2}, std::vector<T>{11, 21, 13, 22}),
reference_tests::Tensor(IN_ET, {2, 2}, std::vector<T>{11, 21, 13, 22}),
"gather_nd_8_batch_scalar_from_3d"),
GatherNDParams(
Tensor(IN_ET, {2, 2, 2}, std::vector<T>{10, 11, 12, 13, 20, 21, 22, 23}),
Tensor(element::i32, {2, 2, 2}, std::vector<int32_t>{0, 1, 1, 0, 0, 0, 1, 1}),
reference_tests::Tensor(IN_ET, {2, 2, 2}, std::vector<T>{10, 11, 12, 13, 20, 21, 22, 23}),
reference_tests::Tensor(element::i32, {2, 2, 2}, std::vector<int32_t>{0, 1, 1, 0, 0, 0, 1, 1}),
0,
Tensor(IN_ET, {2, 2, 2}, std::vector<T>{12, 13, 20, 21, 10, 11, 22, 23}),
reference_tests::Tensor(IN_ET, {2, 2, 2}, std::vector<T>{12, 13, 20, 21, 10, 11, 22, 23}),
"gather_nd_8_batch_1d_from_3d"),
GatherNDParams(
Tensor(IN_ET, {2, 2, 2}, std::vector<T>{10, 11, 12, 13, 20, 21, 22, 23}),
Tensor(element::i32, {2, 2, 2}, std::vector<int32_t>{0, -1, -1, 0, 0, 0, 1, 1}),
reference_tests::Tensor(IN_ET, {2, 2, 2}, std::vector<T>{10, 11, 12, 13, 20, 21, 22, 23}),
reference_tests::Tensor(element::i32, {2, 2, 2}, std::vector<int32_t>{0, -1, -1, 0, 0, 0, 1, 1}),
0,
Tensor(IN_ET, {2, 2, 2}, std::vector<T>{12, 13, 20, 21, 10, 11, 22, 23}),
reference_tests::Tensor(IN_ET, {2, 2, 2}, std::vector<T>{12, 13, 20, 21, 10, 11, 22, 23}),
"gather_nd_8_batch_1d_from_3d_negative"),
GatherNDParams(
Tensor(IN_ET, {2, 2, 2}, std::vector<T>{10, 11, 12, 13, 20, 21, 22, 23}),
Tensor(element::i32, {2, 1, 1}, std::vector<int32_t>{1, 0}),
reference_tests::Tensor(IN_ET, {2, 2, 2}, std::vector<T>{10, 11, 12, 13, 20, 21, 22, 23}),
reference_tests::Tensor(element::i32, {2, 1, 1}, std::vector<int32_t>{1, 0}),
0,
Tensor(IN_ET, {2, 1, 2, 2}, std::vector<T>{20, 21, 22, 23, 10, 11, 12, 13}),
reference_tests::Tensor(IN_ET, {2, 1, 2, 2}, std::vector<T>{20, 21, 22, 23, 10, 11, 12, 13}),
"gather_nd_8_batch_2d_from_3d"),
GatherNDParams(
Tensor(IN_ET, {2, 3, 4}, std::vector<T>{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
reference_tests::Tensor(IN_ET, {2, 3, 4}, std::vector<T>{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24}),
Tensor(element::i32, {2, 1}, std::vector<int32_t>{1, 0}),
reference_tests::Tensor(element::i32, {2, 1}, std::vector<int32_t>{1, 0}),
1,
Tensor(IN_ET, {2, 4}, std::vector<T>{5, 6, 7, 8, 13, 14, 15, 16}),
reference_tests::Tensor(IN_ET, {2, 4}, std::vector<T>{5, 6, 7, 8, 13, 14, 15, 16}),
"gather_nd_8_batch_dims1"),
GatherNDParams(
Tensor(IN_ET, {2, 3, 4, 2}, std::vector<T>{
reference_tests::Tensor(IN_ET, {2, 3, 4, 2}, std::vector<T>{
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48}),
Tensor(element::i32, {2, 3, 3, 2}, std::vector<int32_t>{
reference_tests::Tensor(element::i32, {2, 3, 3, 2}, std::vector<int32_t>{
1, 0, 3, 1, 2, 1, 0, 1, 1, 1, 2, 0, 3, 0, 3, 1, 2, 1,
2, 0, 1, 1, 3, 1, 1, 1, 2, 0, 2, 0, 0, 0, 3, 1, 3, 1}),
2,
Tensor(IN_ET, {2, 3, 3}, std::vector<T>{
reference_tests::Tensor(IN_ET, {2, 3, 3}, std::vector<T>{
3, 8, 6, 10, 12, 13, 23, 24, 22, 29, 28, 32, 36, 37, 37, 41, 48, 48}),
"gather_8_nd_batch_dims2"),
GatherNDParams(
Tensor(IN_ET, {2, 3, 4}, std::vector<T>{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
reference_tests::Tensor(IN_ET, {2, 3, 4}, std::vector<T>{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24}),
Tensor(element::i32, {2, 3, 1, 1}, std::vector<int32_t>{1, 0, 2, 0, 2, 2}),
reference_tests::Tensor(element::i32, {2, 3, 1, 1}, std::vector<int32_t>{1, 0, 2, 0, 2, 2}),
2,
Tensor(IN_ET, {2, 3, 1}, std::vector<T>{2, 5, 11, 13, 19, 23}),
reference_tests::Tensor(IN_ET, {2, 3, 1}, std::vector<T>{2, 5, 11, 13, 19, 23}),
"gather_8_nd_batch_dims2_lead_dims"),
GatherNDParams(
Tensor(IN_ET, {2, 3, 4, 5}, std::vector<T>{
reference_tests::Tensor(IN_ET, {2, 3, 4, 5}, std::vector<T>{
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
@ -368,10 +368,10 @@ std::vector<GatherNDParams> generateParams_v8() {
81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
111, 112, 113, 114, 115, 116, 117, 118, 119, 120}),
Tensor(element::i32, {2, 3, 2, 1}, std::vector<int32_t>{
reference_tests::Tensor(element::i32, {2, 3, 2, 1}, std::vector<int32_t>{
1, 0, 2, 0, 2, 0, 1, 0, 2, 0, 2, 0}),
2,
Tensor(IN_ET, {2, 3, 2, 5}, std::vector<T>{
reference_tests::Tensor(IN_ET, {2, 3, 2, 5}, std::vector<T>{
6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 31, 32, 33, 34, 35, 21, 22, 23,
24, 25, 51, 52, 53, 54, 55, 41, 42, 43, 44, 45, 66, 67, 68, 69,
70, 61, 62, 63, 64, 65, 91, 92, 93, 94, 95, 81, 82, 83, 84, 85,

View File

@ -12,11 +12,11 @@ using namespace ov;
namespace {
struct GatherTreeParams {
Tensor stepIds;
Tensor parentIdx;
Tensor maxSeqLen;
Tensor endToken;
Tensor finalIdx;
reference_tests::Tensor stepIds;
reference_tests::Tensor parentIdx;
reference_tests::Tensor maxSeqLen;
reference_tests::Tensor endToken;
reference_tests::Tensor finalIdx;
std::string testcaseName;
};
@ -78,32 +78,32 @@ std::vector<GatherTreeParams> generateParams() {
using T = typename element_type_traits<ET>::value_type;
std::vector<GatherTreeParams> params {
Builder {}
.stepIds(Tensor(ET, {1, 1, 10}, std::vector<T>{
.stepIds(reference_tests::Tensor(ET, {1, 1, 10}, std::vector<T>{
1, 4, 9, 7, 9, 1, 2, 3, 9, 9}))
.parentIdx(Tensor(ET, {1, 1, 10}, std::vector<T>{
.parentIdx(reference_tests::Tensor(ET, {1, 1, 10}, std::vector<T>{
1, 4, 9, 7, 9, 1, 2, 3, 9, 9}))
.maxSeqLen(Tensor(ET, {1}, std::vector<T>{9}))
.endToken(Tensor(ET, {}, std::vector<T>{9}))
.finalIdx(Tensor(ET, {1, 1, 10}, std::vector<T>{
.maxSeqLen(reference_tests::Tensor(ET, {1}, std::vector<T>{9}))
.endToken(reference_tests::Tensor(ET, {}, std::vector<T>{9}))
.finalIdx(reference_tests::Tensor(ET, {1, 1, 10}, std::vector<T>{
1, 4, 9, 7, 9, 1, 2, 3, 9, 9}))
.testcaseName("gather_tree_1"),
Builder {}
.stepIds(Tensor(ET, {5, 1, 10}, std::vector<T>{
.stepIds(reference_tests::Tensor(ET, {5, 1, 10}, std::vector<T>{
1, 4, 9, 7, 9, 1, 2, 3, 9, 2,
3, 1, 4, 2, 4, 4, 7, 4, 9, 5,
8, 4, 3, 7, 5, 2, 4, 8, 3, 1,
5, 7, 9, 4, 5, 6, 4, 2, 9, 2,
8, 8, 7, 9, 8, 3, 1, 7, 5, 9}))
.parentIdx(Tensor(ET, {5, 1, 10}, std::vector<T>{
.parentIdx(reference_tests::Tensor(ET, {5, 1, 10}, std::vector<T>{
1, 4, 9, 7, 9, 1, 2, 3, 9, 2,
3, 1, 4, 2, 4, 4, 7, 4, 9, 5,
8, 4, 3, 7, 5, 2, 4, 8, 3, 1,
5, 7, 9, 4, 5, 6, 4, 2, 9, 2,
8, 8, 7, 9, 8, 3, 1, 7, 5, 9}))
.maxSeqLen(Tensor(ET, {1}, std::vector<T>{9}))
.endToken(Tensor(ET, {}, std::vector<T>{9}))
.finalIdx(Tensor(ET, {5, 1, 10}, std::vector<T>{
.maxSeqLen(reference_tests::Tensor(ET, {1}, std::vector<T>{9}))
.endToken(reference_tests::Tensor(ET, {}, std::vector<T>{9}))
.finalIdx(reference_tests::Tensor(ET, {5, 1, 10}, std::vector<T>{
4, 4, 9, 9, 4, 9, 2, 9, 9, 9,
1, 1, 9, 9, 1, 9, 9, 9, 9, 9,
1, 1, 9, 9, 1, 9, 9, 9, 9, 9,
@ -112,7 +112,7 @@ std::vector<GatherTreeParams> generateParams() {
.testcaseName("gather_tree_5"),
Builder {}
.stepIds(Tensor(ET, {20, 1, 10}, std::vector<T>{
.stepIds(reference_tests::Tensor(ET, {20, 1, 10}, std::vector<T>{
1, 4, 9, 7, 9, 1, 2, 3, 9, 2, 3, 1, 4, 2, 4, 4, 7, 4, 9, 5,
8, 4, 3, 7, 5, 2, 4, 8, 3, 1, 5, 7, 9, 4, 5, 6, 4, 2, 9, 2,
8, 8, 7, 9, 8, 3, 1, 7, 5, 8, 8, 9, 8, 1, 8, 1, 3, 2, 1, 8,
@ -123,7 +123,7 @@ std::vector<GatherTreeParams> generateParams() {
8, 9, 5, 2, 5, 2, 9, 8, 4, 4, 5, 2, 6, 9, 4, 4, 6, 7, 6, 7,
2, 8, 7, 6, 6, 7, 4, 4, 7, 3, 4, 9, 7, 4, 8, 9, 1, 6, 5, 6,
1, 2, 8, 9, 1, 5, 4, 6, 9, 4, 4, 3, 7, 9, 7, 6, 3, 1, 7, 9}))
.parentIdx(Tensor(ET, {20, 1, 10}, std::vector<T>{
.parentIdx(reference_tests::Tensor(ET, {20, 1, 10}, std::vector<T>{
1, 4, 9, 7, 9, 1, 2, 3, 9, 2, 3, 1, 4, 2, 4, 4, 7, 4, 9, 5,
8, 4, 3, 7, 5, 2, 4, 8, 3, 1, 5, 7, 9, 4, 5, 6, 4, 2, 9, 2,
8, 8, 7, 9, 8, 3, 1, 7, 5, 8, 8, 9, 8, 1, 8, 1, 3, 2, 1, 8,
@ -134,9 +134,9 @@ std::vector<GatherTreeParams> generateParams() {
8, 9, 5, 2, 5, 2, 9, 8, 4, 4, 5, 2, 6, 9, 4, 4, 6, 7, 6, 7,
2, 8, 7, 6, 6, 7, 4, 4, 7, 3, 4, 9, 7, 4, 8, 9, 1, 6, 5, 6,
1, 2, 8, 9, 1, 5, 4, 6, 9, 4, 4, 3, 7, 9, 7, 6, 3, 1, 7, 9}))
.maxSeqLen(Tensor(ET, {1}, std::vector<T>{9}))
.endToken(Tensor(ET, {}, std::vector<T>{9}))
.finalIdx(Tensor(ET, {20, 1, 10}, std::vector<T>{
.maxSeqLen(reference_tests::Tensor(ET, {1}, std::vector<T>{9}))
.endToken(reference_tests::Tensor(ET, {}, std::vector<T>{9}))
.finalIdx(reference_tests::Tensor(ET, {20, 1, 10}, std::vector<T>{
9, 4, 9, 4, 4, 4, 9, 4, 9, 9, 9, 1, 9, 1, 1, 1, 9, 1, 9, 9,
9, 1, 9, 1, 1, 1, 9, 1, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,

View File

@ -27,8 +27,8 @@ struct GeluParams {
ov::PartialShape pshape;
ov::element::Type inType;
ov::element::Type outType;
ov::runtime::Tensor inputData;
ov::runtime::Tensor refData;
ov::Tensor inputData;
ov::Tensor refData;
};
class ReferenceGeluV0LayerTest : public testing::TestWithParam<GeluParams>, public CommonReferenceTest {

View File

@ -20,8 +20,8 @@ struct GrnParams {
PartialShape pshape;
element::Type inType;
element::Type outType;
ov::runtime::Tensor inputData;
ov::runtime::Tensor refData;
ov::Tensor inputData;
ov::Tensor refData;
};
class ReferenceGrnLayerTest : public testing::TestWithParam<GrnParams>, public CommonReferenceTest {

View File

@ -37,9 +37,9 @@ struct GroupConvolutionParams {
ov::element::Type inType;
ov::element::Type filterType;
ov::element::Type outType;
ov::runtime::Tensor inputData;
ov::runtime::Tensor filterData;
ov::runtime::Tensor refData;
ov::Tensor inputData;
ov::Tensor filterData;
ov::Tensor refData;
ov::Strides strides;
ov::CoordinateDiff padBegin;
ov::CoordinateDiff padEnd;

View File

@ -40,9 +40,9 @@ struct GroupConvolutionBackpropDataParams {
ov::element::Type inType;
ov::element::Type filterType;
ov::element::Type outType;
ov::runtime::Tensor inputData;
ov::runtime::Tensor filterData;
ov::runtime::Tensor refData;
ov::Tensor inputData;
ov::Tensor filterData;
ov::Tensor refData;
ov::Strides strides;
ov::CoordinateDiff padBegin;
ov::CoordinateDiff padEnd;
@ -77,9 +77,9 @@ struct GroupConvolutionBackpropDataOutShapeParams {
ov::element::Type inType;
ov::element::Type filterType;
ov::element::Type outType;
ov::runtime::Tensor inputData;
ov::runtime::Tensor filterData;
ov::runtime::Tensor refData;
ov::Tensor inputData;
ov::Tensor filterData;
ov::Tensor refData;
ov::Strides strides;
ov::Strides dialations;
Shape constantOutputShape;

View File

@ -14,8 +14,8 @@ namespace {
struct GRUCellParams {
GRUCellParams(
const int32_t batchSize, const int32_t inputSize, const int32_t hiddenSize, const int32_t gatesCount, const bool linearBeforeReset,
const Tensor& X, const Tensor& H_t, const Tensor& W, const Tensor& R, const Tensor& B,
const Tensor& Ho, const std::string& testcaseName = "") :
const reference_tests::Tensor& X, const reference_tests::Tensor& H_t, const reference_tests::Tensor& W, const reference_tests::Tensor& R, const reference_tests::Tensor& B,
const reference_tests::Tensor& Ho, const std::string& testcaseName = "") :
batchSize(batchSize), inputSize(inputSize), hiddenSize(hiddenSize), gatesCount(gatesCount), linearBeforeReset(linearBeforeReset),
X(X), H_t(H_t), W(W), R(R), B(B), Ho(Ho), testcaseName(testcaseName) {}
@ -24,12 +24,12 @@ struct GRUCellParams {
int32_t hiddenSize;
int32_t gatesCount;
bool linearBeforeReset;
Tensor X;
Tensor H_t;
Tensor W;
Tensor R;
Tensor B;
Tensor Ho;
reference_tests::Tensor X;
reference_tests::Tensor H_t;
reference_tests::Tensor W;
reference_tests::Tensor R;
reference_tests::Tensor B;
reference_tests::Tensor Ho;
std::string testcaseName;
};
@ -147,23 +147,23 @@ std::vector<GRUCellParams> generateParams() {
std::vector<GRUCellParams> params {
GRUCellParams(
2, 3, 3, 3, false,
Tensor(ET, {2, 3}, std::vector<T>{
reference_tests::Tensor(ET, {2, 3}, std::vector<T>{
0.52421564f, 0.78845507f, 0.9372873f, 0.59783894f, 0.18278378f, 0.2084126f}),
Tensor(ET, {2, 3}, std::vector<T>{
reference_tests::Tensor(ET, {2, 3}, std::vector<T>{
0.45738035f, 0.996877f, 0.82882977f, 0.47492632f, 0.88471466f, 0.57833236f}),
Tensor(ET, {3 * 3, 3}, std::vector<T>{
reference_tests::Tensor(ET, {3 * 3, 3}, std::vector<T>{
0.5815369f, 0.16559383f, 0.08464007f, 0.843122f, 0.73968244f, 0.11359601f,
0.8295078f, 0.9240567f, 0.10007995f, 0.20573162f, 0.09002485f, 0.2839569f,
0.3096991f, 0.5638341f, 0.5787327f, 0.84552664f, 0.16263747f, 0.7243242f,
0.8049057f, 0.43966424f, 0.46294412f, 0.9833361f, 0.31369713f, 0.1719934f,
0.4937093f, 0.6353004f, 0.77982515f}),
Tensor(ET, {3 * 3, 3}, std::vector<T>{
reference_tests::Tensor(ET, {3 * 3, 3}, std::vector<T>{
0.16510165f, 0.52435565f, 0.2788478f, 0.99427545f, 0.1623331f, 0.01389796f,
0.99669236f, 0.53901845f, 0.8737506f, 0.9254788f, 0.21172932f, 0.11634306f,
0.40111724f, 0.37497616f, 0.2903471f, 0.6796794f, 0.65131867f, 0.78163475f,
0.12058706f, 0.45591718f, 0.791677f, 0.76497287f, 0.9895242f, 0.7845312f,
0.51267904f, 0.49030215f, 0.08498167f}),
Tensor(ET, {3 * 3}, std::vector<T>{
reference_tests::Tensor(ET, {3 * 3}, std::vector<T>{
0.8286678f + 0.9175602f,
0.9153158f + 0.14958014f,
0.9581612f + 0.49230585f,
@ -173,28 +173,28 @@ std::vector<GRUCellParams> generateParams() {
0.14153397f + 0.50496656f,
0.22404431f + 0.34798595f,
0.6549655f + 0.6699164f}),
Tensor(ET, {2, 3}, std::vector<T>{
reference_tests::Tensor(ET, {2, 3}, std::vector<T>{
0.48588726f, 0.99670005f, 0.83759373f, 0.5023099f, 0.89410484f, 0.60011315f}),
"gru_cell_bias_clip"),
GRUCellParams(
2, 3, 3, 3, true,
Tensor(ET, {2, 3}, std::vector<T>{
reference_tests::Tensor(ET, {2, 3}, std::vector<T>{
0.12249453f, 0.6127907f, 0.5001741f, 0.5124603f, 0.04329684f, 0.023834f}),
Tensor(ET, {2, 3}, std::vector<T>{
reference_tests::Tensor(ET, {2, 3}, std::vector<T>{
0.8598948f, 0.41189128f, 0.72824323f, 0.53940123f, 0.31485787f, 0.04053852f}),
Tensor(ET, {3 * 3, 3}, std::vector<T>{
reference_tests::Tensor(ET, {3 * 3, 3}, std::vector<T>{
0.72259396f, 0.11561195f, 0.9457856f, 0.19037509f, 0.6964006f, 0.33459795f,
0.5468904f, 0.85646594f, 0.5101311f, 0.9712257f, 0.3687071f, 0.60280246f,
0.56943774f, 0.7475505f, 0.2490578f, 0.86977345f, 0.85542053f, 0.29660386f,
0.49717373f, 0.7473479f, 0.53454477f, 0.15974349f, 0.5804805f, 0.14303213f,
0.07514781f, 0.5865731f, 0.76409274f}),
Tensor(ET, {3 * 3, 3}, std::vector<T>{
reference_tests::Tensor(ET, {3 * 3, 3}, std::vector<T>{
0.91382647f, 0.41527033f, 0.28040004f, 0.23601337f, 0.04471736f, 0.03888785f,
0.06308217f, 0.44844428f, 0.29384327f, 0.49037653f, 0.50421673f, 0.7366393f,
0.63143945f, 0.00277612f, 0.37198433f, 0.06966069f, 0.4613444f, 0.10999731f,
0.78273284f, 0.21453214f, 0.10751773f, 0.18332677f, 0.1326976f, 0.9998985f,
0.19263928f, 0.10979804f, 0.52575564f}),
Tensor(ET, {(3 + 1) * 3}, std::vector<T>{
reference_tests::Tensor(ET, {(3 + 1) * 3}, std::vector<T>{
0.61395123f, // 0.09875853f + 0.5151927f,
1.08667738f, // 0.37801138f + 0.708666f,
1.32600244f, // 0.7729636f + 0.55303884f,
@ -207,7 +207,7 @@ std::vector<GRUCellParams> generateParams() {
0.6606634f,
0.99040645f,
0.21112025f}),
Tensor(ET, {2, 3}, std::vector<T>{
reference_tests::Tensor(ET, {2, 3}, std::vector<T>{
0.8709214f, 0.48411977f, 0.74495184f, 0.6074972f, 0.44572943f, 0.1467715f}),
"gru_cell_linear_before_reset"),
};
@ -235,23 +235,23 @@ std::vector<GRUCellParams> generateParamsHardsigmoidActivationFunction() {
std::vector<GRUCellParams> params {
GRUCellParams(
2, 3, 3, 3, true,
Tensor(ET, {2, 3}, std::vector<T>{
reference_tests::Tensor(ET, {2, 3}, std::vector<T>{
0.12249453f, 0.6127907f, 0.5001741f, 0.5124603f, 0.04329684f, 0.023834f}),
Tensor(ET, {2, 3}, std::vector<T>{
reference_tests::Tensor(ET, {2, 3}, std::vector<T>{
0.8598948f, 0.41189128f, 0.72824323f, 0.53940123f, 0.31485787f, 0.04053852f}),
Tensor(ET, {3 * 3, 3}, std::vector<T>{
reference_tests::Tensor(ET, {3 * 3, 3}, std::vector<T>{
0.72259396f, 0.11561195f, 0.9457856f, 0.19037509f, 0.6964006f, 0.33459795f,
0.5468904f, 0.85646594f, 0.5101311f, 0.9712257f, 0.3687071f, 0.60280246f,
0.56943774f, 0.7475505f, 0.2490578f, 0.86977345f, 0.85542053f, 0.29660386f,
0.49717373f, 0.7473479f, 0.53454477f, 0.15974349f, 0.5804805f, 0.14303213f,
0.07514781f, 0.5865731f, 0.76409274f}),
Tensor(ET, {3 * 3, 3}, std::vector<T>{
reference_tests::Tensor(ET, {3 * 3, 3}, std::vector<T>{
0.91382647f, 0.41527033f, 0.28040004f, 0.23601337f, 0.04471736f, 0.03888785f,
0.06308217f, 0.44844428f, 0.29384327f, 0.49037653f, 0.50421673f, 0.7366393f,
0.63143945f, 0.00277612f, 0.37198433f, 0.06966069f, 0.4613444f, 0.10999731f,
0.78273284f, 0.21453214f, 0.10751773f, 0.18332677f, 0.1326976f, 0.9998985f,
0.19263928f, 0.10979804f, 0.52575564f}),
Tensor(ET, {(3 + 1) * 3}, std::vector<T>{
reference_tests::Tensor(ET, {(3 + 1) * 3}, std::vector<T>{
0.09875853f + 0.5151927f,
0.37801138f + 0.708666f,
0.7729636f + 0.55303884f,
@ -264,7 +264,7 @@ std::vector<GRUCellParams> generateParamsHardsigmoidActivationFunction() {
0.6606634f,
0.99040645f,
0.21112025f}),
Tensor(ET, {2, 3}, std::vector<T>{
reference_tests::Tensor(ET, {2, 3}, std::vector<T>{
0.8598948f, 0.41189128f, 0.72824323f, 0.53940123f, 0.31485787f, 0.04053852f}),
"gru_cell_hardsigmoid_activation_function"),
};

View File

@ -27,8 +27,8 @@ struct HardSigmoidParams {
ov::PartialShape pshape;
ov::element::Type inType;
ov::element::Type outType;
ov::runtime::Tensor inputData;
ov::runtime::Tensor refData;
ov::Tensor inputData;
ov::Tensor refData;
float alpha;
float beta;
};

View File

@ -23,8 +23,8 @@ struct HSigmoidParams {
ov::PartialShape pshape;
ov::element::Type inType;
ov::element::Type outType;
ov::runtime::Tensor inputData;
ov::runtime::Tensor refData;
ov::Tensor inputData;
ov::Tensor refData;
};
class ReferenceHSigmoidLayerTest : public testing::TestWithParam<HSigmoidParams>, public CommonReferenceTest {

View File

@ -24,8 +24,8 @@ struct HSwishParams {
ov::PartialShape pshape;
ov::element::Type inType;
ov::element::Type outType;
ov::runtime::Tensor inputData;
ov::runtime::Tensor refData;
ov::Tensor inputData;
ov::Tensor refData;
};
class ReferenceHSwishLayerTest : public testing::TestWithParam<HSwishParams>, public CommonReferenceTest {

View File

@ -37,8 +37,8 @@ struct IDFTParams {
Shape m_expected_shape;
element::Type_t m_input_type;
element::Type_t m_expected_type;
runtime::Tensor m_input_value;
runtime::Tensor m_expected_value;
ov::Tensor m_input_value;
ov::Tensor m_expected_value;
std::shared_ptr<op::v0::Constant> m_axes;
std::shared_ptr<op::v0::Constant> m_signal;
};

View File

@ -18,14 +18,14 @@ using namespace ov;
using namespace InferenceEngine;
struct IfFunctionalBase {
virtual std::shared_ptr<Model> create_function(const std::vector<Tensor>& if_inputs,
const std::vector<Tensor>& results) = 0;
virtual std::shared_ptr<Model> create_function(const std::vector<reference_tests::Tensor>& if_inputs,
const std::vector<reference_tests::Tensor>& results) = 0;
IfFunctionalBase() {}
};
struct IfCondConst : public IfFunctionalBase {
std::shared_ptr<Model> create_function(const std::vector<Tensor>& if_inputs,
const std::vector<Tensor>& results) override {
std::shared_ptr<Model> create_function(const std::vector<reference_tests::Tensor>& if_inputs,
const std::vector<reference_tests::Tensor>& results) override {
NGRAPH_CHECK(if_inputs.size() == 2, "Incorrect test case! Number of inputs is not 2.");
NGRAPH_CHECK(results.size() == 1, "Incorrect test case! Number of outputs is not 1.");
@ -56,8 +56,8 @@ struct IfCondConst : public IfFunctionalBase {
};
struct IfCondIsNonConst : public IfFunctionalBase {
std::shared_ptr<Model> create_function(const std::vector<Tensor>& if_inputs,
const std::vector<Tensor>& results) override {
std::shared_ptr<Model> create_function(const std::vector<reference_tests::Tensor>& if_inputs,
const std::vector<reference_tests::Tensor>& results) override {
NGRAPH_CHECK(if_inputs.size() == 3, "Incorrect test case! Number of inputs is not 3.");
NGRAPH_CHECK(results.size() == 1, "Incorrect test case! Number of outputs is not 1.");
@ -90,8 +90,8 @@ struct IfCondIsNonConst : public IfFunctionalBase {
};
struct IfWithoutAdditionalInputs : IfFunctionalBase {
std::shared_ptr<Model> create_function(const std::vector<Tensor>& if_inputs,
const std::vector<Tensor>& results) override {
std::shared_ptr<Model> create_function(const std::vector<reference_tests::Tensor>& if_inputs,
const std::vector<reference_tests::Tensor>& results) override {
NGRAPH_CHECK(if_inputs.size() == 1, "Incorrect test case! Number of inputs is not 1.");
NGRAPH_CHECK(results.size() == 1, "Incorrect test case! Number of outputs is not 1.");
@ -112,8 +112,8 @@ struct IfWithoutAdditionalInputs : IfFunctionalBase {
};
struct IfDynamismCaseWithStaticInputs : public IfFunctionalBase {
std::shared_ptr<Model> create_function(const std::vector<Tensor>& if_inputs,
const std::vector<Tensor>& results) override {
std::shared_ptr<Model> create_function(const std::vector<reference_tests::Tensor>& if_inputs,
const std::vector<reference_tests::Tensor>& results) override {
NGRAPH_CHECK(if_inputs.size() == 4, "Incorrect test case! Number of inputs is not 4.");
NGRAPH_CHECK(results.size() == 2, "Incorrect test case! Number of outputs is not 2.");
@ -154,8 +154,8 @@ struct IfDynamismCaseWithStaticInputs : public IfFunctionalBase {
};
struct IfConditionIsScalar : public IfFunctionalBase {
std::shared_ptr<Model> create_function(const std::vector<Tensor>& if_inputs,
const std::vector<Tensor>& results) override {
std::shared_ptr<Model> create_function(const std::vector<reference_tests::Tensor>& if_inputs,
const std::vector<reference_tests::Tensor>& results) override {
NGRAPH_CHECK(if_inputs.size() == 3, "Incorrect test case! Number of inputs is not 3.");
NGRAPH_CHECK(results.size() == 1, "Incorrect test case! Number of outputs is not 1.");
@ -190,8 +190,8 @@ struct IfConditionIsScalar : public IfFunctionalBase {
};
struct IfConditionIsDynamic : public IfFunctionalBase {
std::shared_ptr<Model> create_function(const std::vector<Tensor>& if_inputs,
const std::vector<Tensor>& results) override {
std::shared_ptr<Model> create_function(const std::vector<reference_tests::Tensor>& if_inputs,
const std::vector<reference_tests::Tensor>& results) override {
NGRAPH_CHECK(if_inputs.size() == 3, "Incorrect test case! Number of inputs is not 3.");
NGRAPH_CHECK(results.size() == 1, "Incorrect test case! Number of outputs is not 1.");
@ -226,8 +226,8 @@ struct IfConditionIsDynamic : public IfFunctionalBase {
struct IfParams {
IfParams(const std::shared_ptr<IfFunctionalBase>& functional,
const std::vector<Tensor>& if_inputs,
const std::vector<Tensor>& expected_results,
const std::vector<reference_tests::Tensor>& if_inputs,
const std::vector<reference_tests::Tensor>& expected_results,
const std::string& test_case_name)
: function(functional),
inputs(if_inputs),
@ -235,8 +235,8 @@ struct IfParams {
test_case_name(test_case_name) {}
std::shared_ptr<IfFunctionalBase> function;
std::vector<Tensor> inputs;
std::vector<Tensor> expected_results;
std::vector<reference_tests::Tensor> inputs;
std::vector<reference_tests::Tensor> expected_results;
std::string test_case_name;
};
@ -288,81 +288,81 @@ INSTANTIATE_TEST_SUITE_P(
::testing::Values(
IfParams(
std::make_shared<IfCondConst>(true),
std::vector<Tensor>{Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{1.0, 1.0, 1.0, 1.0}),
Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{2.0, 2.0, 2.0, 2.0})},
std::vector<Tensor>{Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{2.0, 2.0, 2.0, 2.0})},
std::vector<reference_tests::Tensor>{reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{1.0, 1.0, 1.0, 1.0}),
reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{2.0, 2.0, 2.0, 2.0})},
std::vector<reference_tests::Tensor>{reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{2.0, 2.0, 2.0, 2.0})},
"if_condition_const_is_true"),
IfParams(
std::make_shared<IfCondConst>(false),
std::vector<Tensor>{Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{1.0, 1.0, 1.0, 1.0}),
Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{2.0, 2.0, 2.0, 2.0})},
std::vector<Tensor>{Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{1.0, 1.0, 1.0, 1.0})},
std::vector<reference_tests::Tensor>{reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{1.0, 1.0, 1.0, 1.0}),
reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{2.0, 2.0, 2.0, 2.0})},
std::vector<reference_tests::Tensor>{reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{1.0, 1.0, 1.0, 1.0})},
"if_condition_const_is_false"),
IfParams(
std::make_shared<IfCondIsNonConst>(),
std::vector<Tensor>{Tensor(Shape{1}, ngraph::element::boolean, std::vector<unsigned char>{1}),
Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{1.0, 2.0, 3.0, 4.0}),
Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{2.0, 1.0, 2.0, 3.0})},
std::vector<Tensor>{Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{2.0, 2.0, 6.0, 12.0})},
std::vector<reference_tests::Tensor>{reference_tests::Tensor(Shape{1}, ngraph::element::boolean, std::vector<unsigned char>{1}),
reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{1.0, 2.0, 3.0, 4.0}),
reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{2.0, 1.0, 2.0, 3.0})},
std::vector<reference_tests::Tensor>{reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{2.0, 2.0, 6.0, 12.0})},
"if_condition_si_non_const_true"),
IfParams(
std::make_shared<IfCondIsNonConst>(),
std::vector<Tensor>{Tensor(Shape{1}, ngraph::element::boolean, std::vector<unsigned char>{0}),
Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{1.0, 2.0, 3.0, 4.0}),
Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{2.0, 1.0, 2.0, 3.0})},
std::vector<Tensor>{Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{3.0, 3.0, 5.0, 7.0})},
std::vector<reference_tests::Tensor>{reference_tests::Tensor(Shape{1}, ngraph::element::boolean, std::vector<unsigned char>{0}),
reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{1.0, 2.0, 3.0, 4.0}),
reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{2.0, 1.0, 2.0, 3.0})},
std::vector<reference_tests::Tensor>{reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{3.0, 3.0, 5.0, 7.0})},
"if_condition_is_non_const_false"),
IfParams(std::make_shared<IfWithoutAdditionalInputs>(),
std::vector<Tensor>{Tensor(Shape{1}, ngraph::element::boolean, std::vector<unsigned char>{1})},
std::vector<Tensor>{Tensor(Shape{1}, ngraph::element::f32, std::vector<float>{8.0})},
std::vector<reference_tests::Tensor>{reference_tests::Tensor(Shape{1}, ngraph::element::boolean, std::vector<unsigned char>{1})},
std::vector<reference_tests::Tensor>{reference_tests::Tensor(Shape{1}, ngraph::element::f32, std::vector<float>{8.0})},
"if_without_addition_inputs_condition_is_true"),
IfParams(std::make_shared<IfWithoutAdditionalInputs>(),
std::vector<Tensor>{Tensor(Shape{1}, ngraph::element::boolean, std::vector<unsigned char>{0})},
std::vector<Tensor>{Tensor(Shape{1}, ngraph::element::f32, std::vector<float>{2.0})},
std::vector<reference_tests::Tensor>{reference_tests::Tensor(Shape{1}, ngraph::element::boolean, std::vector<unsigned char>{0})},
std::vector<reference_tests::Tensor>{reference_tests::Tensor(Shape{1}, ngraph::element::f32, std::vector<float>{2.0})},
"if_without_addition_inputs_condition_is_false"),
IfParams(
std::make_shared<IfConditionIsScalar>(),
std::vector<Tensor>{Tensor(Shape{}, ngraph::element::boolean, std::vector<unsigned char>{1}),
Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{1.0, 2.0, 3.0, 4.0}),
Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{2.0, 1.0, 2.0, 3.0})},
std::vector<Tensor>{Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{2.0, 2.0, 6.0, 12.0})},
std::vector<reference_tests::Tensor>{reference_tests::Tensor(Shape{}, ngraph::element::boolean, std::vector<unsigned char>{1}),
reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{1.0, 2.0, 3.0, 4.0}),
reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{2.0, 1.0, 2.0, 3.0})},
std::vector<reference_tests::Tensor>{reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{2.0, 2.0, 6.0, 12.0})},
"if_condition_is_scalar_cond_true"),
IfParams(
std::make_shared<IfConditionIsScalar>(),
std::vector<Tensor>{Tensor(Shape{}, ngraph::element::boolean, std::vector<unsigned char>{0}),
Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{1.0, 2.0, 3.0, 4.0}),
Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{2.0, 1.0, 2.0, 3.0})},
std::vector<Tensor>{Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{3.0, 3.0, 5.0, 7.0})},
std::vector<reference_tests::Tensor>{reference_tests::Tensor(Shape{}, ngraph::element::boolean, std::vector<unsigned char>{0}),
reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{1.0, 2.0, 3.0, 4.0}),
reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{2.0, 1.0, 2.0, 3.0})},
std::vector<reference_tests::Tensor>{reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{3.0, 3.0, 5.0, 7.0})},
"if_condition_is_scalar_cond_false"),
IfParams(
std::make_shared<IfDynamismCaseWithStaticInputs>(),
std::vector<Tensor>{Tensor(Shape{}, ngraph::element::boolean, std::vector<unsigned char>{1}),
Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{1.0, 2.0, 3.0, 4.0}),
Tensor(Shape{4, 2, 2}, ngraph::element::f32, Y_gen()),
Tensor(Shape{8, 8, 8}, ngraph::element::f32, Z_gen())},
std::vector<Tensor>{Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{1.0, 4.0, 9.0, 16.0}),
Tensor(Shape{4, 2, 2}, ngraph::element::f32, Y_gen())},
std::vector<reference_tests::Tensor>{reference_tests::Tensor(Shape{}, ngraph::element::boolean, std::vector<unsigned char>{1}),
reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{1.0, 2.0, 3.0, 4.0}),
reference_tests::Tensor(Shape{4, 2, 2}, ngraph::element::f32, Y_gen()),
reference_tests::Tensor(Shape{8, 8, 8}, ngraph::element::f32, Z_gen())},
std::vector<reference_tests::Tensor>{reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{1.0, 4.0, 9.0, 16.0}),
reference_tests::Tensor(Shape{4, 2, 2}, ngraph::element::f32, Y_gen())},
"If_dynamism_case_with_static_inputs_condition_true"),
IfParams(
std::make_shared<IfDynamismCaseWithStaticInputs>(),
std::vector<Tensor>{Tensor(Shape{}, ngraph::element::boolean, std::vector<unsigned char>{0}),
Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{1.0, 2.0, 3.0, 4.0}),
Tensor(Shape{4, 2, 2}, ngraph::element::f32, Y_gen()),
Tensor(Shape{8, 8, 8}, ngraph::element::f32, Z_gen())},
std::vector<Tensor>{Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{2.0, 4.0, 6.0, 8.0}),
Tensor(Shape{8, 8, 8}, ngraph::element::f32, Z_gen())},
std::vector<reference_tests::Tensor>{reference_tests::Tensor(Shape{}, ngraph::element::boolean, std::vector<unsigned char>{0}),
reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{1.0, 2.0, 3.0, 4.0}),
reference_tests::Tensor(Shape{4, 2, 2}, ngraph::element::f32, Y_gen()),
reference_tests::Tensor(Shape{8, 8, 8}, ngraph::element::f32, Z_gen())},
std::vector<reference_tests::Tensor>{reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{2.0, 4.0, 6.0, 8.0}),
reference_tests::Tensor(Shape{8, 8, 8}, ngraph::element::f32, Z_gen())},
"If_dynamism_case_with_static_inputs_condition_false"),
IfParams(
std::make_shared<IfConditionIsDynamic>(),
std::vector<Tensor>{Tensor(Shape{}, ngraph::element::boolean, std::vector<unsigned char>{1}),
Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{1.0, 2.0, 3.0, 4.0}),
Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{2.0, 1.0, 2.0, 3.0})},
std::vector<Tensor>{Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{2.0, 2.0, 6.0, 12.0})},
std::vector<reference_tests::Tensor>{reference_tests::Tensor(Shape{}, ngraph::element::boolean, std::vector<unsigned char>{1}),
reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{1.0, 2.0, 3.0, 4.0}),
reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{2.0, 1.0, 2.0, 3.0})},
std::vector<reference_tests::Tensor>{reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{2.0, 2.0, 6.0, 12.0})},
"if_condition_is_dynamic_cond_true"),
IfParams(
std::make_shared<IfConditionIsDynamic>(),
std::vector<Tensor>{Tensor(Shape{}, ngraph::element::boolean, std::vector<unsigned char>{0}),
Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{1.0, 2.0, 3.0, 4.0}),
Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{2.0, 1.0, 2.0, 3.0})},
std::vector<Tensor>{Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{3.0, 3.0, 5.0, 7.0})},
std::vector<reference_tests::Tensor>{reference_tests::Tensor(Shape{}, ngraph::element::boolean, std::vector<unsigned char>{0}),
reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{1.0, 2.0, 3.0, 4.0}),
reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{2.0, 1.0, 2.0, 3.0})},
std::vector<reference_tests::Tensor>{reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector<float>{3.0, 3.0, 5.0, 7.0})},
"if_condition_is_dynamic_cond_false")));

View File

@ -26,8 +26,8 @@ struct LogParams {
PartialShape pshape;
element::Type inType;
element::Type outType;
runtime::Tensor inputData;
runtime::Tensor refData;
ov::Tensor inputData;
ov::Tensor refData;
};
class ReferenceLogLayerTest : public testing::TestWithParam<LogParams>, public CommonReferenceTest {

View File

@ -28,8 +28,8 @@ struct LogSoftmaxParams {
ov::PartialShape pshape;
ov::element::Type inType;
ov::element::Type outType;
ov::runtime::Tensor inputData;
ov::runtime::Tensor refData;
ov::Tensor inputData;
ov::Tensor refData;
};
class ReferenceLogSoftmaxLayerTest : public testing::TestWithParam<LogSoftmaxParams>, public CommonReferenceTest {

View File

@ -14,8 +14,8 @@ namespace LogicalOpsRefTestDefinitions {
struct RefLogicalParams {
ngraph::helpers::LogicalTypes opType;
std::vector<Tensor> inputs;
Tensor expected;
std::vector<reference_tests::Tensor> inputs;
reference_tests::Tensor expected;
};
struct Builder : ParamsBuilder<RefLogicalParams> {
@ -48,7 +48,7 @@ public:
}
private:
static std::shared_ptr<ov::Model> CreateFunction(ngraph::helpers::LogicalTypes op_type, const std::vector<Tensor>& inputs) {
static std::shared_ptr<ov::Model> CreateFunction(ngraph::helpers::LogicalTypes op_type, const std::vector<reference_tests::Tensor>& inputs) {
ov::ParameterVector params_vec;
for (auto& input : inputs) {
params_vec.push_back(std::make_shared<op::v0::Parameter>(input.type, input.shape));

View File

@ -70,8 +70,8 @@ struct LRNParams {
Shape m_expected_shape;
element::Type m_input_type;
element::Type m_expected_type;
runtime::Tensor m_input_value;
runtime::Tensor m_expected_value;
ov::Tensor m_input_value;
ov::Tensor m_expected_value;
float m_alpha;
float m_beta;
float m_bias;

View File

@ -17,14 +17,14 @@ struct LSTMCellParams {
int32_t inputSize;
int32_t hiddenSize;
int32_t gatesCount;
Tensor X;
Tensor W;
Tensor R;
Tensor H_t;
Tensor C_t;
Tensor B;
Tensor Ho;
Tensor Co;
reference_tests::Tensor X;
reference_tests::Tensor W;
reference_tests::Tensor R;
reference_tests::Tensor H_t;
reference_tests::Tensor C_t;
reference_tests::Tensor B;
reference_tests::Tensor Ho;
reference_tests::Tensor Co;
std::string testcaseName;
};
@ -287,29 +287,29 @@ std::vector<LSTMCellParams> generateParams() {
.inputSize(3)
.hiddenSize(3)
.gatesCount(4)
.X(Tensor(ET, {2, 3}, std::vector<T>{
.X(reference_tests::Tensor(ET, {2, 3}, std::vector<T>{
0.81342685f, 0.84108883f, 0.8152282f, 0.46893653f, 0.0901856f, 0.37088776f}))
.W(Tensor(ET, {4 * 3, 3}, std::vector<T>{
.W(reference_tests::Tensor(ET, {4 * 3, 3}, std::vector<T>{
3.3330739e-01f, 3.6229487e-04f, 4.6773660e-01f, 4.3046016e-01f, 7.3950343e-02f, 3.8063636e-01f,
9.6921772e-01f, 9.6897459e-01f, 6.2964785e-01f, 3.1134409e-01f, 8.4709978e-01f, 9.4928098e-01f,
6.1676943e-01f, 6.6020679e-01f, 1.9072217e-01f, 8.8032126e-02f, 4.0472135e-01f, 6.8342745e-01f,
8.3432144e-01f, 4.4928190e-01f, 7.9524308e-01f, 5.3966165e-01f, 8.5936421e-01f, 8.3136767e-01f,
5.5125546e-02f, 4.7791195e-01f, 3.5788772e-01f, 6.7507404e-01f, 2.1716513e-01f, 2.7473119e-01f,
3.3999152e-02f, 9.6835363e-01f, 3.7581277e-01f, 2.4026000e-01f, 6.7418844e-01f, 3.4199652e-01f}))
.R(Tensor(ET, {4 * 3, 3}, std::vector<T>{
.R(reference_tests::Tensor(ET, {4 * 3, 3}, std::vector<T>{
0.0987983f, 0.52032113f, 0.5848073f, 0.5356095f, 0.74497133f, 0.73260087f,
0.1700787f, 0.45684233f, 0.1495722f, 0.42734373f, 0.4433832f, 0.25906256f,
0.03854987f, 0.47480518f, 0.37215272f, 0.99890584f, 0.74019486f, 0.3518967f,
0.6881257f, 0.8170279f, 0.54088944f, 0.81225616f, 0.14619833f, 0.42941234f,
0.86843914f, 0.45967972f, 0.6237719f, 0.11074839f, 0.6029616f, 0.3149305f,
0.46504205f, 0.5843412f, 0.8733427f, 0.7687243f, 0.07074859f, 0.39188156f}))
.H_t(Tensor(ET, {2, 3}, std::vector<T>{
.H_t(reference_tests::Tensor(ET, {2, 3}, std::vector<T>{
0.77956f, 0.5331557f, 0.04297554f, 0.7962175f, 0.7635707f, 0.11989366f}))
.C_t(Tensor(ET, {2, 3}, std::vector<T>{
.C_t(reference_tests::Tensor(ET, {2, 3}, std::vector<T>{
0.8488452f, 0.18851636f, 0.5020695f, 0.29716516f, 0.06740791f, 0.45384037f}))
.B(Tensor(ET, {4 * 3}, std::vector<T>(4 * 3, 0.f)))
.Ho(Tensor(ET, {2, 3}, std::vector<T>{0.81457126f, 0.61109227f, 0.769522f, 0.52239674f, 0.4324641f, 0.63183f}))
.Co(Tensor(ET, {2, 3}, std::vector<T>{1.4444952f, 0.9635685f, 1.2875274f, 0.8053419f, 0.7184521f, 0.95803297f}))
.B(reference_tests::Tensor(ET, {4 * 3}, std::vector<T>(4 * 3, 0.f)))
.Ho(reference_tests::Tensor(ET, {2, 3}, std::vector<T>{0.81457126f, 0.61109227f, 0.769522f, 0.52239674f, 0.4324641f, 0.63183f}))
.Co(reference_tests::Tensor(ET, {2, 3}, std::vector<T>{1.4444952f, 0.9635685f, 1.2875274f, 0.8053419f, 0.7184521f, 0.95803297f}))
.testcaseName("lstm_cell_zero_bias_default_attrs")
};
return params;
@ -339,27 +339,27 @@ std::vector<LSTMCellParams> generateParamsBiasDefaultAttrs() {
.inputSize(3)
.hiddenSize(3)
.gatesCount(4)
.X(Tensor(ET, {2, 3}, std::vector<T>{
.X(reference_tests::Tensor(ET, {2, 3}, std::vector<T>{
0.81342685f, 0.84108883f, 0.8152282f, 0.46893653f, 0.0901856f, 0.37088776f}))
.W(Tensor(ET, {4 * 3, 3}, std::vector<T>{
.W(reference_tests::Tensor(ET, {4 * 3, 3}, std::vector<T>{
3.3330739e-01f, 3.6229487e-04f, 4.6773660e-01f, 4.3046016e-01f, 7.3950343e-02f, 3.8063636e-01f,
9.6921772e-01f, 9.6897459e-01f, 6.2964785e-01f, 3.1134409e-01f, 8.4709978e-01f, 9.4928098e-01f,
6.1676943e-01f, 6.6020679e-01f, 1.9072217e-01f, 8.8032126e-02f, 4.0472135e-01f, 6.8342745e-01f,
8.3432144e-01f, 4.4928190e-01f, 7.9524308e-01f, 5.3966165e-01f, 8.5936421e-01f, 8.3136767e-01f,
5.5125546e-02f, 4.7791195e-01f, 3.5788772e-01f, 6.7507404e-01f, 2.1716513e-01f, 2.7473119e-01f,
3.3999152e-02f, 9.6835363e-01f, 3.7581277e-01f, 2.4026000e-01f, 6.7418844e-01f, 3.4199652e-01f}))
.R(Tensor(ET, {4 * 3, 3}, std::vector<T>{
.R(reference_tests::Tensor(ET, {4 * 3, 3}, std::vector<T>{
0.0987983f, 0.52032113f, 0.5848073f, 0.5356095f, 0.74497133f, 0.73260087f,
0.1700787f, 0.45684233f, 0.1495722f, 0.42734373f, 0.4433832f, 0.25906256f,
0.03854987f, 0.47480518f, 0.37215272f, 0.99890584f, 0.74019486f, 0.3518967f,
0.6881257f, 0.8170279f, 0.54088944f, 0.81225616f, 0.14619833f, 0.42941234f,
0.86843914f, 0.45967972f, 0.6237719f, 0.11074839f, 0.6029616f, 0.3149305f,
0.46504205f, 0.5843412f, 0.8733427f, 0.7687243f, 0.07074859f, 0.39188156f}))
.H_t(Tensor(ET, {2, 3}, std::vector<T>{
.H_t(reference_tests::Tensor(ET, {2, 3}, std::vector<T>{
0.77956f, 0.5331557f, 0.04297554f, 0.7962175f, 0.7635707f, 0.11989366f}))
.C_t(Tensor(ET, {2, 3}, std::vector<T>{
.C_t(reference_tests::Tensor(ET, {2, 3}, std::vector<T>{
0.8488452f, 0.18851636f, 0.5020695f, 0.29716516f, 0.06740791f, 0.45384037f}))
.B(Tensor(ET, {4 * 3}, std::vector<T>{1.07393714f,
.B(reference_tests::Tensor(ET, {4 * 3}, std::vector<T>{1.07393714f,
1.15248052f,
1.16671345f,
0.21450312f,
@ -371,13 +371,13 @@ std::vector<LSTMCellParams> generateParamsBiasDefaultAttrs() {
0.51022074f,
1.11389844f,
0.74174305f}))
.Ho(Tensor(ET, {2, 3}, std::vector<T>{0.81014400720596313,
.Ho(reference_tests::Tensor(ET, {2, 3}, std::vector<T>{0.81014400720596313,
0.76665538549423218,
0.82509011030197144,
0.6479143500328064,
0.66586339473724365,
0.74838578701019287}))
.Co(Tensor(ET, {2, 3}, std::vector<T>{1.6800162792205811,
.Co(reference_tests::Tensor(ET, {2, 3}, std::vector<T>{1.6800162792205811,
1.1150213479995728,
1.4578367471694946,
1.0649888515472412,
@ -412,27 +412,27 @@ std::vector<LSTMCellParams> generateParamsBiasClip() {
.inputSize(3)
.hiddenSize(3)
.gatesCount(4)
.X(Tensor(ET, {2, 3}, std::vector<T>{
.X(reference_tests::Tensor(ET, {2, 3}, std::vector<T>{
0.81342685f, 0.84108883f, 0.8152282f, 0.46893653f, 0.0901856f, 0.37088776f}))
.W(Tensor(ET, {4 * 3, 3}, std::vector<T>{
.W(reference_tests::Tensor(ET, {4 * 3, 3}, std::vector<T>{
3.3330739e-01f, 3.6229487e-04f, 4.6773660e-01f, 4.3046016e-01f, 7.3950343e-02f, 3.8063636e-01f,
9.6921772e-01f, 9.6897459e-01f, 6.2964785e-01f, 3.1134409e-01f, 8.4709978e-01f, 9.4928098e-01f,
6.1676943e-01f, 6.6020679e-01f, 1.9072217e-01f, 8.8032126e-02f, 4.0472135e-01f, 6.8342745e-01f,
8.3432144e-01f, 4.4928190e-01f, 7.9524308e-01f, 5.3966165e-01f, 8.5936421e-01f, 8.3136767e-01f,
5.5125546e-02f, 4.7791195e-01f, 3.5788772e-01f, 6.7507404e-01f, 2.1716513e-01f, 2.7473119e-01f,
3.3999152e-02f, 9.6835363e-01f, 3.7581277e-01f, 2.4026000e-01f, 6.7418844e-01f, 3.4199652e-01f}))
.R(Tensor(ET, {4 * 3, 3}, std::vector<T>{
.R(reference_tests::Tensor(ET, {4 * 3, 3}, std::vector<T>{
0.0987983f, 0.52032113f, 0.5848073f, 0.5356095f, 0.74497133f, 0.73260087f,
0.1700787f, 0.45684233f, 0.1495722f, 0.42734373f, 0.4433832f, 0.25906256f,
0.03854987f, 0.47480518f, 0.37215272f, 0.99890584f, 0.74019486f, 0.3518967f,
0.6881257f, 0.8170279f, 0.54088944f, 0.81225616f, 0.14619833f, 0.42941234f,
0.86843914f, 0.45967972f, 0.6237719f, 0.11074839f, 0.6029616f, 0.3149305f,
0.46504205f, 0.5843412f, 0.8733427f, 0.7687243f, 0.07074859f, 0.39188156f}))
.H_t(Tensor(ET, {2, 3}, std::vector<T>{
.H_t(reference_tests::Tensor(ET, {2, 3}, std::vector<T>{
0.77956f, 0.5331557f, 0.04297554f, 0.7962175f, 0.7635707f, 0.11989366f}))
.C_t(Tensor(ET, {2, 3}, std::vector<T>{
.C_t(reference_tests::Tensor(ET, {2, 3}, std::vector<T>{
0.8488452f, 0.18851636f, 0.5020695f, 0.29716516f, 0.06740791f, 0.45384037f}))
.B(Tensor(ET, {4 * 3}, std::vector<T>{1.07393714f,
.B(reference_tests::Tensor(ET, {4 * 3}, std::vector<T>{1.07393714f,
1.15248052f,
1.16671345f,
0.21450312f,
@ -444,13 +444,13 @@ std::vector<LSTMCellParams> generateParamsBiasClip() {
0.51022074f,
1.11389844f,
0.74174305f}))
.Ho(Tensor(ET, {2, 3}, std::vector<T>{0.81014400720596313,
.Ho(reference_tests::Tensor(ET, {2, 3}, std::vector<T>{0.81014400720596313,
0.76665538549423218,
0.82387429475784302,
0.6479143500328064,
0.66586339473724365,
0.74838578701019287}))
.Co(Tensor(ET, {2, 3}, std::vector<T>{1.6800162792205811,
.Co(reference_tests::Tensor(ET, {2, 3}, std::vector<T>{1.6800162792205811,
1.1150213479995728,
1.4510968923568726,
1.0649888515472412,
@ -494,29 +494,29 @@ std::vector<LSTMCellParams> generateParamsV1() {
.inputSize(3)
.hiddenSize(3)
.gatesCount(4)
.X(Tensor(ET, {2, 3}, std::vector<T>{
.X(reference_tests::Tensor(ET, {2, 3}, std::vector<T>{
0.81342685f, 0.84108883f, 0.8152282f, 0.46893653f, 0.0901856f, 0.37088776f}))
.W(Tensor(ET, {4 * 3, 3}, std::vector<T>{
.W(reference_tests::Tensor(ET, {4 * 3, 3}, std::vector<T>{
3.3330739e-01f, 3.6229487e-04f, 4.6773660e-01f, 4.3046016e-01f, 7.3950343e-02f, 3.8063636e-01f,
9.6921772e-01f, 9.6897459e-01f, 6.2964785e-01f, 3.1134409e-01f, 8.4709978e-01f, 9.4928098e-01f,
6.1676943e-01f, 6.6020679e-01f, 1.9072217e-01f, 8.8032126e-02f, 4.0472135e-01f, 6.8342745e-01f,
8.3432144e-01f, 4.4928190e-01f, 7.9524308e-01f, 5.3966165e-01f, 8.5936421e-01f, 8.3136767e-01f,
5.5125546e-02f, 4.7791195e-01f, 3.5788772e-01f, 6.7507404e-01f, 2.1716513e-01f, 2.7473119e-01f,
3.3999152e-02f, 9.6835363e-01f, 3.7581277e-01f, 2.4026000e-01f, 6.7418844e-01f, 3.4199652e-01f}))
.R(Tensor(ET, {4 * 3, 3}, std::vector<T>{
.R(reference_tests::Tensor(ET, {4 * 3, 3}, std::vector<T>{
0.0987983f, 0.52032113f, 0.5848073f, 0.5356095f, 0.74497133f, 0.73260087f,
0.1700787f, 0.45684233f, 0.1495722f, 0.42734373f, 0.4433832f, 0.25906256f,
0.03854987f, 0.47480518f, 0.37215272f, 0.99890584f, 0.74019486f, 0.3518967f,
0.6881257f, 0.8170279f, 0.54088944f, 0.81225616f, 0.14619833f, 0.42941234f,
0.86843914f, 0.45967972f, 0.6237719f, 0.11074839f, 0.6029616f, 0.3149305f,
0.46504205f, 0.5843412f, 0.8733427f, 0.7687243f, 0.07074859f, 0.39188156f}))
.H_t(Tensor(ET, {2, 3}, std::vector<T>{
.H_t(reference_tests::Tensor(ET, {2, 3}, std::vector<T>{
0.77956f, 0.5331557f, 0.04297554f, 0.7962175f, 0.7635707f, 0.11989366f}))
.C_t(Tensor(ET, {2, 3}, std::vector<T>{
.C_t(reference_tests::Tensor(ET, {2, 3}, std::vector<T>{
0.8488452f, 0.18851636f, 0.5020695f, 0.29716516f, 0.06740791f, 0.45384037f}))
.B(Tensor(ET, {4 * 3}, std::vector<T>(4 * 3, 0.f)))
.Ho(Tensor(ET, {2, 3}, std::vector<T>{0.81457126f, 0.61109227f, 0.769522f, 0.52239674f, 0.4324641f, 0.63183f}))
.Co(Tensor(ET, {2, 3}, std::vector<T>{1.4444952f, 0.9635685f, 1.2875274f, 0.8053419f, 0.7184521f, 0.95803297f}))
.B(reference_tests::Tensor(ET, {4 * 3}, std::vector<T>(4 * 3, 0.f)))
.Ho(reference_tests::Tensor(ET, {2, 3}, std::vector<T>{0.81457126f, 0.61109227f, 0.769522f, 0.52239674f, 0.4324641f, 0.63183f}))
.Co(reference_tests::Tensor(ET, {2, 3}, std::vector<T>{1.4444952f, 0.9635685f, 1.2875274f, 0.8053419f, 0.7184521f, 0.95803297f}))
.testcaseName("lstm_cell_v1_zero_bias_default_attrs")
};
return params;
@ -546,27 +546,27 @@ std::vector<LSTMCellParams> generateParamsBiasDefaultAttrsV1() {
.inputSize(3)
.hiddenSize(3)
.gatesCount(4)
.X(Tensor(ET, {2, 3}, std::vector<T>{
.X(reference_tests::Tensor(ET, {2, 3}, std::vector<T>{
0.81342685f, 0.84108883f, 0.8152282f, 0.46893653f, 0.0901856f, 0.37088776f}))
.W(Tensor(ET, {4 * 3, 3}, std::vector<T>{
.W(reference_tests::Tensor(ET, {4 * 3, 3}, std::vector<T>{
3.3330739e-01f, 3.6229487e-04f, 4.6773660e-01f, 4.3046016e-01f, 7.3950343e-02f, 3.8063636e-01f,
9.6921772e-01f, 9.6897459e-01f, 6.2964785e-01f, 3.1134409e-01f, 8.4709978e-01f, 9.4928098e-01f,
6.1676943e-01f, 6.6020679e-01f, 1.9072217e-01f, 8.8032126e-02f, 4.0472135e-01f, 6.8342745e-01f,
8.3432144e-01f, 4.4928190e-01f, 7.9524308e-01f, 5.3966165e-01f, 8.5936421e-01f, 8.3136767e-01f,
5.5125546e-02f, 4.7791195e-01f, 3.5788772e-01f, 6.7507404e-01f, 2.1716513e-01f, 2.7473119e-01f,
3.3999152e-02f, 9.6835363e-01f, 3.7581277e-01f, 2.4026000e-01f, 6.7418844e-01f, 3.4199652e-01f}))
.R(Tensor(ET, {4 * 3, 3}, std::vector<T>{
.R(reference_tests::Tensor(ET, {4 * 3, 3}, std::vector<T>{
0.0987983f, 0.52032113f, 0.5848073f, 0.5356095f, 0.74497133f, 0.73260087f,
0.1700787f, 0.45684233f, 0.1495722f, 0.42734373f, 0.4433832f, 0.25906256f,
0.03854987f, 0.47480518f, 0.37215272f, 0.99890584f, 0.74019486f, 0.3518967f,
0.6881257f, 0.8170279f, 0.54088944f, 0.81225616f, 0.14619833f, 0.42941234f,
0.86843914f, 0.45967972f, 0.6237719f, 0.11074839f, 0.6029616f, 0.3149305f,
0.46504205f, 0.5843412f, 0.8733427f, 0.7687243f, 0.07074859f, 0.39188156f}))
.H_t(Tensor(ET, {2, 3}, std::vector<T>{
.H_t(reference_tests::Tensor(ET, {2, 3}, std::vector<T>{
0.77956f, 0.5331557f, 0.04297554f, 0.7962175f, 0.7635707f, 0.11989366f}))
.C_t(Tensor(ET, {2, 3}, std::vector<T>{
.C_t(reference_tests::Tensor(ET, {2, 3}, std::vector<T>{
0.8488452f, 0.18851636f, 0.5020695f, 0.29716516f, 0.06740791f, 0.45384037f}))
.B(Tensor(ET, {4 * 3}, std::vector<T>{1.07393714f,
.B(reference_tests::Tensor(ET, {4 * 3}, std::vector<T>{1.07393714f,
1.15248052f,
1.16671345f,
0.21450312f,
@ -578,13 +578,13 @@ std::vector<LSTMCellParams> generateParamsBiasDefaultAttrsV1() {
0.51022074f,
1.11389844f,
0.74174305f}))
.Ho(Tensor(ET, {2, 3}, std::vector<T>{0.81014400720596313,
.Ho(reference_tests::Tensor(ET, {2, 3}, std::vector<T>{0.81014400720596313,
0.76665538549423218,
0.82509011030197144,
0.6479143500328064,
0.66586339473724365,
0.74838578701019287}))
.Co(Tensor(ET, {2, 3}, std::vector<T>{1.6800162792205811,
.Co(reference_tests::Tensor(ET, {2, 3}, std::vector<T>{1.6800162792205811,
1.1150213479995728,
1.4578367471694946,
1.0649888515472412,
@ -619,27 +619,27 @@ std::vector<LSTMCellParams> generateParamsBiasClipV1() {
.inputSize(3)
.hiddenSize(3)
.gatesCount(4)
.X(Tensor(ET, {2, 3}, std::vector<T>{
.X(reference_tests::Tensor(ET, {2, 3}, std::vector<T>{
0.81342685f, 0.84108883f, 0.8152282f, 0.46893653f, 0.0901856f, 0.37088776f}))
.W(Tensor(ET, {4 * 3, 3}, std::vector<T>{
.W(reference_tests::Tensor(ET, {4 * 3, 3}, std::vector<T>{
3.3330739e-01f, 3.6229487e-04f, 4.6773660e-01f, 4.3046016e-01f, 7.3950343e-02f, 3.8063636e-01f,
9.6921772e-01f, 9.6897459e-01f, 6.2964785e-01f, 3.1134409e-01f, 8.4709978e-01f, 9.4928098e-01f,
6.1676943e-01f, 6.6020679e-01f, 1.9072217e-01f, 8.8032126e-02f, 4.0472135e-01f, 6.8342745e-01f,
8.3432144e-01f, 4.4928190e-01f, 7.9524308e-01f, 5.3966165e-01f, 8.5936421e-01f, 8.3136767e-01f,
5.5125546e-02f, 4.7791195e-01f, 3.5788772e-01f, 6.7507404e-01f, 2.1716513e-01f, 2.7473119e-01f,
3.3999152e-02f, 9.6835363e-01f, 3.7581277e-01f, 2.4026000e-01f, 6.7418844e-01f, 3.4199652e-01f}))
.R(Tensor(ET, {4 * 3, 3}, std::vector<T>{
.R(reference_tests::Tensor(ET, {4 * 3, 3}, std::vector<T>{
0.0987983f, 0.52032113f, 0.5848073f, 0.5356095f, 0.74497133f, 0.73260087f,
0.1700787f, 0.45684233f, 0.1495722f, 0.42734373f, 0.4433832f, 0.25906256f,
0.03854987f, 0.47480518f, 0.37215272f, 0.99890584f, 0.74019486f, 0.3518967f,
0.6881257f, 0.8170279f, 0.54088944f, 0.81225616f, 0.14619833f, 0.42941234f,
0.86843914f, 0.45967972f, 0.6237719f, 0.11074839f, 0.6029616f, 0.3149305f,
0.46504205f, 0.5843412f, 0.8733427f, 0.7687243f, 0.07074859f, 0.39188156f}))
.H_t(Tensor(ET, {2, 3}, std::vector<T>{
.H_t(reference_tests::Tensor(ET, {2, 3}, std::vector<T>{
0.77956f, 0.5331557f, 0.04297554f, 0.7962175f, 0.7635707f, 0.11989366f}))
.C_t(Tensor(ET, {2, 3}, std::vector<T>{
.C_t(reference_tests::Tensor(ET, {2, 3}, std::vector<T>{
0.8488452f, 0.18851636f, 0.5020695f, 0.29716516f, 0.06740791f, 0.45384037f}))
.B(Tensor(ET, {4 * 3}, std::vector<T>{1.07393714f,
.B(reference_tests::Tensor(ET, {4 * 3}, std::vector<T>{1.07393714f,
1.15248052f,
1.16671345f,
0.21450312f,
@ -651,13 +651,13 @@ std::vector<LSTMCellParams> generateParamsBiasClipV1() {
0.51022074f,
1.11389844f,
0.74174305f}))
.Ho(Tensor(ET, {2, 3}, std::vector<T>{0.81014400720596313,
.Ho(reference_tests::Tensor(ET, {2, 3}, std::vector<T>{0.81014400720596313,
0.76665538549423218,
0.82387429475784302,
0.6479143500328064,
0.66586339473724365,
0.74838578701019287}))
.Co(Tensor(ET, {2, 3}, std::vector<T>{1.6800162792205811,
.Co(reference_tests::Tensor(ET, {2, 3}, std::vector<T>{1.6800162792205811,
1.1150213479995728,
1.4510968923568726,
1.0649888515472412,

View File

@ -77,9 +77,9 @@ struct MatMulParams {
element::Type_t m_input_type1;
element::Type_t m_input_type2;
element::Type_t m_expected_type;
runtime::Tensor m_input_value1;
runtime::Tensor m_input_value2;
runtime::Tensor m_expected_value;
ov::Tensor m_input_value1;
ov::Tensor m_input_value2;
ov::Tensor m_expected_value;
bool m_transpose1;
bool m_transpose2;
bool m_use_constant;

View File

@ -15,20 +15,20 @@ namespace {
struct MatrixNmsParams {
MatrixNmsParams(
const opset8::MatrixNms::Attributes& attrs,
const Tensor& boxes, const Tensor& scores,
const Tensor& expectedSelectedScores, const Tensor& expectedSelectedIndices,
const Tensor& expectedValidOutputs, const std::string& testcaseName = "") :
const reference_tests::Tensor& boxes, const reference_tests::Tensor& scores,
const reference_tests::Tensor& expectedSelectedScores, const reference_tests::Tensor& expectedSelectedIndices,
const reference_tests::Tensor& expectedValidOutputs, const std::string& testcaseName = "") :
attrs(attrs),
boxes(boxes), scores(scores),
expectedSelectedScores(expectedSelectedScores), expectedSelectedIndices(expectedSelectedIndices),
expectedValidOutputs(expectedValidOutputs), testcaseName(testcaseName) {}
opset8::MatrixNms::Attributes attrs;
Tensor boxes;
Tensor scores;
Tensor expectedSelectedScores;
Tensor expectedSelectedIndices;
Tensor expectedValidOutputs;
reference_tests::Tensor boxes;
reference_tests::Tensor scores;
reference_tests::Tensor expectedSelectedScores;
reference_tests::Tensor expectedSelectedIndices;
reference_tests::Tensor expectedValidOutputs;
std::string testcaseName;
};
@ -98,16 +98,16 @@ std::vector<MatrixNmsParams> generateParams() {
0.0f, // post_threshold
true, // normalized
},
Tensor(ET, {1, 6, 4}, std::vector<T>{
reference_tests::Tensor(ET, {1, 6, 4}, std::vector<T>{
0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9,
0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes
Tensor(ET_TH, {1, 2, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {1, 2, 6}, std::vector<T_TH>{
0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3}), // scores
Tensor(ET_TH, {3, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {3, 6}, std::vector<T_TH>{
1.00, 0.95, 0.00, 0.00, 1.00, 1.00, 1.00, 0.8, 0.00,
10.00, 1.00, 11.00, 1.00, 0.13636364, 0.0, 0.1, 1.0, 1.1}), // expected_selected_scores
Tensor(ET_IND, {3, 1}, std::vector<T_IND>{0, 3, 1}), // expected_selected_indices
Tensor(ET_IND, {1}, std::vector<T_IND>{3}), // expected_valid_outputs
reference_tests::Tensor(ET_IND, {3, 1}, std::vector<T_IND>{0, 3, 1}), // expected_selected_indices
reference_tests::Tensor(ET_IND, {1}, std::vector<T_IND>{3}), // expected_valid_outputs
"matrix_nms_output_type_i64"),
MatrixNmsParams(
{
@ -123,16 +123,16 @@ std::vector<MatrixNmsParams> generateParams() {
0.0f, // post_threshold
true, // normalized
},
Tensor(ET, {1, 6, 4}, std::vector<T>{
reference_tests::Tensor(ET, {1, 6, 4}, std::vector<T>{
0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9,
0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes
Tensor(ET_TH, {1, 2, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {1, 2, 6}, std::vector<T_TH>{
0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3}), // scores
Tensor(ET_TH, {3, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {3, 6}, std::vector<T_TH>{
1.00, 0.95, 0.00, 0.00, 1.00, 1.00, 1.00, 0.8, 0.00,
10.00, 1.00, 11.00, 1.00, 0.13636364, 0.0, 0.1, 1.0, 1.1}), // expected_selected_scores
Tensor(ET_IND, {3, 1}, std::vector<T_IND>{0, 3, 1}), // expected_selected_indices
Tensor(ET_IND, {1}, std::vector<T_IND>{3}), // expected_valid_outputs
reference_tests::Tensor(ET_IND, {3, 1}, std::vector<T_IND>{0, 3, 1}), // expected_selected_indices
reference_tests::Tensor(ET_IND, {1}, std::vector<T_IND>{3}), // expected_valid_outputs
"matrix_nms_output_type_i32"),
MatrixNmsParams(
{
@ -148,16 +148,16 @@ std::vector<MatrixNmsParams> generateParams() {
0.0f, // post_threshold
true, // normalized
},
Tensor(ET, {1, 6, 4}, std::vector<T>{
reference_tests::Tensor(ET, {1, 6, 4}, std::vector<T>{
0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9,
0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes
Tensor(ET_TH, {1, 2, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {1, 2, 6}, std::vector<T_TH>{
0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3}), // scores
Tensor(ET_TH, {3, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {3, 6}, std::vector<T_TH>{
1.00, 0.95, 0.00, 0.00, 1.00, 1.00, 1.00, 0.8, 0.00,
10.00, 1.00, 11.00, 1.00, 0.1966116, 0.0, 0.1, 1.0, 1.1}), // expected_selected_scores
Tensor(ET_IND, {3, 1}, std::vector<T_IND>{0, 3, 1}), // expected_selected_indices
Tensor(ET_IND, {1}, std::vector<T_IND>{3}), // expected_valid_outputs
reference_tests::Tensor(ET_IND, {3, 1}, std::vector<T_IND>{0, 3, 1}), // expected_selected_indices
reference_tests::Tensor(ET_IND, {1}, std::vector<T_IND>{3}), // expected_valid_outputs
"matrix_nms_gaussian"),
MatrixNmsParams(
{
@ -173,20 +173,20 @@ std::vector<MatrixNmsParams> generateParams() {
0.0f, // post_threshold
true, // normalized
},
Tensor(ET, {2, 6, 4}, std::vector<T>{
reference_tests::Tensor(ET, {2, 6, 4}, std::vector<T>{
0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9,
0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0,
0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9,
0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes
Tensor(ET_TH, {2, 2, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {2, 2, 6}, std::vector<T_TH>{
0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3,
0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3}), // scores
Tensor(ET_TH, {6, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {6, 6}, std::vector<T_TH>{
1.00, 0.95, 0.00, 0.00, 1.00, 1.00, 1.00, 0.8, 0.00, 10.00, 1.00, 11.00, 1.00, 0.13636364, 0.0, 0.1, 1.0, 1.1,
1.00, 0.95, 0.00, 0.00, 1.00, 1.00, 1.00, 0.8, 0.00, 10.00, 1.00, 11.00, 1.00, 0.13636364, 0.0, 0.1, 1.0, 1.1}),
// expected_selected_scores
Tensor(ET_IND, {6, 1}, std::vector<T_IND>{0, 3, 1, 6, 9, 7}), // expected_selected_indices
Tensor(ET_IND, {2}, std::vector<T_IND>{3, 3}), // expected_valid_outputs
reference_tests::Tensor(ET_IND, {6, 1}, std::vector<T_IND>{0, 3, 1, 6, 9, 7}), // expected_selected_indices
reference_tests::Tensor(ET_IND, {2}, std::vector<T_IND>{3, 3}), // expected_valid_outputs
"matrix_nms_two_batches_two_classes"),
MatrixNmsParams(
{
@ -202,15 +202,15 @@ std::vector<MatrixNmsParams> generateParams() {
0.5f, // post_threshold
true, // normalized
},
Tensor(ET, {2, 6, 4}, std::vector<T>{
reference_tests::Tensor(ET, {2, 6, 4}, std::vector<T>{
0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9,
0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0,
0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9,
0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes
Tensor(ET_TH, {2, 2, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {2, 2, 6}, std::vector<T_TH>{
0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3,
0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3}), // scores
Tensor(ET_TH, {8, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {8, 6}, std::vector<T_TH>{
0.00, 0.95, 0.00, 10.00, 1.00, 11.00,
1.00, 0.95, 0.00, 0.00, 1.00, 1.00,
0.00, 0.95, 0.00, 10.00, 1.00, 11.00,
@ -219,8 +219,8 @@ std::vector<MatrixNmsParams> generateParams() {
0.00, 0.90, 0.00, 0.00, 1.00, 1.00,
1.00, 0.80, 0.00, 10.00, 1.00, 11.00,
1.00, 0.80, 0.00, 10.00, 1.00, 11.00}), // expected_selected_scores
Tensor(ET_IND, {8, 1}, std::vector<T_IND>{3, 0, 9, 6, 0, 6, 3, 9}), // expected_selected_indices
Tensor(ET_IND, {2}, std::vector<T_IND>{4, 4}), // expected_valid_outputs
reference_tests::Tensor(ET_IND, {8, 1}, std::vector<T_IND>{3, 0, 9, 6, 0, 6, 3, 9}), // expected_selected_indices
reference_tests::Tensor(ET_IND, {2}, std::vector<T_IND>{4, 4}), // expected_valid_outputs
"matrix_nms_two_batches_two_classes_by_score_cross_batch"),
MatrixNmsParams(
{
@ -236,15 +236,15 @@ std::vector<MatrixNmsParams> generateParams() {
0.5f, // post_threshold
true, // normalized
},
Tensor(ET, {2, 6, 4}, std::vector<T>{
reference_tests::Tensor(ET, {2, 6, 4}, std::vector<T>{
0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9,
0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0,
0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9,
0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes
Tensor(ET_TH, {2, 2, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {2, 2, 6}, std::vector<T_TH>{
0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3,
0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3}), // scores
Tensor(ET_TH, {8, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {8, 6}, std::vector<T_TH>{
0.00, 0.95, 0.00, 10.00, 1.00, 11.00,
0.00, 0.90, 0.00, 0.00, 1.00, 1.00,
0.00, 0.95, 0.00, 10.00, 1.00, 11.00,
@ -253,8 +253,8 @@ std::vector<MatrixNmsParams> generateParams() {
1.00, 0.80, 0.00, 10.00, 1.00, 11.00,
1.00, 0.95, 0.00, 0.00, 1.00, 1.00,
1.00, 0.80, 0.00, 10.00, 1.00, 11.00}), // expected_selected_scores
Tensor(ET_IND, {8, 1}, std::vector<T_IND>{3, 0, 9, 6, 0, 3, 6, 9}), // expected_selected_indices
Tensor(ET_IND, {2}, std::vector<T_IND>{4, 4}), // expected_valid_outputs
reference_tests::Tensor(ET_IND, {8, 1}, std::vector<T_IND>{3, 0, 9, 6, 0, 3, 6, 9}), // expected_selected_indices
reference_tests::Tensor(ET_IND, {2}, std::vector<T_IND>{4, 4}), // expected_valid_outputs
"matrix_nms_two_batches_two_classes_by_classid_cross_batch"),
MatrixNmsParams(
{
@ -270,20 +270,20 @@ std::vector<MatrixNmsParams> generateParams() {
0.0f, // post_threshold
true, // normalized
},
Tensor(ET, {2, 6, 4}, std::vector<T>{
reference_tests::Tensor(ET, {2, 6, 4}, std::vector<T>{
0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9,
0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0,
0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9,
0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes
Tensor(ET_TH, {2, 2, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {2, 2, 6}, std::vector<T_TH>{
0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3,
0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3}), // scores
Tensor(ET_TH, {6, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {6, 6}, std::vector<T_TH>{
1.00, 0.95, 0.00, 0.00, 1.00, 1.00, 1.00, 0.8, 0.00, 10.00, 1.00, 11.00, 1.00, 0.13636364, 0.0, 0.1, 1.0, 1.1,
1.00, 0.95, 0.00, 0.00, 1.00, 1.00, 1.00, 0.8, 0.00, 10.00, 1.00, 11.00, 1.00, 0.13636364, 0.0, 0.1, 1.0, 1.1}),
// expected_selected_scores
Tensor(ET_IND, {6, 1}, std::vector<T_IND>{0, 3, 1, 6, 9, 7}), // expected_selected_indices
Tensor(ET_IND, {2}, std::vector<T_IND>{3, 3}), // expected_valid_outputs
reference_tests::Tensor(ET_IND, {6, 1}, std::vector<T_IND>{0, 3, 1, 6, 9, 7}), // expected_selected_indices
reference_tests::Tensor(ET_IND, {2}, std::vector<T_IND>{3, 3}), // expected_valid_outputs
"matrix_nms_by_keep_top_k"),
MatrixNmsParams(
{
@ -299,17 +299,17 @@ std::vector<MatrixNmsParams> generateParams() {
0.0f, // post_threshold
true, // normalized
},
Tensor(ET, {1, 6, 4}, std::vector<T>{
reference_tests::Tensor(ET, {1, 6, 4}, std::vector<T>{
0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9,
0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes
Tensor(ET_TH, {1, 2, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {1, 2, 6}, std::vector<T_TH>{
0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3}), // scores
Tensor(ET_TH, {6, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {6, 6}, std::vector<T_TH>{
0.00, 0.95, 0.0, 10.0, 1.0, 11.0, 1.00, 0.95, 0.0, 0.0, 1.0, 1.0, 0.00, 0.9, 0.0, 0.0, 1.0, 1.0,
1.00, 0.8, 0.0, 10.0, 1.0, 11.0, 0.00, 0.13636364, 0.0, 0.1, 1.0, 1.1, 1.00, 0.13636364, 0.0, 0.1, 1.0, 1.1}),
// expected_selected_scores
Tensor(ET_IND, {6, 1}, std::vector<T_IND>{3, 0, 0, 3, 1, 1}), // expected_selected_indices
Tensor(ET_IND, {1}, std::vector<T_IND>{6}), // expected_valid_outputs
reference_tests::Tensor(ET_IND, {6, 1}, std::vector<T_IND>{3, 0, 0, 3, 1, 1}), // expected_selected_indices
reference_tests::Tensor(ET_IND, {1}, std::vector<T_IND>{6}), // expected_valid_outputs
"matrix_nms_background"),
MatrixNmsParams(
{
@ -325,16 +325,16 @@ std::vector<MatrixNmsParams> generateParams() {
0.0f, // post_threshold
true, // normalized
},
Tensor(ET, {1, 6, 4}, std::vector<T>{
reference_tests::Tensor(ET, {1, 6, 4}, std::vector<T>{
1.0, 1.0, 0.0, 0.0, 0.0, 0.1, 1.0, 1.1, 0.0, 0.9, 1.0, -0.1,
0.0, 10.0, 1.0, 11.0, 1.0, 10.1, 0.0, 11.1, 1.0, 101.0, 0.0, 100.0}), // boxes
Tensor(ET_TH, {1, 1, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {1, 1, 6}, std::vector<T_TH>{
0.9, 0.75, 0.6, 0.95, 0.5, 0.3}), // scores
Tensor(ET_TH, {3, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {3, 6}, std::vector<T_TH>{
0.00, 0.95, 0.0, 10.0, 1.0, 11.0, 0.00, 0.9, 1.0, 1.0, 0.0, 0.0, 0.00, 0.75, 0.0, 0.1, 1.0, 1.1}),
// expected_selected_scores
Tensor(ET_IND, {3, 1}, std::vector<T_IND>{3, 0, 1}), // expected_selected_indices
Tensor(ET_IND, {1}, std::vector<T_IND>{3}), // expected_valid_outputs
reference_tests::Tensor(ET_IND, {3, 1}, std::vector<T_IND>{3, 0, 1}), // expected_selected_indices
reference_tests::Tensor(ET_IND, {1}, std::vector<T_IND>{3}), // expected_valid_outputs
"matrix_nms_flipped_coordinates"),
MatrixNmsParams(
{
@ -350,16 +350,16 @@ std::vector<MatrixNmsParams> generateParams() {
0.8f, // post_threshold
true, // normalized
},
Tensor(ET, {1, 6, 4}, std::vector<T>{
reference_tests::Tensor(ET, {1, 6, 4}, std::vector<T>{
0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9,
0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes
Tensor(ET_TH, {1, 1, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {1, 1, 6}, std::vector<T_TH>{
0.9, 0.75, 0.6, 0.95, 0.5, 0.3}), // scores
Tensor(ET_TH, {2, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {2, 6}, std::vector<T_TH>{
0.00, 0.95, 0.00, 10.00, 1.00, 11.00, 0.00, 0.9, 0.00, 0.00, 1.00, 1.00}),
// expected_selected_scores
Tensor(ET_IND, {2, 1}, std::vector<T_IND>{3, 0}), // expected_selected_indices
Tensor(ET_IND, {1}, std::vector<T_IND>{2}), // expected_valid_outputs
reference_tests::Tensor(ET_IND, {2, 1}, std::vector<T_IND>{3, 0}), // expected_selected_indices
reference_tests::Tensor(ET_IND, {1}, std::vector<T_IND>{2}), // expected_valid_outputs
"matrix_nms_post_threshold"),
MatrixNmsParams(
{
@ -375,16 +375,16 @@ std::vector<MatrixNmsParams> generateParams() {
0.3f, // post_threshold
true, // normalized
},
Tensor(ET, {1, 10, 4}, std::vector<T>{
reference_tests::Tensor(ET, {1, 10, 4}, std::vector<T>{
0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0,
1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0,
0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0}), // boxes
Tensor(ET_TH, {1, 1, 10}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {1, 1, 10}, std::vector<T_TH>{
0.4, 0.01, 0.2, 0.09, 0.15, 0.05, 0.02, 0.03, 0.05, 0.0}), // scores
Tensor(ET_TH, {1, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {1, 6}, std::vector<T_TH>{
0.00, 0.40, 0.00, 0.00, 1.00, 1.00}), // expected_selected_scores
Tensor(ET_IND, {1, 1}, std::vector<T_IND>{0}), // expected_selected_indices
Tensor(ET_IND, {1}, std::vector<T_IND>{1}), // expected_valid_outputs
reference_tests::Tensor(ET_IND, {1, 1}, std::vector<T_IND>{0}), // expected_selected_indices
reference_tests::Tensor(ET_IND, {1}, std::vector<T_IND>{1}), // expected_valid_outputs
"matrix_nms_identical_boxes"),
MatrixNmsParams(
{
@ -400,16 +400,16 @@ std::vector<MatrixNmsParams> generateParams() {
0.0f, // post_threshold
true, // normalized
},
Tensor(ET, {1, 6, 4}, std::vector<T>{
reference_tests::Tensor(ET, {1, 6, 4}, std::vector<T>{
0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9,
0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes
Tensor(ET_TH, {1, 1, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {1, 1, 6}, std::vector<T_TH>{
0.9, 0.75, 0.6, 0.95, 0.5, 0.3}), // scores
Tensor(ET_TH, {2, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {2, 6}, std::vector<T_TH>{
0.00, 0.95, 0.00, 10.00, 1.00, 11.00, 0.00, 0.90, 0.00, 0.00, 1.00, 1.00}),
// expected_selected_scores
Tensor(ET_IND, {2, 1}, std::vector<T_IND>{3, 0}), // expected_selected_indices
Tensor(ET_IND, {1}, std::vector<T_IND>{2}), // expected_valid_outputs
reference_tests::Tensor(ET_IND, {2, 1}, std::vector<T_IND>{3, 0}), // expected_selected_indices
reference_tests::Tensor(ET_IND, {1}, std::vector<T_IND>{2}), // expected_valid_outputs
"matrix_nms_nms_top_k"),
MatrixNmsParams(
{
@ -425,12 +425,12 @@ std::vector<MatrixNmsParams> generateParams() {
0.0f, // post_threshold
true, // normalized
},
Tensor(ET, {1, 1, 4}, std::vector<T>{0.0, 0.0, 1.0, 1.0}), // boxes
Tensor(ET_TH, {1, 1, 1}, std::vector<T_TH>{0.9}), // scores
Tensor(ET_TH, {1, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET, {1, 1, 4}, std::vector<T>{0.0, 0.0, 1.0, 1.0}), // boxes
reference_tests::Tensor(ET_TH, {1, 1, 1}, std::vector<T_TH>{0.9}), // scores
reference_tests::Tensor(ET_TH, {1, 6}, std::vector<T_TH>{
0.00, 0.90, 0.00, 0.00, 1.00, 1.00}), // expected_selected_scores
Tensor(ET_IND, {1, 1}, std::vector<T_IND>{0}), // expected_selected_indices
Tensor(ET_IND, {1}, std::vector<T_IND>{1}), // expected_valid_outputs
reference_tests::Tensor(ET_IND, {1, 1}, std::vector<T_IND>{0}), // expected_selected_indices
reference_tests::Tensor(ET_IND, {1}, std::vector<T_IND>{1}), // expected_valid_outputs
"matrix_nms_single_box"),
MatrixNmsParams(
{
@ -446,14 +446,14 @@ std::vector<MatrixNmsParams> generateParams() {
0.0f, // post_threshold
true, // normalized
},
Tensor(ET, {1, 6, 4}, std::vector<T>{
reference_tests::Tensor(ET, {1, 6, 4}, std::vector<T>{
0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9,
0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes
Tensor(ET_TH, {1, 1, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {1, 1, 6}, std::vector<T_TH>{
0.9, 0.75, 0.6, 0.95, 0.5, 0.3}), // scores
Tensor(ET_TH, {0, 6}, std::vector<T_TH>{}), // expected_selected_scores
Tensor(ET_IND, {0, 1}, std::vector<T_IND>{}), // expected_selected_indices
Tensor(ET_IND, {1}, std::vector<T_IND>{0}), // expected_valid_outputs
reference_tests::Tensor(ET_TH, {0, 6}, std::vector<T_TH>{}), // expected_selected_scores
reference_tests::Tensor(ET_IND, {0, 1}, std::vector<T_IND>{}), // expected_selected_indices
reference_tests::Tensor(ET_IND, {1}, std::vector<T_IND>{0}), // expected_valid_outputs
"matrix_nms_no_output"),
};
return params;

View File

@ -41,9 +41,9 @@ struct MaxPoolParams {
Shape m_input_shape;
element::Type m_input_type;
element::Type m_indices_type;
ov::runtime::Tensor m_input_data;
ov::runtime::Tensor m_expected_values;
ov::runtime::Tensor m_expected_indices;
ov::Tensor m_input_data;
ov::Tensor m_expected_values;
ov::Tensor m_expected_indices;
Strides m_strides;
Strides m_dilations;
Shape m_pads_begin;

View File

@ -31,9 +31,9 @@ struct MaximumParams {
PartialShape pshape2;
element::Type inType;
element::Type outType;
runtime::Tensor inputData1;
runtime::Tensor inputData2;
runtime::Tensor refData;
ov::Tensor inputData1;
ov::Tensor inputData2;
ov::Tensor refData;
};
class ReferenceMaximumLayerTest : public testing::TestWithParam<MaximumParams>, public CommonReferenceTest {

View File

@ -25,9 +25,9 @@ struct MinimumParams {
PartialShape pshape;
element::Type inType;
element::Type outType;
ov::runtime::Tensor inputData1;
ov::runtime::Tensor inputData2;
ov::runtime::Tensor refData;
ov::Tensor inputData1;
ov::Tensor inputData2;
ov::Tensor refData;
};
class ReferenceMinimumLayerTest : public testing::TestWithParam<MinimumParams>, public CommonReferenceTest {

View File

@ -29,8 +29,8 @@ struct MishParams {
ov::PartialShape inputShape;
ov::element::Type inType;
ov::element::Type outType;
ov::runtime::Tensor inputData;
ov::runtime::Tensor refData;
ov::Tensor inputData;
ov::Tensor refData;
std::string testcaseName;
};

View File

@ -31,9 +31,9 @@ struct ModParams {
PartialShape pshape2;
element::Type inType;
element::Type outType;
runtime::Tensor inputData1;
runtime::Tensor inputData2;
runtime::Tensor refData;
ov::Tensor inputData1;
ov::Tensor inputData2;
ov::Tensor refData;
};
class ReferenceModLayerTest : public testing::TestWithParam<ModParams>, public CommonReferenceTest {

View File

@ -23,9 +23,9 @@ struct MulticlassNmsParams {
const ov::element::Type output_type,
const bool sort_result_across_batch,
const bool normalized,
const Tensor& boxes, const Tensor& scores,
const Tensor& expectedSelectedScores, const Tensor& expectedSelectedIndices,
const Tensor& expectedValidOutputs, const std::string& testcaseName = "") :
const reference_tests::Tensor& boxes, const reference_tests::Tensor& scores,
const reference_tests::Tensor& expectedSelectedScores, const reference_tests::Tensor& expectedSelectedIndices,
const reference_tests::Tensor& expectedValidOutputs, const std::string& testcaseName = "") :
nms_top_k(nms_top_k),
iou_threshold(iou_threshold),
score_threshold(score_threshold),
@ -52,11 +52,11 @@ struct MulticlassNmsParams {
bool sort_result_across_batch = false;
bool normalized = true;
Tensor boxes;
Tensor scores;
Tensor expectedSelectedScores;
Tensor expectedSelectedIndices;
Tensor expectedValidOutputs;
reference_tests::Tensor boxes;
reference_tests::Tensor scores;
reference_tests::Tensor expectedSelectedScores;
reference_tests::Tensor expectedSelectedIndices;
reference_tests::Tensor expectedValidOutputs;
std::string testcaseName;
};
@ -134,17 +134,17 @@ std::vector<MulticlassNmsParams> generateParams() {
ET_IND, // output_type
false, // sort_result_across_batch
true, // normalized
Tensor(ET, {1, 6, 4}, std::vector<T>{
reference_tests::Tensor(ET, {1, 6, 4}, std::vector<T>{
0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9,
0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes
Tensor(ET_TH, {1, 2, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {1, 2, 6}, std::vector<T_TH>{
0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3}), // scores
Tensor(ET_TH, {4, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {4, 6}, std::vector<T_TH>{
0.00, 0.95, 0.00, 10.00, 1.00, 11.00, 1.00, 0.95,
0.00, 0.00, 1.00, 1.00, 0.00, 0.90, 0.00, 0.00,
1.00, 1.00, 1.00, 0.80, 0.00, 10.00, 1.00, 11.00}), // expected_selected_scores
Tensor(ET_IND, {4, 1}, std::vector<T_IND>{3, 0, 0, 3}), // expected_selected_indices
Tensor(ET_IND, {1}, std::vector<T_IND>{4}), // expected_valid_outputs
reference_tests::Tensor(ET_IND, {4, 1}, std::vector<T_IND>{3, 0, 0, 3}), // expected_selected_indices
reference_tests::Tensor(ET_IND, {1}, std::vector<T_IND>{4}), // expected_valid_outputs
"multiclass_nms_by_score"),
MulticlassNmsParams(
3, // nms_top_k
@ -157,17 +157,17 @@ std::vector<MulticlassNmsParams> generateParams() {
ET_IND, // output_type
false, // sort_result_across_batch
true, // normalized
Tensor(ET, {1, 6, 4}, std::vector<T>{
reference_tests::Tensor(ET, {1, 6, 4}, std::vector<T>{
0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9,
0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes
Tensor(ET_TH, {1, 2, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {1, 2, 6}, std::vector<T_TH>{
0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3}), // scores
Tensor(ET_TH, {4, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {4, 6}, std::vector<T_TH>{
0.00, 0.95, 0.00, 10.00, 1.00, 11.00, 0.00, 0.90,
0.00, 0.00, 1.00, 1.00, 1.00, 0.95, 0.00, 0.00,
1.00, 1.00, 1.00, 0.80, 0.00, 10.00, 1.00, 11.00}), // expected_selected_scores
Tensor(ET_IND, {4, 1}, std::vector<T_IND>{3, 0, 0, 3}), // expected_selected_indices
Tensor(ET_IND, {1}, std::vector<T_IND>{4}), // expected_valid_outputs
reference_tests::Tensor(ET_IND, {4, 1}, std::vector<T_IND>{3, 0, 0, 3}), // expected_selected_indices
reference_tests::Tensor(ET_IND, {1}, std::vector<T_IND>{4}), // expected_valid_outputs
"multiclass_nms_by_class_id"),
MulticlassNmsParams(
3, // nms_top_k
@ -180,17 +180,17 @@ std::vector<MulticlassNmsParams> generateParams() {
ET_IND, // output_type
false, // sort_result_across_batch
true, // normalized
Tensor(ET, {1, 6, 4}, std::vector<T>{
reference_tests::Tensor(ET, {1, 6, 4}, std::vector<T>{
0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9,
0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes
Tensor(ET_TH, {1, 2, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {1, 2, 6}, std::vector<T_TH>{
0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3}), // scores
Tensor(ET_TH, {4, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {4, 6}, std::vector<T_TH>{
0.00, 0.95, 0.00, 10.00, 1.00, 11.00, 0.00, 0.90,
0.00, 0.00, 1.00, 1.00, 1.00, 0.95, 0.00, 0.00,
1.00, 1.00, 1.00, 0.80, 0.00, 10.00, 1.00, 11.00}), // expected_selected_scores
Tensor(ET_IND, {4, 1}, std::vector<T_IND>{3, 0, 0, 3}), // expected_selected_indices
Tensor(ET_IND, {1}, std::vector<T_IND>{4}), // expected_valid_outputs
reference_tests::Tensor(ET_IND, {4, 1}, std::vector<T_IND>{3, 0, 0, 3}), // expected_selected_indices
reference_tests::Tensor(ET_IND, {1}, std::vector<T_IND>{4}), // expected_valid_outputs
"multiclass_nms_output_type_i32"),
MulticlassNmsParams(
3, // nms_top_k
@ -203,22 +203,22 @@ std::vector<MulticlassNmsParams> generateParams() {
ET_IND, // output_type
false, // sort_result_across_batch
true, // normalized
Tensor(ET, {2, 6, 4}, std::vector<T>{
reference_tests::Tensor(ET, {2, 6, 4}, std::vector<T>{
0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9,
0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0,
0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9,
0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes
Tensor(ET_TH, {2, 2, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {2, 2, 6}, std::vector<T_TH>{
0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3,
0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3}), // scores
Tensor(ET_TH, {8, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {8, 6}, std::vector<T_TH>{
0.00, 0.95, 0.00, 10.00, 1.00, 11.00, 1.00, 0.95, 0.00, 0.00, 1.00, 1.00,
0.00, 0.90, 0.00, 0.00, 1.00, 1.00, 1.00, 0.80, 0.00, 10.00, 1.00, 11.00,
0.00, 0.95, 0.00, 10.00, 1.00, 11.00, 1.00, 0.95, 0.00, 0.00, 1.00, 1.00,
0.00, 0.90, 0.00, 0.00, 1.00, 1.00, 1.00, 0.80, 0.00, 10.00, 1.00, 11.00}),
// expected_selected_scores
Tensor(ET_IND, {8, 1}, std::vector<T_IND>{3, 0, 0, 3, 9, 6, 6, 9}), // expected_selected_indices
Tensor(ET_IND, {2}, std::vector<T_IND>{4, 4}), // expected_valid_outputs
reference_tests::Tensor(ET_IND, {8, 1}, std::vector<T_IND>{3, 0, 0, 3, 9, 6, 6, 9}), // expected_selected_indices
reference_tests::Tensor(ET_IND, {2}, std::vector<T_IND>{4, 4}), // expected_valid_outputs
"multiclass_nms_two_batches_two_classes_by_score"),
MulticlassNmsParams(
3, // nms_top_k
@ -231,22 +231,22 @@ std::vector<MulticlassNmsParams> generateParams() {
ET_IND, // output_type
false, // sort_result_across_batch
true, // normalized
Tensor(ET, {2, 6, 4}, std::vector<T>{
reference_tests::Tensor(ET, {2, 6, 4}, std::vector<T>{
0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9,
0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0,
0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9,
0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes
Tensor(ET_TH, {2, 2, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {2, 2, 6}, std::vector<T_TH>{
0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3,
0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3}), // scores
Tensor(ET_TH, {8, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {8, 6}, std::vector<T_TH>{
0.00, 0.95, 0.00, 10.00, 1.00, 11.00, 0.00, 0.90, 0.00, 0.00, 1.00, 1.00,
1.00, 0.95, 0.00, 0.00, 1.00, 1.00, 1.00, 0.80, 0.00, 10.00, 1.00, 11.00,
0.00, 0.95, 0.00, 10.00, 1.00, 11.00, 0.00, 0.90, 0.00, 0.00, 1.00, 1.00,
1.00, 0.95, 0.00, 0.00, 1.00, 1.00, 1.00, 0.80, 0.00, 10.00, 1.00, 11.00}),
// expected_selected_scores
Tensor(ET_IND, {8, 1}, std::vector<T_IND>{3, 0, 0, 3, 9, 6, 6, 9}), // expected_selected_indices
Tensor(ET_IND, {2}, std::vector<T_IND>{4, 4}), // expected_valid_outputs
reference_tests::Tensor(ET_IND, {8, 1}, std::vector<T_IND>{3, 0, 0, 3, 9, 6, 6, 9}), // expected_selected_indices
reference_tests::Tensor(ET_IND, {2}, std::vector<T_IND>{4, 4}), // expected_valid_outputs
"multiclass_nms_two_batches_two_classes_by_class_id"),
MulticlassNmsParams(
3, // nms_top_k
@ -259,15 +259,15 @@ std::vector<MulticlassNmsParams> generateParams() {
ET_IND, // output_type
true, // sort_result_across_batch
true, // normalized
Tensor(ET, {2, 6, 4}, std::vector<T>{
reference_tests::Tensor(ET, {2, 6, 4}, std::vector<T>{
0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9,
0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0,
0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9,
0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes
Tensor(ET_TH, {2, 2, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {2, 2, 6}, std::vector<T_TH>{
0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3,
0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3}), // scores
Tensor(ET_TH, {8, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {8, 6}, std::vector<T_TH>{
0.00, 0.95, 0.00, 10.00, 1.00, 11.00,
1.00, 0.95, 0.00, 0.00, 1.00, 1.00,
0.00, 0.95, 0.00, 10.00, 1.00, 11.00,
@ -276,8 +276,8 @@ std::vector<MulticlassNmsParams> generateParams() {
0.00, 0.90, 0.00, 0.00, 1.00, 1.00,
1.00, 0.80, 0.00, 10.00, 1.00, 11.00,
1.00, 0.80, 0.00, 10.00, 1.00, 11.00}), // expected_selected_scores
Tensor(ET_IND, {8, 1}, std::vector<T_IND>{3, 0, 9, 6, 0, 6, 3, 9}), // expected_selected_indices
Tensor(ET_IND, {2}, std::vector<T_IND>{4, 4}), // expected_valid_outputs
reference_tests::Tensor(ET_IND, {8, 1}, std::vector<T_IND>{3, 0, 9, 6, 0, 6, 3, 9}), // expected_selected_indices
reference_tests::Tensor(ET_IND, {2}, std::vector<T_IND>{4, 4}), // expected_valid_outputs
"multiclass_nms_two_batches_two_classes_by_score_cross_batch"),
MulticlassNmsParams(
3, // nms_top_k
@ -290,15 +290,15 @@ std::vector<MulticlassNmsParams> generateParams() {
ET_IND, // output_type
true, // sort_result_across_batch
true, // normalized
Tensor(ET, {2, 6, 4}, std::vector<T>{
reference_tests::Tensor(ET, {2, 6, 4}, std::vector<T>{
0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9,
0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0,
0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9,
0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes
Tensor(ET_TH, {2, 2, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {2, 2, 6}, std::vector<T_TH>{
0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3,
0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3}), // scores
Tensor(ET_TH, {8, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {8, 6}, std::vector<T_TH>{
0.00, 0.95, 0.00, 10.00, 1.00, 11.00,
0.00, 0.90, 0.00, 0.00, 1.00, 1.00,
0.00, 0.95, 0.00, 10.00, 1.00, 11.00,
@ -307,8 +307,8 @@ std::vector<MulticlassNmsParams> generateParams() {
1.00, 0.80, 0.00, 10.00, 1.00, 11.00,
1.00, 0.95, 0.00, 0.00, 1.00, 1.00,
1.00, 0.80, 0.00, 10.00, 1.00, 11.00}), // expected_selected_scores
Tensor(ET_IND, {8, 1}, std::vector<T_IND>{3, 0, 9, 6, 0, 3, 6, 9}), // expected_selected_indices
Tensor(ET_IND, {2}, std::vector<T_IND>{4, 4}), // expected_valid_outputs
reference_tests::Tensor(ET_IND, {8, 1}, std::vector<T_IND>{3, 0, 9, 6, 0, 3, 6, 9}), // expected_selected_indices
reference_tests::Tensor(ET_IND, {2}, std::vector<T_IND>{4, 4}), // expected_valid_outputs
"multiclass_nms_two_batches_two_classes_by_class_id_cross_batch"),
MulticlassNmsParams(
3, // nms_top_k
@ -321,16 +321,16 @@ std::vector<MulticlassNmsParams> generateParams() {
ET_IND, // output_type
false, // sort_result_across_batch
true, // normalized
Tensor(ET, {1, 6, 4}, std::vector<T>{
reference_tests::Tensor(ET, {1, 6, 4}, std::vector<T>{
1.0, 1.0, 0.0, 0.0, 0.0, 0.1, 1.0, 1.1, 0.0, 0.9, 1.0, -0.1,
0.0, 10.0, 1.0, 11.0, 1.0, 10.1, 0.0, 11.1, 1.0, 101.0, 0.0, 100.0}), // boxes
Tensor(ET_TH, {1, 1, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {1, 1, 6}, std::vector<T_TH>{
0.9, 0.75, 0.6, 0.95, 0.5, 0.3}), // scores
Tensor(ET_TH, {3, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {3, 6}, std::vector<T_TH>{
0.00, 0.95, 0.00, 10.00, 1.00, 11.00, 0.00, 0.90, 1.00, 1.00, 0.00, 0.00, 0.00, 0.75, 0.00, 0.10, 1.00, 1.10}),
// expected_selected_scores
Tensor(ET_IND, {3, 1}, std::vector<T_IND>{3, 0, 1}), // expected_selected_indices
Tensor(ET_IND, {1}, std::vector<T_IND>{3}), // expected_valid_outputs
reference_tests::Tensor(ET_IND, {3, 1}, std::vector<T_IND>{3, 0, 1}), // expected_selected_indices
reference_tests::Tensor(ET_IND, {1}, std::vector<T_IND>{3}), // expected_valid_outputs
"multiclass_nms_flipped_coordinates"),
MulticlassNmsParams(
3, // nms_top_k
@ -343,17 +343,17 @@ std::vector<MulticlassNmsParams> generateParams() {
ET_IND, // output_type
false, // sort_result_across_batch
true, // normalized
Tensor(ET, {1, 10, 4}, std::vector<T>{
reference_tests::Tensor(ET, {1, 10, 4}, std::vector<T>{
0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0,
1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0,
0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0}), // boxes
Tensor(ET_TH, {1, 1, 10}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {1, 1, 10}, std::vector<T_TH>{
0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9}), // scores
Tensor(ET_TH, {1, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {1, 6}, std::vector<T_TH>{
0.00, 0.90, 0.00, 0.00, 1.00, 1.00}),
// expected_selected_scores
Tensor(ET_IND, {1, 1}, std::vector<T_IND>{0}), // expected_selected_indices
Tensor(ET_IND, {1}, std::vector<T_IND>{1}), // expected_valid_outputs
reference_tests::Tensor(ET_IND, {1, 1}, std::vector<T_IND>{0}), // expected_selected_indices
reference_tests::Tensor(ET_IND, {1}, std::vector<T_IND>{1}), // expected_valid_outputs
"multiclass_nms_identical_boxes"),
MulticlassNmsParams(
2, // nms_top_k
@ -366,16 +366,16 @@ std::vector<MulticlassNmsParams> generateParams() {
ET_IND, // output_type
false, // sort_result_across_batch
true, // normalized
Tensor(ET, {1, 6, 4}, std::vector<T>{
reference_tests::Tensor(ET, {1, 6, 4}, std::vector<T>{
0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9,
0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes
Tensor(ET_TH, {1, 1, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {1, 1, 6}, std::vector<T_TH>{
0.9, 0.75, 0.6, 0.95, 0.5, 0.3}), // scores
Tensor(ET_TH, {2, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {2, 6}, std::vector<T_TH>{
0.00, 0.95, 0.00, 10.00, 1.00, 11.00, 0.00, 0.90, 0.00, 0.00, 1.00, 1.00}),
// expected_selected_scores
Tensor(ET_IND, {2, 1}, std::vector<T_IND>{3, 0}), // expected_selected_indices
Tensor(ET_IND, {1}, std::vector<T_IND>{2}), // expected_valid_outputs
reference_tests::Tensor(ET_IND, {2, 1}, std::vector<T_IND>{3, 0}), // expected_selected_indices
reference_tests::Tensor(ET_IND, {1}, std::vector<T_IND>{2}), // expected_valid_outputs
"multiclass_nms_limit_output_size"),
MulticlassNmsParams(
3, // nms_top_k
@ -388,12 +388,12 @@ std::vector<MulticlassNmsParams> generateParams() {
ET_IND, // output_type
false, // sort_result_across_batch
true, // normalized
Tensor(ET, {1, 1, 4}, std::vector<T>{0.0, 0.0, 1.0, 1.0}), // boxes
Tensor(ET_TH, {1, 1, 1}, std::vector<T_TH>{0.9}), // scores
Tensor(ET_TH, {1, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET, {1, 1, 4}, std::vector<T>{0.0, 0.0, 1.0, 1.0}), // boxes
reference_tests::Tensor(ET_TH, {1, 1, 1}, std::vector<T_TH>{0.9}), // scores
reference_tests::Tensor(ET_TH, {1, 6}, std::vector<T_TH>{
0.00, 0.90, 0.00, 0.00, 1.00, 1.00}), // expected_selected_scores
Tensor(ET_IND, {1, 1}, std::vector<T_IND>{0}), // expected_selected_indices
Tensor(ET_IND, {1}, std::vector<T_IND>{1}), // expected_valid_outputs
reference_tests::Tensor(ET_IND, {1, 1}, std::vector<T_IND>{0}), // expected_selected_indices
reference_tests::Tensor(ET_IND, {1}, std::vector<T_IND>{1}), // expected_valid_outputs
"multiclass_nms_single_box"),
MulticlassNmsParams(
3, // nms_top_k
@ -406,16 +406,16 @@ std::vector<MulticlassNmsParams> generateParams() {
ET_IND, // output_type
false, // sort_result_across_batch
true, // normalized
Tensor(ET, {1, 6, 4}, std::vector<T>{
reference_tests::Tensor(ET, {1, 6, 4}, std::vector<T>{
0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9,
0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes
Tensor(ET_TH, {1, 1, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {1, 1, 6}, std::vector<T_TH>{
0.9, 0.75, 0.6, 0.95, 0.5, 0.3}), // scores
Tensor(ET_TH, {2, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {2, 6}, std::vector<T_TH>{
0.00, 0.95, 0.00, 10.00, 1.00, 11.00, 0.00, 0.90, 0.00, 0.00, 1.00, 1.00}),
// expected_selected_scores
Tensor(ET_IND, {2, 1}, std::vector<T_IND>{3, 0}), // expected_selected_indices
Tensor(ET_IND, {1}, std::vector<T_IND>{2}), // expected_valid_outputs
reference_tests::Tensor(ET_IND, {2, 1}, std::vector<T_IND>{3, 0}), // expected_selected_indices
reference_tests::Tensor(ET_IND, {1}, std::vector<T_IND>{2}), // expected_valid_outputs
"multiclass_nms_by_IOU"),
MulticlassNmsParams(
3, // nms_top_k
@ -428,15 +428,15 @@ std::vector<MulticlassNmsParams> generateParams() {
ET_IND, // output_type
false, // sort_result_across_batch
true, // normalized
Tensor(ET, {1, 6, 4}, std::vector<T>{
reference_tests::Tensor(ET, {1, 6, 4}, std::vector<T>{
0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9,
0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes
Tensor(ET_TH, {1, 1, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {1, 1, 6}, std::vector<T_TH>{
0.9, 0.75, 0.6, 0.96, 0.5, 0.3}), // scores
Tensor(ET_TH, {1, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {1, 6}, std::vector<T_TH>{
0.00, 0.96, 0.00, 10.00, 1.00, 11.00}), // expected_selected_scores
Tensor(ET_IND, {1, 1}, std::vector<T_IND>{3}), // expected_selected_indices
Tensor(ET_IND, {1}, std::vector<T_IND>{1}), // expected_valid_outputs
reference_tests::Tensor(ET_IND, {1, 1}, std::vector<T_IND>{3}), // expected_selected_indices
reference_tests::Tensor(ET_IND, {1}, std::vector<T_IND>{1}), // expected_valid_outputs
"multiclass_nms_by_IOU_and_scores"),
MulticlassNmsParams(
3, // nms_top_k
@ -449,14 +449,14 @@ std::vector<MulticlassNmsParams> generateParams() {
ET_IND, // output_type
false, // sort_result_across_batch
true, // normalized
Tensor(ET, {1, 6, 4}, std::vector<T>{
reference_tests::Tensor(ET, {1, 6, 4}, std::vector<T>{
0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9,
0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes
Tensor(ET_TH, {1, 1, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {1, 1, 6}, std::vector<T_TH>{
0.9, 0.75, 0.6, 0.95, 0.5, 0.3}), // scores
Tensor(ET_TH, {0, 6}, std::vector<T_TH>{}), // expected_selected_scores
Tensor(ET_IND, {0, 1}, std::vector<T_IND>{}), // expected_selected_indices
Tensor(ET_IND, {1}, std::vector<T_IND>{0}), // expected_valid_outputs
reference_tests::Tensor(ET_TH, {0, 6}, std::vector<T_TH>{}), // expected_selected_scores
reference_tests::Tensor(ET_IND, {0, 1}, std::vector<T_IND>{}), // expected_selected_indices
reference_tests::Tensor(ET_IND, {1}, std::vector<T_IND>{0}), // expected_valid_outputs
"multiclass_nms_no_output"),
MulticlassNmsParams(
3, // nms_top_k
@ -469,20 +469,20 @@ std::vector<MulticlassNmsParams> generateParams() {
ET_IND, // output_type
false, // sort_result_across_batch
true, // normalized
Tensor(ET, {2, 6, 4}, std::vector<T>{
reference_tests::Tensor(ET, {2, 6, 4}, std::vector<T>{
0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9,
0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0,
0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9,
0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes
Tensor(ET_TH, {2, 2, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {2, 2, 6}, std::vector<T_TH>{
0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3,
0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3}), // scores
Tensor(ET_TH, {4, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {4, 6}, std::vector<T_TH>{
1.00, 0.95, 0.00, 0.00, 1.00, 1.00, 1.00, 0.80, 0.00, 10.00, 1.00, 11.00,
1.00, 0.95, 0.00, 0.00, 1.00, 1.00, 1.00, 0.80, 0.00, 10.00, 1.00, 11.00}),
// expected_selected_scores
Tensor(ET_IND, {4, 1}, std::vector<T_IND>{0, 3, 6, 9}), // expected_selected_indices
Tensor(ET_IND, {2}, std::vector<T_IND>{2, 2}), // expected_valid_outputs
reference_tests::Tensor(ET_IND, {4, 1}, std::vector<T_IND>{0, 3, 6, 9}), // expected_selected_indices
reference_tests::Tensor(ET_IND, {2}, std::vector<T_IND>{2, 2}), // expected_valid_outputs
"multiclass_nms_by_background"),
MulticlassNmsParams(
3, // nms_top_k
@ -495,21 +495,21 @@ std::vector<MulticlassNmsParams> generateParams() {
ET_IND, // output_type
false, // sort_result_across_batch
true, // normalized
Tensor(ET, {2, 6, 4}, std::vector<T>{
reference_tests::Tensor(ET, {2, 6, 4}, std::vector<T>{
0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9,
0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0,
0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9,
0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes
Tensor(ET_TH, {2, 2, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {2, 2, 6}, std::vector<T_TH>{
0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3,
0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3}), // scores
Tensor(ET_TH, {6, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {6, 6}, std::vector<T_TH>{
0.00, 0.95, 0.00, 10.00, 1.00, 11.00, 0.00, 0.90, 0.00,
0.00, 1.00, 1.00, 1.00, 0.95, 0.00, 0.00, 1.00, 1.00,
0.00, 0.95, 0.00, 10.00, 1.00, 11.00, 0.00, 0.90, 0.00,
0.00, 1.00, 1.00, 1.00, 0.95, 0.00, 0.00, 1.00, 1.00}), // expected_selected_scores
Tensor(ET_IND, {6, 1}, std::vector<T_IND>{3, 0, 0, 9, 6, 6}), // expected_selected_indices
Tensor(ET_IND, {2}, std::vector<T_IND>{3, 3}), // expected_valid_outputs
reference_tests::Tensor(ET_IND, {6, 1}, std::vector<T_IND>{3, 0, 0, 9, 6, 6}), // expected_selected_indices
reference_tests::Tensor(ET_IND, {2}, std::vector<T_IND>{3, 3}), // expected_valid_outputs
"multiclass_nms_by_keep_top_k"),
MulticlassNmsParams(
-1, // nms_top_k
@ -522,24 +522,24 @@ std::vector<MulticlassNmsParams> generateParams() {
ET_IND, // output_type
false, // sort_result_across_batch
true, // normalized
Tensor(ET, {2, 6, 4}, std::vector<T>{
reference_tests::Tensor(ET, {2, 6, 4}, std::vector<T>{
0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9,
0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0,
0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9,
0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes
Tensor(ET_TH, {2, 2, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {2, 2, 6}, std::vector<T_TH>{
0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3,
0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3}), // scores
Tensor(ET_TH, {12, 6}, std::vector<T_TH>{
reference_tests::Tensor(ET_TH, {12, 6}, std::vector<T_TH>{
0.00, 0.95, 0.00, 10.00, 1.00, 11.00, 0.00, 0.90, 0.00, 0.00, 1.00, 1.00, 0.00, 0.30, 0.00,
100.00, 1.00, 101.00, 1.00, 0.95, 0.00, 0.00, 1.00, 1.00, 1.00, 0.80, 0.00, 10.00, 1.00, 11.00,
1.00, 0.30, 0.00, 100.00, 1.00, 101.00, 0.00, 0.95, 0.00, 10.00, 1.00, 11.00, 0.00, 0.90, 0.00,
0.00, 1.00, 1.00, 0.00, 0.30, 0.00, 100.00, 1.00, 101.00, 1.00, 0.95, 0.00, 0.00, 1.00, 1.00,
1.00, 0.80, 0.00, 10.00, 1.00, 11.00, 1.00, 0.30, 0.00, 100.00, 1.00, 101.00}),
// expected_selected_scores
Tensor(ET_IND, {12, 1}, std::vector<T_IND>{
reference_tests::Tensor(ET_IND, {12, 1}, std::vector<T_IND>{
3, 0, 5, 0, 3, 5, 9, 6, 11, 6, 9, 11}), // expected_selected_indices
Tensor(ET_IND, {2}, std::vector<T_IND>{6, 6}), // expected_valid_outputs
reference_tests::Tensor(ET_IND, {2}, std::vector<T_IND>{6, 6}), // expected_valid_outputs
"multiclass_nms_by_nms_eta"),
};
return params;

View File

@ -31,9 +31,9 @@ struct MultiplyParams {
PartialShape pshape2;
element::Type inType;
element::Type outType;
runtime::Tensor inputData1;
runtime::Tensor inputData2;
runtime::Tensor refData;
ov::Tensor inputData1;
ov::Tensor inputData2;
ov::Tensor refData;
};
class ReferenceMultiplyLayerTest : public testing::TestWithParam<MultiplyParams>, public CommonReferenceTest {

View File

@ -14,20 +14,20 @@ using namespace reference_tests;
// ------------------------------ V0 ------------------------------
struct MVN1Params {
MVN1Params(const Tensor& paramInput, const ngraph::AxisSet& paramReductionAxes, const bool paramAcrossChannels, const bool paramNormalizeVariance,
const double paramEps, const Tensor& paramExpected)
MVN1Params(const reference_tests::Tensor& paramInput, const ngraph::AxisSet& paramReductionAxes, const bool paramAcrossChannels, const bool paramNormalizeVariance,
const double paramEps, const reference_tests::Tensor& paramExpected)
: input(paramInput),
reductionAxes(paramReductionAxes),
acrossChannels(paramAcrossChannels),
normalizeVariance(paramNormalizeVariance),
eps(paramEps),
expected(paramExpected) {}
Tensor input;
reference_tests::Tensor input;
ngraph::AxisSet reductionAxes;
bool acrossChannels;
bool normalizeVariance;
double eps;
Tensor expected;
reference_tests::Tensor expected;
};
class ReferenceMVN1LayerTest : public testing::TestWithParam<MVN1Params>, public CommonReferenceTest {
@ -54,7 +54,7 @@ public:
}
private:
static std::shared_ptr<Model> CreateFunction(const Tensor& input, const ngraph::AxisSet& reductionAxes, const bool acrossChannels,
static std::shared_ptr<Model> CreateFunction(const reference_tests::Tensor& input, const ngraph::AxisSet& reductionAxes, const bool acrossChannels,
const bool normalizeVariance, const double eps) {
const auto in = std::make_shared<op::v0::Parameter>(input.type, input.shape);
auto mvn = std::make_shared<op::v0::MVN>(in, acrossChannels, normalizeVariance, eps);
@ -75,62 +75,62 @@ INSTANTIATE_TEST_SUITE_P(
smoke_MVN1_With_Hardcoded_Refs, ReferenceMVN1LayerTest,
::testing::Values(
// across_channels=false, variance=false
MVN1Params(Tensor {{1, 3, 3, 3}, ov::element::f32, std::vector<float> {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5,
MVN1Params(reference_tests::Tensor {{1, 3, 3, 3}, ov::element::f32, std::vector<float> {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5,
6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9}},
emptyReductionAxes,
false,
false,
1e-9,
Tensor {{1, 3, 3, 3}, ov::element::f32, std::vector<float> {-4, -3, -2, -1, 0, 1, 2, 3, 4, -4, -3, -2, -1, 0,
reference_tests::Tensor {{1, 3, 3, 3}, ov::element::f32, std::vector<float> {-4, -3, -2, -1, 0, 1, 2, 3, 4, -4, -3, -2, -1, 0,
1, 2, 3, 4, -4, -3, -2, -1, 0, 1, 2, 3, 4}}),
// across_channels=true, variance=false
MVN1Params(
Tensor {{1, 3, 2, 2}, ov::element::f32, std::vector<float> {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3}},
reference_tests::Tensor {{1, 3, 2, 2}, ov::element::f32, std::vector<float> {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3}},
emptyReductionAxes,
true,
false,
1e-9,
Tensor {{1, 3, 2, 2}, ov::element::f32, std::vector<float> {-3.25, -2.25, -1.25, -0.25, 0.75, 1.75, 2.75, 3.75, 4.75, -3.25, -2.25, -1.25}}),
reference_tests::Tensor {{1, 3, 2, 2}, ov::element::f32, std::vector<float> {-3.25, -2.25, -1.25, -0.25, 0.75, 1.75, 2.75, 3.75, 4.75, -3.25, -2.25, -1.25}}),
// across_channels=false, variance=true
MVN1Params(Tensor {{1, 3, 3, 3}, ov::element::f32, std::vector<float> {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5,
MVN1Params(reference_tests::Tensor {{1, 3, 3, 3}, ov::element::f32, std::vector<float> {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5,
6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9}},
emptyReductionAxes,
false,
true,
1e-9,
Tensor {{1, 3, 3, 3},
reference_tests::Tensor {{1, 3, 3, 3},
ov::element::f32,
std::vector<float> {-1.5491934, -1.161895, -0.7745967, -0.38729835, 0., 0.38729835, 0.7745967, 1.161895, 1.5491934,
-1.5491934, -1.161895, -0.7745967, -0.38729835, 0., 0.38729835, 0.7745967, 1.161895, 1.5491934,
-1.5491934, -1.161895, -0.7745967, -0.38729835, 0., 0.38729835, 0.7745967, 1.161895, 1.5491934}}),
// across_channels=true, variance=true
MVN1Params(Tensor {{1, 3, 3, 3}, ov::element::f32, std::vector<float> {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5,
MVN1Params(reference_tests::Tensor {{1, 3, 3, 3}, ov::element::f32, std::vector<float> {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5,
6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9}},
emptyReductionAxes,
true,
true,
1e-9,
Tensor {{1, 3, 3, 3},
reference_tests::Tensor {{1, 3, 3, 3},
ov::element::f32,
std::vector<float> {-1.5491934, -1.161895, -0.7745967, -0.38729835, 0., 0.38729835, 0.7745967, 1.161895, 1.5491934,
-1.5491934, -1.161895, -0.7745967, -0.38729835, 0., 0.38729835, 0.7745967, 1.161895, 1.5491934,
-1.5491934, -1.161895, -0.7745967, -0.38729835, 0., 0.38729835, 0.7745967, 1.161895, 1.5491934}}),
// reductionAxes, variance=false
MVN1Params(
Tensor {{1, 3, 2, 2}, ov::element::f32, std::vector<float> {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3}},
reference_tests::Tensor {{1, 3, 2, 2}, ov::element::f32, std::vector<float> {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3}},
{1, 2, 3},
false,
false,
1e-9,
Tensor {{1, 3, 2, 2}, ov::element::f32, std::vector<float> {-3.25, -2.25, -1.25, -0.25, 0.75, 1.75, 2.75, 3.75, 4.75, -3.25, -2.25, -1.25}}),
reference_tests::Tensor {{1, 3, 2, 2}, ov::element::f32, std::vector<float> {-3.25, -2.25, -1.25, -0.25, 0.75, 1.75, 2.75, 3.75, 4.75, -3.25, -2.25, -1.25}}),
// reductionAxes, variance=true
MVN1Params(Tensor {{1, 3, 3, 3}, ov::element::f32, std::vector<float> {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5,
MVN1Params(reference_tests::Tensor {{1, 3, 3, 3}, ov::element::f32, std::vector<float> {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5,
6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9}},
{2, 3},
false,
true,
1e-9,
Tensor {{1, 3, 3, 3},
reference_tests::Tensor {{1, 3, 3, 3},
ov::element::f32,
std::vector<float> {-1.5491934, -1.161895, -0.7745967, -0.38729835, 0., 0.38729835, 0.7745967, 1.161895, 1.5491934,
-1.5491934, -1.161895, -0.7745967, -0.38729835, 0., 0.38729835, 0.7745967, 1.161895, 1.5491934,
@ -140,20 +140,20 @@ INSTANTIATE_TEST_SUITE_P(
// ------------------------------ V6 ------------------------------
struct MVN6Params {
MVN6Params(const Tensor& paramInput, const Tensor& paramReductionAxes, const bool paramNormalizeVariance, const double paramEps,
const op::MVNEpsMode mode, const Tensor& paramExpected)
MVN6Params(const reference_tests::Tensor& paramInput, const reference_tests::Tensor& paramReductionAxes, const bool paramNormalizeVariance, const double paramEps,
const op::MVNEpsMode mode, const reference_tests::Tensor& paramExpected)
: input(paramInput),
reductionAxes(paramReductionAxes),
normalizeVariance(paramNormalizeVariance),
eps(paramEps),
epsMode(mode),
expected(paramExpected) {}
Tensor input;
Tensor reductionAxes;
reference_tests::Tensor input;
reference_tests::Tensor reductionAxes;
bool normalizeVariance;
double eps;
op::MVNEpsMode epsMode;
Tensor expected;
reference_tests::Tensor expected;
};
class ReferenceMVN6LayerTest : public testing::TestWithParam<MVN6Params>, public CommonReferenceTest {
@ -177,7 +177,7 @@ public:
}
private:
static std::shared_ptr<Model> CreateFunction(const Tensor& input, const Tensor& reductionAxes, const bool normalizeVariance, const double eps,
static std::shared_ptr<Model> CreateFunction(const reference_tests::Tensor& input, const reference_tests::Tensor& reductionAxes, const bool normalizeVariance, const double eps,
const op::MVNEpsMode epsMode) {
std::vector<int64_t> dataVector(reductionAxes.shape[0]);
const auto in = std::make_shared<op::v0::Parameter>(input.type, input.shape);
@ -199,46 +199,46 @@ INSTANTIATE_TEST_SUITE_P(
smoke_MVN6_With_Hardcoded_Refs, ReferenceMVN6LayerTest,
::testing::Values(
// variance=false, OUTSIDE_SQRT
MVN6Params(Tensor {{1, 3, 3, 3}, ov::element::f32, std::vector<float> {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5,
MVN6Params(reference_tests::Tensor {{1, 3, 3, 3}, ov::element::f32, std::vector<float> {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5,
6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9}},
Tensor {Shape {2}, ov::element::i64, std::vector<int64_t> {2, 3}},
reference_tests::Tensor {Shape {2}, ov::element::i64, std::vector<int64_t> {2, 3}},
false,
1e-9,
op::MVNEpsMode::OUTSIDE_SQRT,
Tensor {{1, 3, 3, 3}, ov::element::f32, std::vector<float> {-4, -3, -2, -1, 0, 1, 2, 3, 4, -4, -3, -2, -1, 0,
reference_tests::Tensor {{1, 3, 3, 3}, ov::element::f32, std::vector<float> {-4, -3, -2, -1, 0, 1, 2, 3, 4, -4, -3, -2, -1, 0,
1, 2, 3, 4, -4, -3, -2, -1, 0, 1, 2, 3, 4}}),
// variance=true, OUTSIDE_SQRT
MVN6Params(Tensor {{1, 3, 3, 3}, ov::element::f32, std::vector<float> {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5,
MVN6Params(reference_tests::Tensor {{1, 3, 3, 3}, ov::element::f32, std::vector<float> {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5,
6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9}},
Tensor {Shape {2}, ov::element::i64, std::vector<int64_t> {2, 3}},
reference_tests::Tensor {Shape {2}, ov::element::i64, std::vector<int64_t> {2, 3}},
true,
1e-9,
op::MVNEpsMode::OUTSIDE_SQRT,
Tensor {{1, 3, 3, 3},
reference_tests::Tensor {{1, 3, 3, 3},
ov::element::f32,
std::vector<float> {-1.5491934, -1.161895, -0.7745967, -0.38729835, 0., 0.38729835, 0.7745967, 1.161895, 1.5491934,
-1.5491934, -1.161895, -0.7745967, -0.38729835, 0., 0.38729835, 0.7745967, 1.161895, 1.5491934,
-1.5491934, -1.161895, -0.7745967, -0.38729835, 0., 0.38729835, 0.7745967, 1.161895, 1.5491934}}),
// variance=true, INSIDE_SQRT
MVN6Params(Tensor {{1, 3, 3, 3}, ov::element::f32, std::vector<float> {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5,
MVN6Params(reference_tests::Tensor {{1, 3, 3, 3}, ov::element::f32, std::vector<float> {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5,
6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9}},
Tensor {Shape {2}, ov::element::i64, std::vector<int64_t> {2, 3}},
reference_tests::Tensor {Shape {2}, ov::element::i64, std::vector<int64_t> {2, 3}},
true,
1e-9,
op::MVNEpsMode::INSIDE_SQRT,
Tensor {{1, 3, 3, 3},
reference_tests::Tensor {{1, 3, 3, 3},
ov::element::f32,
std::vector<float> {-1.5491934, -1.161895, -0.7745967, -0.38729835, 0., 0.38729835, 0.7745967, 1.161895, 1.5491934,
-1.5491934, -1.161895, -0.7745967, -0.38729835, 0., 0.38729835, 0.7745967, 1.161895, 1.5491934,
-1.5491934, -1.161895, -0.7745967, -0.38729835, 0., 0.38729835, 0.7745967, 1.161895, 1.5491934}}),
// variance=true, another reductionAxes, OUTSIDE_SQRT
MVN6Params(Tensor {{1, 3, 3, 3}, ov::element::f32, std::vector<float>({1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5,
MVN6Params(reference_tests::Tensor {{1, 3, 3, 3}, ov::element::f32, std::vector<float>({1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5,
6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9})},
Tensor {Shape {3}, ov::element::i64, std::vector<int64_t>({1, 2, 3})},
reference_tests::Tensor {Shape {3}, ov::element::i64, std::vector<int64_t>({1, 2, 3})},
true,
1e-9,
op::MVNEpsMode::OUTSIDE_SQRT,
Tensor {{1, 3, 3, 3},
reference_tests::Tensor {{1, 3, 3, 3},
ov::element::f32,
std::vector<float> {-1.5491934, -1.161895, -0.7745967, -0.38729835, 0., 0.38729835, 0.7745967, 1.161895, 1.5491934,
-1.5491934, -1.161895, -0.7745967, -0.38729835, 0., 0.38729835, 0.7745967, 1.161895, 1.5491934,

View File

@ -26,8 +26,8 @@ struct NegativeParams {
PartialShape pshape;
element::Type inType;
element::Type outType;
runtime::Tensor inputData;
runtime::Tensor refData;
ov::Tensor inputData;
ov::Tensor refData;
};
class ReferenceNegativeLayerTest : public testing::TestWithParam<NegativeParams>, public CommonReferenceTest {

View File

@ -30,8 +30,8 @@ struct NonZeroParams {
PartialShape inputShape;
element::Type inType;
element::Type refType;
runtime::Tensor inputData;
runtime::Tensor refData;
ov::Tensor inputData;
ov::Tensor refData;
std::string testcaseName;
};

View File

@ -66,8 +66,8 @@ struct NormalizeL2Params {
Shape m_expected_shape;
element::Type m_input_type;
element::Type m_expected_type;
runtime::Tensor m_input_value;
runtime::Tensor m_expected_value;
ov::Tensor m_input_value;
ov::Tensor m_expected_value;
std::vector<int32_t> m_axes;
op::EpsMode m_eps_mode;
float m_eps;

View File

@ -14,19 +14,19 @@ using namespace ov;
namespace {
struct OneHotParams {
OneHotParams(
const Tensor& dataTensor, const int32_t axis,
const Tensor& depthTensor, const Tensor& onValueTensor, const Tensor& offValueTensor,
const Tensor& expectedTensor, const std::string& testcaseName = "") :
const reference_tests::Tensor& dataTensor, const int32_t axis,
const reference_tests::Tensor& depthTensor, const reference_tests::Tensor& onValueTensor, const reference_tests::Tensor& offValueTensor,
const reference_tests::Tensor& expectedTensor, const std::string& testcaseName = "") :
dataTensor(dataTensor), axis(axis),
depthTensor(depthTensor), onValueTensor(onValueTensor), offValueTensor(offValueTensor),
expectedTensor(expectedTensor), testcaseName(testcaseName) {}
Tensor dataTensor;
reference_tests::Tensor dataTensor;
int32_t axis;
Tensor depthTensor;
Tensor onValueTensor;
Tensor offValueTensor;
Tensor expectedTensor;
reference_tests::Tensor depthTensor;
reference_tests::Tensor onValueTensor;
reference_tests::Tensor offValueTensor;
reference_tests::Tensor expectedTensor;
std::string testcaseName;
};
@ -97,75 +97,75 @@ std::vector<OneHotParams> generateParams() {
using T2 = typename element_type_traits<ET2>::value_type;
std::vector<OneHotParams> params {
OneHotParams(
Tensor(ET1, {}, std::vector<T1>{2}),
reference_tests::Tensor(ET1, {}, std::vector<T1>{2}),
0,
Tensor(ET1, {}, std::vector<T1>{3}),
Tensor(ET2, {}, std::vector<T2>{1}),
Tensor(ET2, {}, std::vector<T2>{0}),
Tensor(ET2, {3}, std::vector<T2>{0, 0, 1}),
reference_tests::Tensor(ET1, {}, std::vector<T1>{3}),
reference_tests::Tensor(ET2, {}, std::vector<T2>{1}),
reference_tests::Tensor(ET2, {}, std::vector<T2>{0}),
reference_tests::Tensor(ET2, {3}, std::vector<T2>{0, 0, 1}),
"one_hot_scalar_2_in_3"),
OneHotParams(
Tensor(ET1, {}, std::vector<T1>{1}),
reference_tests::Tensor(ET1, {}, std::vector<T1>{1}),
0,
Tensor(ET1, {}, std::vector<T1>{3}),
Tensor(ET2, {}, std::vector<T2>{1}),
Tensor(ET2, {}, std::vector<T2>{0}),
Tensor(ET2, {3}, std::vector<T2>{0, 1, 0}),
reference_tests::Tensor(ET1, {}, std::vector<T1>{3}),
reference_tests::Tensor(ET2, {}, std::vector<T2>{1}),
reference_tests::Tensor(ET2, {}, std::vector<T2>{0}),
reference_tests::Tensor(ET2, {3}, std::vector<T2>{0, 1, 0}),
"one_hot_scalar_1_in_3"),
OneHotParams(
Tensor(ET1, {}, std::vector<T1>{0}),
reference_tests::Tensor(ET1, {}, std::vector<T1>{0}),
0,
Tensor(ET1, {}, std::vector<T1>{3}),
Tensor(ET2, {}, std::vector<T2>{1}),
Tensor(ET2, {}, std::vector<T2>{0}),
Tensor(ET2, {3}, std::vector<T2>{1, 0, 0}),
reference_tests::Tensor(ET1, {}, std::vector<T1>{3}),
reference_tests::Tensor(ET2, {}, std::vector<T2>{1}),
reference_tests::Tensor(ET2, {}, std::vector<T2>{0}),
reference_tests::Tensor(ET2, {3}, std::vector<T2>{1, 0, 0}),
"one_hot_scalar_0_in_3"),
OneHotParams(
Tensor(ET1, {8}, std::vector<T1>{2, 1, 0, 0, 2, 2, 1, 0}),
reference_tests::Tensor(ET1, {8}, std::vector<T1>{2, 1, 0, 0, 2, 2, 1, 0}),
0,
Tensor(ET1, {}, std::vector<T1>{3}),
Tensor(ET2, {}, std::vector<T2>{1}),
Tensor(ET2, {}, std::vector<T2>{0}),
Tensor(ET2, {3, 8}, std::vector<T2>{0, 0, 1, 1, 0, 0, 0, 1,
reference_tests::Tensor(ET1, {}, std::vector<T1>{3}),
reference_tests::Tensor(ET2, {}, std::vector<T2>{1}),
reference_tests::Tensor(ET2, {}, std::vector<T2>{0}),
reference_tests::Tensor(ET2, {3, 8}, std::vector<T2>{0, 0, 1, 1, 0, 0, 0, 1,
0, 1, 0, 0, 0, 0, 1, 0,
1, 0, 0, 0, 1, 1, 0, 0}),
"one_hot_vector_0"),
OneHotParams(
Tensor(ET1, {8}, std::vector<T1>{2, 1, 0, 0, 2, 2, 1, 0}),
reference_tests::Tensor(ET1, {8}, std::vector<T1>{2, 1, 0, 0, 2, 2, 1, 0}),
1,
Tensor(ET1, {}, std::vector<T1>{3}),
Tensor(ET2, {}, std::vector<T2>{1}),
Tensor(ET2, {}, std::vector<T2>{0}),
Tensor(ET2, {8, 3}, std::vector<T2>{0, 0, 1, 0, 1, 0, 1, 0,
reference_tests::Tensor(ET1, {}, std::vector<T1>{3}),
reference_tests::Tensor(ET2, {}, std::vector<T2>{1}),
reference_tests::Tensor(ET2, {}, std::vector<T2>{0}),
reference_tests::Tensor(ET2, {8, 3}, std::vector<T2>{0, 0, 1, 0, 1, 0, 1, 0,
0, 1, 0, 0, 0, 0, 1, 0,
0, 1, 0, 1, 0, 1, 0, 0}),
"one_hot_vector_1"),
OneHotParams(
Tensor(ET1, {8}, std::vector<T1>{2, 1, 0, 0, 3, 2, 1, 0}),
reference_tests::Tensor(ET1, {8}, std::vector<T1>{2, 1, 0, 0, 3, 2, 1, 0}),
1,
Tensor(ET1, {}, std::vector<T1>{3}),
Tensor(ET2, {}, std::vector<T2>{1}),
Tensor(ET2, {}, std::vector<T2>{0}),
Tensor(ET2, {8, 3}, std::vector<T2>{0, 0, 1, 0, 1, 0, 1, 0,
reference_tests::Tensor(ET1, {}, std::vector<T1>{3}),
reference_tests::Tensor(ET2, {}, std::vector<T2>{1}),
reference_tests::Tensor(ET2, {}, std::vector<T2>{0}),
reference_tests::Tensor(ET2, {8, 3}, std::vector<T2>{0, 0, 1, 0, 1, 0, 1, 0,
0, 1, 0, 0, 0, 0, 0, 0,
0, 1, 0, 1, 0, 1, 0, 0}),
"one_hot_vector_1_barely_oob"),
OneHotParams(
Tensor(ET1, {3, 3}, std::vector<T1>{0, 1, 1, 2, 1, 0, 0, 2, 1}),
reference_tests::Tensor(ET1, {3, 3}, std::vector<T1>{0, 1, 1, 2, 1, 0, 0, 2, 1}),
0,
Tensor(ET1, {}, std::vector<T1>{3}),
Tensor(ET2, {}, std::vector<T2>{1}),
Tensor(ET2, {}, std::vector<T2>{0}),
Tensor(ET2, {3, 3, 3}, std::vector<T2>{1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1,
reference_tests::Tensor(ET1, {}, std::vector<T1>{3}),
reference_tests::Tensor(ET2, {}, std::vector<T2>{1}),
reference_tests::Tensor(ET2, {}, std::vector<T2>{0}),
reference_tests::Tensor(ET2, {3, 3, 3}, std::vector<T2>{1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1,
0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0}),
"one_hot_matrix_0"),
OneHotParams(
Tensor(ET1, {6}, std::vector<T1>{0, 11, 101, 1001, 10001, 19999}),
reference_tests::Tensor(ET1, {6}, std::vector<T1>{0, 11, 101, 1001, 10001, 19999}),
1,
Tensor(ET1, {}, std::vector<T1>{20000}),
Tensor(ET2, {}, std::vector<T2>{1}),
Tensor(ET2, {}, std::vector<T2>{0}),
Tensor(ET2, {6, 20000}, generateExpectedValues({6, 20000},
reference_tests::Tensor(ET1, {}, std::vector<T1>{20000}),
reference_tests::Tensor(ET2, {}, std::vector<T2>{1}),
reference_tests::Tensor(ET2, {}, std::vector<T2>{0}),
reference_tests::Tensor(ET2, {6, 20000}, generateExpectedValues({6, 20000},
std::vector<T2>{0, 11, 101, 1001, 10001, 19999},
20000)),
"one_hot_vector_many_categories"),
@ -179,12 +179,12 @@ std::vector<OneHotParams> generateParamsFloat() {
using T2 = typename element_type_traits<ET2>::value_type;
std::vector<OneHotParams> params {
OneHotParams(
Tensor(ET1, {3, 3}, std::vector<T1>{0, 1, 1, 2, 1, 0, 0, 2, 1}),
reference_tests::Tensor(ET1, {3, 3}, std::vector<T1>{0, 1, 1, 2, 1, 0, 0, 2, 1}),
0,
Tensor(ET1, {}, std::vector<T1>{3}),
Tensor(ET2, {}, std::vector<T2>{2.5}),
Tensor(ET2, {}, std::vector<T2>{0.5}),
Tensor(ET2, {3, 3, 3}, std::vector<T2>{
reference_tests::Tensor(ET1, {}, std::vector<T1>{3}),
reference_tests::Tensor(ET2, {}, std::vector<T2>{2.5}),
reference_tests::Tensor(ET2, {}, std::vector<T2>{0.5}),
reference_tests::Tensor(ET2, {3, 3, 3}, std::vector<T2>{
2.5, 0.5, 0.5, 0.5, 0.5, 2.5, 2.5, 0.5, 0.5, 0.5, 2.5, 2.5, 0.5, 2.5,
0.5, 0.5, 0.5, 2.5, 0.5, 0.5, 0.5, 2.5, 0.5, 0.5, 0.5, 2.5, 0.5}),
"one_hot_on_off_float"),

File diff suppressed because it is too large Load Diff

View File

@ -32,8 +32,8 @@ struct ParameterParams {
Shape m_expected_shape;
element::Type m_input_type;
element::Type m_expected_type;
runtime::Tensor m_input_value;
runtime::Tensor m_expected_value;
ov::Tensor m_input_value;
ov::Tensor m_expected_value;
};
class ReferenceParameterLayerTest : public testing::TestWithParam<ParameterParams>, public CommonReferenceTest {

View File

@ -31,9 +31,9 @@ struct PowerParams {
PartialShape pshape2;
element::Type inType;
element::Type outType;
runtime::Tensor inputData1;
runtime::Tensor inputData2;
runtime::Tensor refData;
ov::Tensor inputData1;
ov::Tensor inputData2;
ov::Tensor refData;
};
class ReferencePowerLayerTest : public testing::TestWithParam<PowerParams>, public CommonReferenceTest {

View File

@ -28,10 +28,10 @@ struct PreluParams {
ov::PartialShape pshape;
ov::element::Type inType;
ov::element::Type outType;
ov::runtime::Tensor inputData;
ov::runtime::Tensor refData;
ov::Tensor inputData;
ov::Tensor refData;
ov::Shape negativeSlopeShape;
ov::runtime::Tensor negativeSlope;
ov::Tensor negativeSlope;
std::string testcaseName;
};

View File

@ -43,9 +43,9 @@ struct PriorBoxParams {
ov::Shape imageShapeShape;
ov::element::Type inType;
ov::element::Type outType;
ov::runtime::Tensor layerShapeData;
ov::runtime::Tensor imageShapeData;
ov::runtime::Tensor refData;
ov::Tensor layerShapeData;
ov::Tensor imageShapeData;
ov::Tensor refData;
std::string testcaseName;
};
@ -83,9 +83,9 @@ struct PriorBoxV8Params {
ov::Shape imageShapeShape;
ov::element::Type inType;
ov::element::Type outType;
ov::runtime::Tensor layerShapeData;
ov::runtime::Tensor imageShapeData;
ov::runtime::Tensor refData;
ov::Tensor layerShapeData;
ov::Tensor imageShapeData;
ov::Tensor refData;
std::string testcaseName;
};

View File

@ -43,9 +43,9 @@ struct PriorBoxClusteredParams {
ov::Shape imageShapeShape;
ov::element::Type inType;
ov::element::Type outType;
ov::runtime::Tensor layerShapeData;
ov::runtime::Tensor imageShapeData;
ov::runtime::Tensor refData;
ov::Tensor layerShapeData;
ov::Tensor imageShapeData;
ov::Tensor refData;
std::string testcaseName;
};

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