From 247a48a2cbedb6cd295b7558fe8f20d68ef2738c Mon Sep 17 00:00:00 2001 From: Kelvin Choi Date: Wed, 4 Dec 2024 22:32:16 +0900 Subject: [PATCH] Update unittest to reduce the number of test --- .../unit/test_cases/pooling_gpu_test.cpp | 61 +------------------ 1 file changed, 2 insertions(+), 59 deletions(-) diff --git a/src/plugins/intel_gpu/tests/unit/test_cases/pooling_gpu_test.cpp b/src/plugins/intel_gpu/tests/unit/test_cases/pooling_gpu_test.cpp index 4ade9684c055ec..461474335e903a 100644 --- a/src/plugins/intel_gpu/tests/unit/test_cases/pooling_gpu_test.cpp +++ b/src/plugins/intel_gpu/tests/unit/test_cases/pooling_gpu_test.cpp @@ -1517,63 +1517,6 @@ TEST(pooling_forward_gpu, b_fs_yx_fsv4) } // for (int j = 0; F_array[j]; i++) } -TEST(pooling_forward_gpu, fs_b_yx_fsv32_int8) -{ - auto& engine = get_test_engine(); - - auto input_prim = engine.allocate_memory({ data_types::f32, format::yxfb, { 2, 32, 1, 2 } }); - - topology topology; - topology.add(input_layout("input", input_prim->get_layout())); - topology.add(reorder("reorder_input", input_info("input"), layout(data_types::i8, format::fs_b_yx_fsv32, { 2, 32, 1, 2 }))); - topology.add(pooling("avg_pooling", input_info("reorder_input"), pooling_mode::average, { 7, 7 }, { 2, 2 })); - topology.add(reorder("reorder_after_pooling", input_info("avg_pooling"), layout(data_types::f32, format::fs_b_yx_fsv32, { 2, 32, 1, 1 }))); - - network network(engine, topology, get_test_default_config(engine)); - set_values(input_prim, { 41.f, 42.f, 43.f, 44.f, 45.f, 46.f, 47.f, 48.f, - 11.f, 12.f, 13.f, 14.f, 15.f, 16.f, 17.f, 18.f, - 21.f, 22.f, 23.f, 24.f, 25.f, 26.f, 27.f, 28.f, - 31.f, 32.f, 33.f, 34.f, 35.f, 36.f, 37.f, 38.f, - - 31.f, 32.f, 33.f, 34.f, 35.f, 36.f, 37.f, 38.f, - 21.f, 22.f, 23.f, 24.f, 25.f, 26.f, 27.f, 28.f, - 51.f, 52.f, 53.f, 54.f, 55.f, 56.f, 57.f, 58.f, - 11.f, 12.f, 13.f, 14.f, 15.f, 16.f, 17.f, 18.f, - - 41.f, 42.f, 43.f, 44.f, 45.f, 46.f, 47.f, 48.f, - 11.f, 12.f, 13.f, 14.f, 15.f, 16.f, 17.f, 18.f, - 21.f, 22.f, 23.f, 24.f, 25.f, 26.f, 27.f, 28.f, - 31.f, 32.f, 33.f, 34.f, 35.f, 36.f, 37.f, 38.f, - - 31.f, 32.f, 33.f, 34.f, 35.f, 36.f, 37.f, 38.f, - 21.f, 22.f, 23.f, 24.f, 25.f, 26.f, 27.f, 28.f, - 51.f, 52.f, 53.f, 54.f, 55.f, 56.f, 57.f, 58.f, - 11.f, 12.f, 13.f, 14.f, 15.f, 16.f, 17.f, 18.f }); - network.set_input_data("input", input_prim); - - auto outputs = network.execute(); - ASSERT_EQ(outputs.size(), size_t(1)); - ASSERT_EQ(outputs.begin()->first, "reorder_after_pooling"); - - auto output_prim = outputs.begin()->second.get_memory(); - - cldnn::mem_lock output_ptr(output_prim, get_test_stream()); - - std::vector ref_data = { 41.f, 43.f, 45.f, 47.f, 11.f, 13.f, 15.f, 17.f, - 21.f, 23.f, 25.f, 27.f, 31.f, 33.f, 35.f, 37.f, - 31.f, 33.f, 35.f, 37.f, 21.f, 23.f, 25.f, 27.f, - 51.f, 53.f, 55.f, 57.f, 11.f, 13.f, 15.f, 17.f, - - 42.f, 44.f, 46.f, 48.f, 12.f, 14.f, 16.f, 18.f, - 22.f, 24.f, 26.f, 28.f, 32.f, 34.f, 36.f, 38.f, - 32.f, 34.f, 36.f, 38.f, 22.f, 24.f, 26.f, 28.f, - 52.f, 54.f, 56.f, 58.f, 12.f, 14.f, 16.f, 18.f }; - - for (size_t i = 0; i < ref_data.size(); i++) { - ASSERT_EQ(ref_data[i], float(output_ptr[i])); - } -} - TEST(pooling_forward_gpu, fs_b_yx_fsv32_avg_3x3_input_2x2_pool_1x1_stride_2x2_output) { auto& engine = get_test_engine(); @@ -2360,8 +2303,8 @@ INSTANTIATE_TEST_SUITE_P( pooling_random_test_int8_uint8, testing::Combine(testing::Values(1, 2), testing::Values(3, 8), - testing::Values(std::tuple(12, 12, 1), std::tuple(24, 24, 1)), - testing::Values(std::tuple(4, 4, 1), std::tuple(2, 2, 1)), + testing::Values(std::tuple(12, 12, 1)), + testing::Values(std::tuple(4, 4, 1)), testing::Values(std::tuple(2, 2, 1)), testing::Values(std::tuple(0, 0, 0)), testing::Values(format::fs_b_yx_fsv32)),