diff options
author | Pablo Tello <pablo.tello@arm.com> | 2017-11-02 16:09:35 +0000 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:35:24 +0000 |
commit | 6ff12a0f7765f62b8d0fa8554021e1cac2789f19 (patch) | |
tree | 9338db697789106b49ea391634be8b3c08ef9f97 /tests/validation/fixtures | |
parent | 97988a4b3ef0f840432daf95b6e4b2ad7e5feefd (diff) | |
download | ComputeLibrary-6ff12a0f7765f62b8d0fa8554021e1cac2789f19.tar.gz |
COMPMID-662: Integrated the new a64_s8_gemm_12x8 + dot product kernel into ACL.
Change-Id: Id8f919e486a132fc58346c9f84fccbeeb83d19b3
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/94233
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
Diffstat (limited to 'tests/validation/fixtures')
-rw-r--r-- | tests/validation/fixtures/GEMMLowpFixture.h | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/tests/validation/fixtures/GEMMLowpFixture.h b/tests/validation/fixtures/GEMMLowpFixture.h index 1a4084fdc2..fba44008ba 100644 --- a/tests/validation/fixtures/GEMMLowpFixture.h +++ b/tests/validation/fixtures/GEMMLowpFixture.h @@ -57,7 +57,7 @@ protected: template <typename U> void fill(U &&tensor, int i) { - ARM_COMPUTE_ERROR_ON(tensor.data_type() != DataType::U8); + ARM_COMPUTE_ERROR_ON(tensor.data_type() != DataType::S8); std::uniform_int_distribution<> distribution(0, 3); library->fill(tensor, distribution, i); } @@ -97,28 +97,28 @@ protected: return c; } - 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, DataType data_type) + SimpleTensor<int8_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, DataType data_type) { // Create reference - 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 }; + SimpleTensor<int8_t> a{ shape_a, data_type, 1 }; + SimpleTensor<int8_t> b{ shape_b, data_type, 1 }; + SimpleTensor<int8_t> c{ shape_c, data_type, 1 }; // Fill reference fill(a, 0); fill(b, 1); fill(c, 2); - return reference::gemmlowp<uint8_t>(a, b, c, a_offset, b_offset, c_offset, c_mult_int, out_shift); + return reference::gemmlowp<int8_t>(a, b, c, a_offset, b_offset, c_offset, c_mult_int, out_shift); } - TensorType _target{}; - SimpleTensor<uint8_t> _reference{}; + TensorType _target{}; + SimpleTensor<int8_t> _reference{}; }; template <typename TensorType, typename AccessorType, typename FunctionType> -class GEMMLowpValidationFixture : public framework::Fixture +class GEMMLowpMatrixMultiplyValidationFixture : public framework::Fixture { public: template <typename...> @@ -142,9 +142,9 @@ protected: TensorType compute_target(const TensorShape &shape_a, const TensorShape &shape_b, const TensorShape &shape_c) { // 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::U32, 1); + TensorType a = create_tensor<TensorType>(shape_a, DataType::S8, 1); + TensorType b = create_tensor<TensorType>(shape_b, DataType::S8, 1); + TensorType c = create_tensor<TensorType>(shape_c, DataType::S32, 1); // Create and configure function FunctionType gemmlowp; @@ -164,8 +164,8 @@ protected: ARM_COMPUTE_EXPECT(!c.info()->is_resizable(), framework::LogLevel::ERRORS); // Fill tensors - fill(AccessorType(a), 0, 0, 3); - fill(AccessorType(b), 1, 0, 3); + fill(AccessorType(a), 0, -128, 127); + fill(AccessorType(b), 1, -128, 127); fill(AccessorType(c), 2, 0, 0); // Compute GEMM function @@ -173,23 +173,23 @@ protected: return c; } - SimpleTensor<uint32_t> compute_reference(const TensorShape &shape_a, const TensorShape &shape_b, const TensorShape &shape_c) + SimpleTensor<int32_t> compute_reference(const TensorShape &shape_a, const TensorShape &shape_b, const TensorShape &shape_c) { // Create reference - SimpleTensor<uint8_t> a{ shape_a, DataType::U8, 1 }; - SimpleTensor<uint8_t> b{ shape_b, DataType::U8, 1 }; - SimpleTensor<uint32_t> c{ shape_c, DataType::U32, 1 }; + SimpleTensor<int8_t> a{ shape_a, DataType::S8, 1 }; + SimpleTensor<int8_t> b{ shape_b, DataType::S8, 1 }; + SimpleTensor<int32_t> c{ shape_c, DataType::S32, 1 }; // Fill reference - fill(a, 0, 0, 3); - fill(b, 1, 0, 3); + fill(a, 0, -128, 127); + fill(b, 1, -128, 127); fill(c, 2, 0, 0); return reference::gemmlowp(a, b, c); } - TensorType _target{}; - SimpleTensor<uint32_t> _reference{}; + TensorType _target{}; + SimpleTensor<int32_t> _reference{}; }; } // namespace validation |