Skip to content

Commit

Permalink
[CPU] [LPT] LPT tests extension
Browse files Browse the repository at this point in the history
  • Loading branch information
eshoguli authored and alvoron committed May 17, 2024
1 parent 4138d73 commit c547654
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,29 +25,29 @@ const std::vector<LayerTestsDefinitions::ReduceMinTransformationParam> params =
{ 256ul, ov::Shape{ 1, 1, 1, 1 }, { 0.f }, { 255.f }, { 0.f }, { 127.f } },
{ 2, 3 },
true,
"Output_original",
"u8"
{"Reduce"},
{"u8"}
},
{
{ 256ul, ov::Shape{ 1, 1, 1, 1 }, { 0.f }, { 255.f }, { 0.f }, { 127.f } },
{ 2, 3 },
false,
"Output_original",
"u8"
{"Reshape", "Reduce"},
{"u8", "u8"}
},
{
{ 256ul, ov::Shape{ 1, 1, 1, 1 }, { 0.f }, { 255.f }, { 0.f }, { 127.f } },
{ 1 },
true,
"Output_original",
"u8"
{"Reduce"},
{"u8"}
},
{
{ 256ul, ov::Shape{ 1, 1, 1, 1 }, { 0.f }, { 255.f }, { 0.f }, { 127.f } },
{ 1 },
false,
"Output_original",
"u8"
{"Reshape", "Reduce"},
{"u8", "u8"}
},
{
{
Expand All @@ -59,8 +59,8 @@ const std::vector<LayerTestsDefinitions::ReduceMinTransformationParam> params =
},
{ 2, 3 },
true,
"Output_original",
"u8"
{"Reduce"},
{"u8"}
},
{
{
Expand All @@ -72,8 +72,8 @@ const std::vector<LayerTestsDefinitions::ReduceMinTransformationParam> params =
},
{ 2, 3 },
false,
"Output_original",
"u8"
{"Reshape", "Reduce"},
{"u8", "u8"}
},
{
{
Expand All @@ -85,8 +85,8 @@ const std::vector<LayerTestsDefinitions::ReduceMinTransformationParam> params =
},
{ 0, 1 },
true,
"Output",
"f32"
{"Output"},
{"f32"}
},
{
{
Expand All @@ -98,8 +98,8 @@ const std::vector<LayerTestsDefinitions::ReduceMinTransformationParam> params =
},
{ 0, 1 },
false,
"Output",
"f32"
{"Output"},
{"f32"}
},
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ class ReduceMinTransformationParam {
ov::builder::subgraph::FakeQuantizeOnData fakeQuantize;
std::vector<int64_t> constantValues;
bool keepDims;
std::string layerName;
std::string expectedKernelType;
std::vector<std::string> layerTypes;
std::vector<std::string> expectedKernelTypes;
};

typedef std::tuple<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,12 @@ void ReduceMinTransformation::run() {
LayerTransformation::run();

const auto params = std::get<4>(GetParam());
const auto actualType = get_runtime_precision(params.layerName);
EXPECT_EQ(actualType, params.expectedKernelType);
assert(params.layerTypes.size() == params.expectedKernelTypes.size());

for (size_t i = 0; i < params.layerTypes.size(); ++i) {
const auto actualType = get_runtime_precision_by_type(params.layerTypes[i]);
EXPECT_EQ(actualType, params.expectedKernelTypes[i]) << params.layerTypes[i];
}
}

TEST_P(ReduceMinTransformation, CompareWithRefImpl) {
Expand Down

0 comments on commit c547654

Please sign in to comment.