From ba9b3f58583331100346cf4fad16d51aa11a3677 Mon Sep 17 00:00:00 2001 From: Moritz Pflanzer Date: Thu, 27 Jul 2017 12:45:30 +0100 Subject: COMPMID-417: Fix F16 CLSoftmaxLayer Change-Id: I231b1fcaea8bfb11f8306bc71fdde78fadeed60d Reviewed-on: http://mpd-gerrit.cambridge.arm.com/81832 Reviewed-by: Steven Niu Tested-by: Kaizen --- src/core/CL/kernels/CLSoftmaxLayerKernel.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/core/CL/kernels/CLSoftmaxLayerKernel.cpp') diff --git a/src/core/CL/kernels/CLSoftmaxLayerKernel.cpp b/src/core/CL/kernels/CLSoftmaxLayerKernel.cpp index 0e81fc7aa4..da3b9423d5 100644 --- a/src/core/CL/kernels/CLSoftmaxLayerKernel.cpp +++ b/src/core/CL/kernels/CLSoftmaxLayerKernel.cpp @@ -68,6 +68,10 @@ void CLLogits1DMaxKernel::configure(const ICLTensor *input, ICLTensor *output) { build_opts.emplace(("-DFIXED_POINT_POSITION=" + support::cpp11::to_string(input->info()->fixed_point_position()))); } + else if(input->info()->data_type() == DataType::F16) + { + build_opts.emplace("-DUSE_F16"); + } // Tell the kernel that the width is not a multiple of 16 if((input->info()->dimension(0) % max_cl_vector_width) != 0) @@ -130,6 +134,10 @@ void CLLogits1DShiftExpSumKernel::configure(const ICLTensor *input, const ICLTen { build_opts.emplace(("-DFIXED_POINT_POSITION=" + support::cpp11::to_string(input->info()->fixed_point_position()))); } + else if(input->info()->data_type() == DataType::F16) + { + build_opts.emplace("-DUSE_F16"); + } // Tell the kernel that the width is not a multiple of 16 if((input->info()->dimension(0) % max_cl_vector_width) != 0) -- cgit v1.2.1