diff options
author | Teresa Charlin <teresa.charlinreyes@arm.com> | 2021-02-03 17:01:23 +0000 |
---|---|---|
committer | TeresaARM <teresa.charlinreyes@arm.com> | 2021-02-03 21:49:33 +0000 |
commit | 8d8a1c554d71e020526838bd65be0bb7fc9c8914 (patch) | |
tree | d92841409e8788969cb12aaab990beb27681ad2c /src/core/CL/kernels | |
parent | e1314665fcfd2a32d6117a8fc16f67a83db3bb05 (diff) | |
download | ComputeLibrary-8d8a1c554d71e020526838bd65be0bb7fc9c8914.tar.gz |
Fix segfault in fsrcnn.tflite in GpuAcc
* In CLDirectConvolution check for non-bias separately
Resolves: COMPMID-4214
Change-Id: I83c0688e9b48d059665bbc6e1f0f050a516132d6
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4980
Reviewed-by: Giorgio Arena <giorgio.arena@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/core/CL/kernels')
-rw-r--r-- | src/core/CL/kernels/CLDirectConvolutionLayerKernel.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/CL/kernels/CLDirectConvolutionLayerKernel.cpp b/src/core/CL/kernels/CLDirectConvolutionLayerKernel.cpp index 3b6c306734..3ca72b3e5d 100644 --- a/src/core/CL/kernels/CLDirectConvolutionLayerKernel.cpp +++ b/src/core/CL/kernels/CLDirectConvolutionLayerKernel.cpp @@ -381,8 +381,11 @@ void CLDirectConvolutionLayerKernel::configure(const CLCompileContext &compile_c const unsigned int pad_left = conv_info.pad_left(); const unsigned int pad_top = conv_info.pad_top(); - build_options.add_option_if(_biases != nullptr, std::string("-DHAS_BIAS")); - build_options.add_option_if(_biases != nullptr, std::string("-DBIA_DATA_TYPE=" + get_cl_type_from_data_type(_biases->info()->data_type()))); + if (_biases != nullptr) + { + build_options.add_option(std::string("-DHAS_BIAS")); + build_options.add_option(std::string("-DBIA_DATA_TYPE=" + get_cl_type_from_data_type(_biases->info()->data_type()))); + } build_options.add_option("-DSRC_WIDTH=" + support::cpp11::to_string(_input->info()->dimension(width_idx))); build_options.add_option("-DSRC_HEIGHT=" + support::cpp11::to_string(_input->info()->dimension(height_idx))); build_options.add_option("-DSRC_CHANNELS=" + support::cpp11::to_string(_input->info()->dimension(channel_idx))); |