diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2018-02-07 16:05:47 +0000 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:46:07 +0000 |
commit | e9146ed3b4ad8501cb17dfe5953ef0259f106c2e (patch) | |
tree | 905f3ea47ff8baf5e67b4970f118f58f7ce48e33 /src | |
parent | 6e464c37b5335e362ac3f988cc4b0beed5205ff4 (diff) | |
download | ComputeLibrary-e9146ed3b4ad8501cb17dfe5953ef0259f106c2e.tar.gz |
COMPMID-879: Investigate CL mismatches in Convolution S16
Changes and simplifies the validation to divide the scale in integer format instead of double.
Change-Id: Ib9156e9515e4e542391eeda11548f3d15613a0af
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/119256
Tested-by: Jenkins <bsgcomp@arm.com>
Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/core/CL/kernels/CLConvolutionKernel.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/core/CL/kernels/CLConvolutionKernel.cpp b/src/core/CL/kernels/CLConvolutionKernel.cpp index fd64dc4fe0..2b08c8dfba 100644 --- a/src/core/CL/kernels/CLConvolutionKernel.cpp +++ b/src/core/CL/kernels/CLConvolutionKernel.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017 ARM Limited. + * Copyright (c) 2016-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -63,8 +63,8 @@ void CLConvolutionKernel<matrix_size>::configure(const ICLTensor *input, ICLTens _input = input; _output = output; - std::stringstream kernel_name; - std::set<std::string> options; + std::stringstream kernel_name; + CLBuildOptions build_opts; kernel_name << "convolution" << matrix_size << "x" << matrix_size << "_static"; if(scale == 0) @@ -76,19 +76,19 @@ void CLConvolutionKernel<matrix_size>::configure(const ICLTensor *input, ICLTens { std::stringstream mat_str; mat_str << "-DMAT" << i << "=" << conv[i]; - options.insert(mat_str.str()); + build_opts.add_option(mat_str.str()); } - options.insert("-DSCALE=" + support::cpp11::to_string(scale)); + build_opts.add_option("-DSCALE=" + support::cpp11::to_string(scale)); DataType data_type = data_type_for_convolution_matrix(conv, matrix_size * matrix_size); - options.insert("-DDATA_TYPE=" + get_cl_type_from_data_type(data_type)); + build_opts.add_option("-DDATA_TYPE=" + get_cl_type_from_data_type(data_type)); std::stringstream out_type; out_type << "-DDATA_TYPE_OUT=" << get_cl_type_from_data_type(output->info()->data_type()); - options.insert(out_type.str()); + build_opts.add_option(out_type.str()); - _kernel = static_cast<cl::Kernel>(CLKernelLibrary::get().create_kernel(kernel_name.str(), options)); + _kernel = static_cast<cl::Kernel>(CLKernelLibrary::get().create_kernel(kernel_name.str(), build_opts.options())); // Configure kernel window constexpr unsigned int num_elems_processed_per_iteration = 8; |