aboutsummaryrefslogtreecommitdiff
path: root/src/core/CL/kernels/CLWinogradFilterTransformKernel.cpp
diff options
context:
space:
mode:
authorVidhya Sudhan Loganathan <vidhyasudhan.loganathan@arm.com>2018-08-31 16:10:16 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:54:54 +0000
commit71ecf396bb08e302dc06b2c7ed44001894d3a2ea (patch)
tree41a0143c3acd77c9c995c7d97ade143e49719392 /src/core/CL/kernels/CLWinogradFilterTransformKernel.cpp
parent553b999ccc4233b163377e0a55e2377614899a3e (diff)
downloadComputeLibrary-71ecf396bb08e302dc06b2c7ed44001894d3a2ea.tar.gz
COMPMID-1266 : support for FP16 in CLWinogradConvolutionLayer
Added support for FP16 in CLWinogradConvolutionLayer: 5x5 kernels and 3x3 kernels(COMPMID-937) Change-Id: I0f394cbdc978dd04176416e9f612aca3986b09e6 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/145537 Tested-by: Jenkins <bsgcomp@arm.com> Reviewed-by: Giorgio Arena <giorgio.arena@arm.com>
Diffstat (limited to 'src/core/CL/kernels/CLWinogradFilterTransformKernel.cpp')
-rw-r--r--src/core/CL/kernels/CLWinogradFilterTransformKernel.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/CL/kernels/CLWinogradFilterTransformKernel.cpp b/src/core/CL/kernels/CLWinogradFilterTransformKernel.cpp
index 818638c89e..55cc465292 100644
--- a/src/core/CL/kernels/CLWinogradFilterTransformKernel.cpp
+++ b/src/core/CL/kernels/CLWinogradFilterTransformKernel.cpp
@@ -26,6 +26,7 @@
#include "arm_compute/core/AccessWindowStatic.h"
#include "arm_compute/core/CL/CLHelpers.h"
#include "arm_compute/core/CL/CLKernelLibrary.h"
+#include "arm_compute/core/CL/CLValidate.h"
#include "arm_compute/core/CL/ICLTensor.h"
#include "arm_compute/core/Helpers.h"
#include "arm_compute/core/IAccessWindow.h"
@@ -45,7 +46,8 @@ namespace
{
Status validate_arguments(const ITensorInfo *input, const ITensorInfo *output, const WinogradInfo &winograd_info)
{
- ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::F32);
+ ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::F32, DataType::F16);
+ ARM_COMPUTE_RETURN_ERROR_ON_F16_UNSUPPORTED(input);
const Size2D kernel_size = winograd_info.kernel_size;
const Size2D output_tile_size = winograd_info.output_tile_size;
@@ -109,9 +111,9 @@ void CLWinogradFilterTransformKernel::configure(const ICLTensor *input, ICLTenso
// Set build options
CLBuildOptions build_opts;
build_opts.add_option("-DSRC_DIM_Z=" + support::cpp11::to_string(input->info()->dimension(2)));
+ build_opts.add_option("-DDATA_TYPE=" + get_cl_type_from_data_type(input->info()->data_type()));
build_opts.add_option_if(winograd_info.kernel_size.height == 1, "-DWINOGRAD_FILTER_TRANSFORM_HORIZONTAL");
build_opts.add_option_if(winograd_info.kernel_size.width == 1, "-DWINOGRAD_FILTER_TRANSFORM_VERTICAL");
-
const Size2D kernel_size = winograd_info.kernel_size;
const Size2D output_tile_size = winograd_info.output_tile_size;