aboutsummaryrefslogtreecommitdiff
path: root/src/core/CL/kernels/CLGEMMMatrixAdditionKernel.cpp
diff options
context:
space:
mode:
authorMichele Di Giorgio <michele.digiorgio@arm.com>2018-11-16 16:04:25 +0000
committerMichele Di Giorgio <michele.digiorgio@arm.com>2019-02-07 09:44:08 +0000
commitebc3a90721fe4a41b8e141466894d4d7185c01b7 (patch)
tree9149764caa37edbdc6bb6c69d503d37dbb28449f /src/core/CL/kernels/CLGEMMMatrixAdditionKernel.cpp
parent4632e5e44e9a78b15884d0947007bb030fde0aea (diff)
downloadComputeLibrary-ebc3a90721fe4a41b8e141466894d4d7185c01b7.tar.gz
COMPMID-1706: Fuse the bias addition within CLGEMM
Change-Id: I378f2023f4fa010f195f76716ac07aa86279bfae Signed-off-by: Michele Di Giorgio <michele.digiorgio@arm.com> Reviewed-on: https://review.mlplatform.org/280 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
Diffstat (limited to 'src/core/CL/kernels/CLGEMMMatrixAdditionKernel.cpp')
-rw-r--r--src/core/CL/kernels/CLGEMMMatrixAdditionKernel.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/core/CL/kernels/CLGEMMMatrixAdditionKernel.cpp b/src/core/CL/kernels/CLGEMMMatrixAdditionKernel.cpp
index 825d7fb216..803ed30d84 100644
--- a/src/core/CL/kernels/CLGEMMMatrixAdditionKernel.cpp
+++ b/src/core/CL/kernels/CLGEMMMatrixAdditionKernel.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2018 ARM Limited.
+ * Copyright (c) 2017-2019 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -86,14 +86,13 @@ void CLGEMMMatrixAdditionKernel::configure(const ICLTensor *input, ICLTensor *ou
_input = input;
_output = output;
- std::ostringstream ma_arguments;
- ma_arguments << "-DBETA=" << beta;
- std::set<std::string> build_opts;
- build_opts.emplace(ma_arguments.str());
+ // Create build options
+ CLBuildOptions build_opts;
+ build_opts.add_option("-DBETA=" + float_to_string_with_full_precision(beta));
// Create kernel
std::string data_type_name = lower_string(string_from_data_type(input->info()->data_type()));
- _kernel = static_cast<cl::Kernel>(CLKernelLibrary::get().create_kernel(("gemm_ma_" + data_type_name), build_opts));
+ _kernel = static_cast<cl::Kernel>(CLKernelLibrary::get().create_kernel(("gemm_ma_" + data_type_name), build_opts.options()));
// Configure kernel window
auto win_config = validate_and_configure_window(input->info(), output->info());