From 306c093d33087d2ac0f218c31cbe6866b37ef088 Mon Sep 17 00:00:00 2001 From: yunji Date: Mon, 26 Jul 2021 20:36:59 +0900 Subject: [PATCH] Change the location of functional test definition. --- .../single_layer_tests/gather_elements.cpp | 3 ++- .../single_layer_tests/gather_elements.hpp | 4 ++++ .../src/single_layer/gather_elements.cpp | 3 --- .../api/cldnn/primitives/gather_elements.hpp | 12 ++++++------ .../test_cases/gather_elements_gpu_test.cpp | 18 +++++++++--------- 5 files changed, 21 insertions(+), 19 deletions(-) diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/single_layer_tests/gather_elements.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/single_layer_tests/gather_elements.cpp index 30b84f007f011b..63a6fd88c3e241 100644 --- a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/single_layer_tests/gather_elements.cpp +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/single_layer_tests/gather_elements.cpp @@ -4,7 +4,8 @@ #include -#include "shared_test_classes/single_layer/gather_elements.hpp" +#include "single_layer_tests/gather_elements.hpp" +#include "common_test_utils/test_constants.hpp" using namespace LayerTestsDefinitions; diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/gather_elements.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/gather_elements.hpp index 9c6329c76b3e81..eea88d4abf3183 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/gather_elements.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/gather_elements.hpp @@ -8,4 +8,8 @@ namespace LayerTestsDefinitions { +TEST_P(GatherElementsLayerTest, CompareWithRefs) { + Run(); +} + } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/src/single_layer/gather_elements.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/gather_elements.cpp index af5832302aa0be..d559e04a53d2c1 100644 --- a/inference-engine/tests/functional/shared_test_classes/src/single_layer/gather_elements.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/gather_elements.cpp @@ -48,7 +48,4 @@ void GatherElementsLayerTest::SetUp() { function = std::make_shared(results, params, "gatherEl"); } -TEST_P(GatherElementsLayerTest, CompareWithRefs) { - Run(); -} } // namespace LayerTestsDefinitions diff --git a/inference-engine/thirdparty/clDNN/api/cldnn/primitives/gather_elements.hpp b/inference-engine/thirdparty/clDNN/api/cldnn/primitives/gather_elements.hpp index ea058a930d181c..fdcbc1df3babd9 100644 --- a/inference-engine/thirdparty/clDNN/api/cldnn/primitives/gather_elements.hpp +++ b/inference-engine/thirdparty/clDNN/api/cldnn/primitives/gather_elements.hpp @@ -36,12 +36,12 @@ struct gather_elements : public primitive_base { /// @param output_shape Output shape. /// @param axis Gathering axis. gather_elements(const primitive_id& id, - const primitive_id& data, - const primitive_id& indices, - const format& output_format, - const tensor& output_shape, - const gather_elements_axis axis, - const padding& output_padding = padding()) + const primitive_id& data, + const primitive_id& indices, + const format& output_format, + const tensor& output_shape, + const gather_elements_axis axis, + const padding& output_padding = padding()) : primitive_base(id, {data, indices}, output_padding), output_format(output_format), output_shape(output_shape), axis(axis) {} /// @brief Gather Elements output format diff --git a/inference-engine/thirdparty/clDNN/tests/test_cases/gather_elements_gpu_test.cpp b/inference-engine/thirdparty/clDNN/tests/test_cases/gather_elements_gpu_test.cpp index d0ddfc4ff3a1c0..034f9f6699ada5 100644 --- a/inference-engine/thirdparty/clDNN/tests/test_cases/gather_elements_gpu_test.cpp +++ b/inference-engine/thirdparty/clDNN/tests/test_cases/gather_elements_gpu_test.cpp @@ -100,7 +100,7 @@ TEST(gather_elements_gpu_fp16, d3283_i2283_a0) { FLOAT16(2), FLOAT16(10), FLOAT16(7), FLOAT16(3), FLOAT16(3), FLOAT16(10), FLOAT16(6), FLOAT16(1), }; - DoTest(engine,input0, input1, expected_results, tensor(2, 2, 8, 3), axis); + DoTest(engine, input0, input1, expected_results, tensor(2, 2, 8, 3), axis); } TEST(gather_elements_gpu_fp16, d2235_i2235_a3) { @@ -178,7 +178,7 @@ TEST(gather_elements_gpu_fp16, d2235_i2235_a3) { FLOAT16(9), FLOAT16(9), FLOAT16(0), }; - DoTest(engine,input0, input1, expected_results, tensor(2, 2, 3, 5), axis); + DoTest(engine, input0, input1, expected_results, tensor(2, 2, 3, 5), axis); } TEST(gather_elements_gpu_fp16, d1329_i1359_an1) { @@ -277,7 +277,7 @@ TEST(gather_elements_gpu_fp16, d1329_i1359_an1) { FLOAT16(3), FLOAT16(3), FLOAT16(2), FLOAT16(3), FLOAT16(3), }; - DoTest(engine,input0, input1, expected_results, tensor(1, 3, 5, 9), axis); + DoTest(engine, input0, input1, expected_results, tensor(1, 3, 5, 9), axis); } TEST(gather_elements_gpu_fp16, d12853_i12923_a3) { @@ -350,7 +350,7 @@ TEST(gather_elements_gpu_fp16, d12853_i12923_a3) { FLOAT16(1), FLOAT16(7), FLOAT16(10), FLOAT16(0), FLOAT16(9), FLOAT16(4), FLOAT16(5), FLOAT16(5), }; - DoTest(engine,input0, input1, expected_results, tensor(1, 2, 8, 2, 3), axis); + DoTest(engine, input0, input1, expected_results, tensor(1, 2, 8, 2, 3), axis); } TEST(gather_elements_gpu_fp16, d25441_i22441_an4) { @@ -442,7 +442,7 @@ TEST(gather_elements_gpu_fp16, d25441_i22441_an4) { FLOAT16(6), FLOAT16(5), FLOAT16(10), FLOAT16(8), }; - DoTest(engine,input0, input1, expected_results, tensor(2, 2, 4, 4, 1), axis); + DoTest(engine, input0, input1, expected_results, tensor(2, 2, 4, 4, 1), axis); } TEST(gather_elements_gpu_fp16, d32843_i12843_a0) { @@ -582,7 +582,7 @@ TEST(gather_elements_gpu_fp16, d32843_i12843_a0) { FLOAT16(7), FLOAT16(4), FLOAT16(6), FLOAT16(8), FLOAT16(2), FLOAT16(7), FLOAT16(3), FLOAT16(5), }; - DoTest(engine,input0, input1, expected_results, tensor(1, 2, 8, 4, 3), axis); + DoTest(engine, input0, input1, expected_results, tensor(1, 2, 8, 4, 3), axis); } TEST(gather_elements_gpu_fp16, d223442_i226442_a5) { @@ -985,7 +985,7 @@ TEST(gather_elements_gpu_fp16, d223442_i226442_a5) { FLOAT16(3), FLOAT16(3), FLOAT16(7), FLOAT16(8), FLOAT16(3), FLOAT16(8), }; - DoTest(engine,input0, input1, expected_results, tensor(2, 2, 6, 4, 4, 2), axis); + DoTest(engine, input0, input1, expected_results, tensor(2, 2, 6, 4, 4, 2), axis); } TEST(gather_elements_gpu_fp16, d124251_i124221_an3) { @@ -1040,7 +1040,7 @@ TEST(gather_elements_gpu_fp16, d124251_i124221_an3) { FLOAT16(2), FLOAT16(0), FLOAT16(5), FLOAT16(8), }; - DoTest(engine,input0, input1, expected_results, tensor(1, 2, 4, 2, 2, 1), axis); + DoTest(engine, input0, input1, expected_results, tensor(1, 2, 4, 2, 2, 1), axis); } TEST(gather_elements_gpu_fp16, d233113_i233115_a2) { @@ -1137,5 +1137,5 @@ TEST(gather_elements_gpu_fp16, d233113_i233115_a2) { FLOAT16(5), FLOAT16(6), FLOAT16(3), }; - DoTest(engine,input0, input1, expected_results, tensor(2, 3, 3, 1, 1, 5), axis); + DoTest(engine, input0, input1, expected_results, tensor(2, 3, 3, 1, 1, 5), axis); }