From f12ab5c1824beb2bf992aaabf453796f7e0a8c0e Mon Sep 17 00:00:00 2001 From: Vladimir Zinoviev Date: Thu, 17 Mar 2022 16:00:45 +0300 Subject: [PATCH] [LPT] Tests on reshape with channel dim reducing (#10999) --- .../reshape_transformation.cpp | 52 ++++++++++++++++++- .../reshape_transformation.cpp | 52 ++++++++++++++++++- 2 files changed, 102 insertions(+), 2 deletions(-) diff --git a/src/tests/functional/plugin/cpu/shared_tests_instances/low_precision_transformations/reshape_transformation.cpp b/src/tests/functional/plugin/cpu/shared_tests_instances/low_precision_transformations/reshape_transformation.cpp index 35801c67fa5..04f43decb11 100644 --- a/src/tests/functional/plugin/cpu/shared_tests_instances/low_precision_transformations/reshape_transformation.cpp +++ b/src/tests/functional/plugin/cpu/shared_tests_instances/low_precision_transformations/reshape_transformation.cpp @@ -113,7 +113,57 @@ const std::vector params = { }, "Reshape", "U8" - } + }, + // Channels count reducing, per-channel dequantizations 4d -> 4d + { + { 1, 3, 16, 16 }, + { 1, 1, 48, 16 }, + { 256ul, ngraph::Shape{ 1, 3, 1, 1 }, + { 0.f, 0.f, 0.f }, { 255.f, 255.f, 255.f }, + { 0.f, 0.f, 0.f }, { 255.f, 25.5f, 2.55f } }, + "Reshape", + "FP32" + }, + // Channels count reducing, per-channel dequantizations 3d -> 4d + { + { 1, 3, 16 }, + { 1, 1, 6, 8 }, + { 256ul, ngraph::Shape{ 1, 3, 1 }, + { 0.f, 0.f, 0.f }, { 255.f, 255.f, 255.f }, + { 0.f, 0.f, 0.f }, { 255.f, 25.5f, 2.55f } }, + "Reshape", + "FP32" + }, + // Channels count reducing, per-channel dequantizations 4d -> 3d + { + { 1, 3, 2, 4 }, + { 1, 1, 24 }, + { 256ul, ngraph::Shape{ 1, 3, 1, 1 }, + { 0.f, 0.f, 0.f }, { 255.f, 255.f, 255.f }, + { 0.f, 0.f, 0.f }, { 255.f, 25.5f, 2.55f } }, + "Reshape", + "FP32" + }, + // Channels count reducing, per-channel dequantizations 5d -> 3d + { + { 1, 3, 2, 4, 2 }, + { 1, 1, 48 }, + { 256ul, ngraph::Shape{ 1, 3, 1, 1, 1 }, + { 0.f, 0.f, 0.f }, { 255.f, 255.f, 255.f }, + { 0.f, 0.f, 0.f }, { 255.f, 25.5f, 2.55f } }, + "Reshape", + "FP32" + }, + // Channels count reducing, per-channel dequantizations 5d -> 4d + { + { 1, 3, 2, 4, 2 }, + { 1, 1, 3, 16 }, + { 256ul, ngraph::Shape{ 1, 3, 1, 1, 1 }, + { 0.f, 0.f, 0.f }, { 255.f, 255.f, 255.f }, + { 0.f, 0.f, 0.f }, { 255.f, 25.5f, 2.55f } }, + "Reshape", + "FP32" + }, }; INSTANTIATE_TEST_SUITE_P(smoke_LPT, ReshapeTransformation, diff --git a/src/tests/functional/plugin/gpu/shared_tests_instances/low_precision_transformations/reshape_transformation.cpp b/src/tests/functional/plugin/gpu/shared_tests_instances/low_precision_transformations/reshape_transformation.cpp index 3a2ccbd7d50..269075ac1c9 100644 --- a/src/tests/functional/plugin/gpu/shared_tests_instances/low_precision_transformations/reshape_transformation.cpp +++ b/src/tests/functional/plugin/gpu/shared_tests_instances/low_precision_transformations/reshape_transformation.cpp @@ -113,7 +113,57 @@ const std::vector params = { }, "Reshape", "U8" - } + }, + // Channels count reducing, per-channel dequantizations 4d -> 4d + { + { 1, 3, 16, 16 }, + { 1, 1, 48, 16 }, + { 256ul, ngraph::Shape{ 1, 3, 1, 1 }, + { 0.f, 0.f, 0.f }, { 255.f, 255.f, 255.f }, + { 0.f, 0.f, 0.f }, { 255.f, 25.5f, 2.55f } }, + "Reshape", + "FP32" + }, + // Channels count reducing, per-channel dequantizations 3d -> 4d + { + { 1, 3, 16 }, + { 1, 1, 6, 8 }, + { 256ul, ngraph::Shape{ 1, 3, 1 }, + { 0.f, 0.f, 0.f }, { 255.f, 255.f, 255.f }, + { 0.f, 0.f, 0.f }, { 255.f, 25.5f, 2.55f } }, + "Reshape", + "FP32" + }, + // Channels count reducing, per-channel dequantizations 4d -> 3d + { + { 1, 3, 2, 4 }, + { 1, 1, 24 }, + { 256ul, ngraph::Shape{ 1, 3, 1, 1 }, + { 0.f, 0.f, 0.f }, { 255.f, 255.f, 255.f }, + { 0.f, 0.f, 0.f }, { 255.f, 25.5f, 2.55f } }, + "Reshape", + "FP32" + }, + // Channels count reducing, per-channel dequantizations 5d -> 3d + { + { 1, 3, 2, 4, 2 }, + { 1, 1, 48 }, + { 256ul, ngraph::Shape{ 1, 3, 1, 1, 1 }, + { 0.f, 0.f, 0.f }, { 255.f, 255.f, 255.f }, + { 0.f, 0.f, 0.f }, { 255.f, 25.5f, 2.55f } }, + "Reshape", + "FP32" + }, + // Channels count reducing, per-channel dequantizations 5d -> 4d + { + { 1, 3, 2, 4, 2 }, + { 1, 1, 3, 16 }, + { 256ul, ngraph::Shape{ 1, 3, 1, 1, 1 }, + { 0.f, 0.f, 0.f }, { 255.f, 255.f, 255.f }, + { 0.f, 0.f, 0.f }, { 255.f, 25.5f, 2.55f } }, + "Reshape", + "FP32" + }, }; INSTANTIATE_TEST_SUITE_P(smoke_LPT, ReshapeTransformation,