aboutsummaryrefslogtreecommitdiff
path: root/tests/validation/fixtures/GEMMLowpFixture.h
diff options
context:
space:
mode:
authorGian Marco <gianmarco.iodice@arm.com>2017-10-18 17:05:02 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:35:24 +0000
commitfa4cacdff825a38eac31ef7ecd3ad6b30da53eaa (patch)
tree15982731a9b70660f9b501f0c6bb259e2e4115ff /tests/validation/fixtures/GEMMLowpFixture.h
parent13fc22c3c3f609489e53ec706026a2a7991bf367 (diff)
downloadComputeLibrary-fa4cacdff825a38eac31ef7ecd3ad6b30da53eaa.tar.gz
COMPMID-636 - Extending GEMMLowp validation for NEON intrinsics
Change-Id: Id02a0b3bf5af65dd940b46b2f6634b6a479cf388 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/92275 Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com> Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'tests/validation/fixtures/GEMMLowpFixture.h')
-rw-r--r--tests/validation/fixtures/GEMMLowpFixture.h25
1 files changed, 11 insertions, 14 deletions
diff --git a/tests/validation/fixtures/GEMMLowpFixture.h b/tests/validation/fixtures/GEMMLowpFixture.h
index 556b6c4725..1a4084fdc2 100644
--- a/tests/validation/fixtures/GEMMLowpFixture.h
+++ b/tests/validation/fixtures/GEMMLowpFixture.h
@@ -47,13 +47,10 @@ class GEMMLowpOffsetValidationFixture : public framework::Fixture
{
public:
template <typename...>
- void setup(size_t m, size_t n, size_t k, int32_t a_offset, int32_t b_offset, int32_t c_offset, int32_t c_mult_int, int32_t out_shift)
+ void setup(TensorShape shape_a, TensorShape shape_b, TensorShape shape_c, int32_t a_offset, int32_t b_offset, int32_t c_offset, int32_t c_mult_int, int32_t out_shift, DataType data_type)
{
- const TensorShape shape_a(k, m);
- const TensorShape shape_b(n, k);
- const TensorShape shape_c(n, m);
- _target = compute_target(shape_a, shape_b, shape_c, a_offset, b_offset, c_offset, c_mult_int, out_shift);
- _reference = compute_reference(shape_a, shape_b, shape_c, a_offset, b_offset, c_offset, c_mult_int, out_shift);
+ _target = compute_target(shape_a, shape_b, shape_c, a_offset, b_offset, c_offset, c_mult_int, out_shift, data_type);
+ _reference = compute_reference(shape_a, shape_b, shape_c, a_offset, b_offset, c_offset, c_mult_int, out_shift, data_type);
}
protected:
@@ -66,12 +63,12 @@ protected:
}
TensorType compute_target(const TensorShape &shape_a, const TensorShape &shape_b, const TensorShape &shape_c,
- int32_t a_offset, int32_t b_offset, int32_t c_offset, int32_t c_mult_int, int32_t out_shift)
+ int32_t a_offset, int32_t b_offset, int32_t c_offset, int32_t c_mult_int, int32_t out_shift, DataType data_type)
{
// Create tensors
- TensorType a = create_tensor<TensorType>(shape_a, DataType::U8, 1);
- TensorType b = create_tensor<TensorType>(shape_b, DataType::U8, 1);
- TensorType c = create_tensor<TensorType>(shape_c, DataType::U8, 1);
+ TensorType a = create_tensor<TensorType>(shape_a, data_type, 1);
+ TensorType b = create_tensor<TensorType>(shape_b, data_type, 1);
+ TensorType c = create_tensor<TensorType>(shape_c, data_type, 1);
// Create and configure function
FunctionType gemmlowp;
@@ -101,12 +98,12 @@ protected:
}
SimpleTensor<uint8_t> compute_reference(const TensorShape &shape_a, const TensorShape &shape_b, const TensorShape &shape_c,
- int32_t a_offset, int32_t b_offset, int32_t c_offset, int32_t c_mult_int, int32_t out_shift)
+ int32_t a_offset, int32_t b_offset, int32_t c_offset, int32_t c_mult_int, int32_t out_shift, DataType data_type)
{
// Create reference
- SimpleTensor<uint8_t> a{ shape_a, DataType::U8, 1 };
- SimpleTensor<uint8_t> b{ shape_b, DataType::U8, 1 };
- SimpleTensor<uint8_t> c{ shape_c, DataType::U8, 1 };
+ SimpleTensor<uint8_t> a{ shape_a, data_type, 1 };
+ SimpleTensor<uint8_t> b{ shape_b, data_type, 1 };
+ SimpleTensor<uint8_t> c{ shape_c, data_type, 1 };
// Fill reference
fill(a, 0);