aboutsummaryrefslogtreecommitdiff
path: root/src/core/CL/CLKernelLibrary.cpp
diff options
context:
space:
mode:
authorChunosov <N.Chunosov@yandex.ru>2017-11-08 16:09:35 +0700
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:35:24 +0000
commitf450caa7d2ac9a2a90407fb81203228dc82ef4a1 (patch)
treeed34d43943cd36cbd6776ddc6ac87e92d6f7dcc0 /src/core/CL/CLKernelLibrary.cpp
parent7068f9900d136312318ff430aef588b14e0c87ad (diff)
downloadComputeLibrary-f450caa7d2ac9a2a90407fb81203228dc82ef4a1.tar.gz
COMPMID-661: softmax-uint8 implementation (#16)
Change-Id: Iad11ce70a8a0878a48e445a092035c49c926cece Reviewed-on: http://mpd-gerrit.cambridge.arm.com/94855 Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com> Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'src/core/CL/CLKernelLibrary.cpp')
-rw-r--r--src/core/CL/CLKernelLibrary.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/core/CL/CLKernelLibrary.cpp b/src/core/CL/CLKernelLibrary.cpp
index 6ebdf298f1..94cc02a705 100644
--- a/src/core/CL/CLKernelLibrary.cpp
+++ b/src/core/CL/CLKernelLibrary.cpp
@@ -58,6 +58,19 @@ void CLBuildOptions::add_option_if_else(bool cond, std::string option_true, std:
(cond) ? add_option(std::move(option_true)) : add_option(std::move(option_false));
}
+void CLBuildOptions::add_options(const StringSet &options)
+{
+ _build_opts.insert(options.begin(), options.end());
+}
+
+void CLBuildOptions::add_options_if(bool cond, const StringSet &options)
+{
+ if(cond)
+ {
+ add_options(options);
+ }
+}
+
const CLBuildOptions::StringSet &CLBuildOptions::options() const
{
return _build_opts;
@@ -299,8 +312,11 @@ const std::map<std::string, std::string> CLKernelLibrary::_kernel_program_map =
{ "sobel_separable7x1", "sobel_filter.cl" },
{ "sobel_separable1x7", "sobel_filter.cl" },
{ "softmax_layer_max", "softmax_layer.cl" },
+ { "softmax_layer_max_quantized", "softmax_layer_quantized.cl" },
{ "softmax_layer_shift_exp_sum", "softmax_layer.cl" },
+ { "softmax_layer_shift_exp_sum_quantized", "softmax_layer_quantized.cl" },
{ "softmax_layer_norm", "softmax_layer.cl" },
+ { "softmax_layer_norm_quantized", "softmax_layer_quantized.cl" },
{ "softmax_layer_max_shift_exp_sum_serial", "softmax_layer.cl" },
{ "softmax_layer_max_shift_exp_sum_parallel", "softmax_layer.cl" },
{ "suppress_non_maximum", "canny.cl" },
@@ -587,6 +603,10 @@ const std::map<std::string, std::string> CLKernelLibrary::_program_source_map =
#include "./cl_kernels/softmax_layer.clembed"
},
{
+ "softmax_layer_quantized.cl",
+#include "./cl_kernels/softmax_layer_quantized.clembed"
+ },
+ {
"tablelookup.cl",
#include "./cl_kernels/tablelookup.clembed"
},