Skip to content

Commit

Permalink
Change the location of functional test definition.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunji-yunji committed Jul 26, 2021
1 parent d36aa7e commit 306c093
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

#include <vector>

#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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@

namespace LayerTestsDefinitions {

TEST_P(GatherElementsLayerTest, CompareWithRefs) {
Run();
}

} // namespace LayerTestsDefinitions
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,4 @@ void GatherElementsLayerTest::SetUp() {
function = std::make_shared<ngraph::Function>(results, params, "gatherEl");
}

TEST_P(GatherElementsLayerTest, CompareWithRefs) {
Run();
}
} // namespace LayerTestsDefinitions
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ struct gather_elements : public primitive_base<gather_elements> {
/// @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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
}

0 comments on commit 306c093

Please sign in to comment.