aboutsummaryrefslogtreecommitdiff
path: root/src/core/NEON/kernels/NEWeightsReshapeKernel.cpp
diff options
context:
space:
mode:
authorPablo Tello <pablo.tello@arm.com>2017-06-22 16:00:16 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-09-17 14:14:20 +0100
commit659abc022b42ad8d11f58b3f3b7b4175f3cf1038 (patch)
tree04110ae6a2d298b9a7deea1be2a89eca80d2b205 /src/core/NEON/kernels/NEWeightsReshapeKernel.cpp
parentb30dcc5ab8eb2bd37f0ab742af1ec45113d54296 (diff)
downloadComputeLibrary-659abc022b42ad8d11f58b3f3b7b4175f3cf1038.tar.gz
COMPMID-421: Added FP16 support in Convolutional layer (Neon)
The test suite for FP16 is conditionally compiled in when the target platform is arch=arm64-8.2-a Change-Id: I1686157e83809a00a91058bff80dbecf692fb356 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/78740 Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com> Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'src/core/NEON/kernels/NEWeightsReshapeKernel.cpp')
-rw-r--r--src/core/NEON/kernels/NEWeightsReshapeKernel.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/core/NEON/kernels/NEWeightsReshapeKernel.cpp b/src/core/NEON/kernels/NEWeightsReshapeKernel.cpp
index f31cde719a..4f52bf6279 100644
--- a/src/core/NEON/kernels/NEWeightsReshapeKernel.cpp
+++ b/src/core/NEON/kernels/NEWeightsReshapeKernel.cpp
@@ -95,7 +95,7 @@ NEWeightsReshapeKernel::NEWeightsReshapeKernel()
void NEWeightsReshapeKernel::configure(const ITensor *input, const ITensor *bias, ITensor *output)
{
- ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::F32, DataType::QS8);
+ ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::F32, DataType::F16, DataType::QS8);
ARM_COMPUTE_ERROR_ON_NULLPTR(output);
ARM_COMPUTE_ERROR_ON(input->info()->dimension(0) != input->info()->dimension(1));
@@ -113,7 +113,7 @@ void NEWeightsReshapeKernel::configure(const ITensor *input, const ITensor *bias
set_fixed_point_position_if_zero(*output->info(), fixed_point_position);
ARM_COMPUTE_ERROR_ON_MISMATCHING_DIMENSIONS(output->info()->tensor_shape(), output_shape);
- ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(output, 1, DataType::F32, DataType::QS8);
+ ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(output, 1, DataType::F16, DataType::F32, DataType::QS8);
ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, output);
ARM_COMPUTE_ERROR_ON_MISMATCHING_FIXED_POINT(input, output);
@@ -127,7 +127,7 @@ void NEWeightsReshapeKernel::configure(const ITensor *input, const ITensor *bias
set_shape_if_empty(*bias->info(), bias_shape);
ARM_COMPUTE_ERROR_ON_MISMATCHING_DIMENSIONS(bias->info()->tensor_shape(), bias_shape);
- ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(bias, 1, DataType::F32, DataType::QS8);
+ ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(bias, 1, DataType::F16, DataType::F32, DataType::QS8);
ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, bias);
ARM_COMPUTE_ERROR_ON_MISMATCHING_FIXED_POINT(input, output);
}
@@ -143,6 +143,11 @@ void NEWeightsReshapeKernel::configure(const ITensor *input, const ITensor *bias
_func = &weights_reshape<uint32_t>;
break;
}
+ case DataType::F16:
+ {
+ _func = &weights_reshape<uint16_t>;
+ break;
+ }
case DataType::QS8:
{
_func = &weights_reshape<uint8_t>;