diff options
author | Michele Di Giorgio <michele.digiorgio@arm.com> | 2020-03-06 13:56:54 +0000 |
---|---|---|
committer | Michele Di Giorgio <michele.digiorgio@arm.com> | 2020-03-06 15:51:08 +0000 |
commit | 398b8e4a0cf02b43f4469079e95b811cc1255e29 (patch) | |
tree | 8c5c4d84a6ec15b329809ce3561ada1d36b693dd /src/core/CL | |
parent | b54ba2848515bf0aee0619c760518481f58c7525 (diff) | |
download | ComputeLibrary-398b8e4a0cf02b43f4469079e95b811cc1255e29.tar.gz |
COMPMID-3069: Fix min/max output stage bounds in CLGEMMLowpMatrixMultiplyReshapedOnlyRHSKernel
Change-Id: I0985f1649c4936b7e16a77e9cd3ea48c4c77cbc9
Signed-off-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/2849
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')
-rw-r--r-- | src/core/CL/kernels/CLGEMMLowpMatrixMultiplyReshapedOnlyRHSKernel.cpp | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/src/core/CL/kernels/CLGEMMLowpMatrixMultiplyReshapedOnlyRHSKernel.cpp b/src/core/CL/kernels/CLGEMMLowpMatrixMultiplyReshapedOnlyRHSKernel.cpp index c4ed691f2e..71b4d76520 100644 --- a/src/core/CL/kernels/CLGEMMLowpMatrixMultiplyReshapedOnlyRHSKernel.cpp +++ b/src/core/CL/kernels/CLGEMMLowpMatrixMultiplyReshapedOnlyRHSKernel.cpp @@ -160,21 +160,11 @@ Status validate_arguments(const ITensorInfo *input0, const ITensorInfo *input1, } } - PixelValue min_val{}; - PixelValue max_val{}; if(output->total_size() != 0) { ARM_COMPUTE_RETURN_ERROR_ON(output_stage.output_data_type != output->data_type()); - std::tie(min_val, max_val) = get_min_max(output->data_type()); - ARM_COMPUTE_RETURN_ERROR_ON(output_stage.gemmlowp_max_bound > max_val.get<int32_t>()); - ARM_COMPUTE_RETURN_ERROR_ON(output_stage.gemmlowp_min_bound < min_val.get<int32_t>() || output_stage.gemmlowp_min_bound > output_stage.gemmlowp_max_bound); - } - else - { - std::tie(min_val, max_val) = get_min_max(output_stage.output_data_type); - ARM_COMPUTE_RETURN_ERROR_ON(output_stage.gemmlowp_max_bound > max_val.get<int32_t>()); - ARM_COMPUTE_RETURN_ERROR_ON(output_stage.gemmlowp_min_bound < min_val.get<int32_t>() || output_stage.gemmlowp_min_bound > output_stage.gemmlowp_max_bound); } + ARM_COMPUTE_RETURN_ERROR_ON(output_stage.gemmlowp_min_bound > output_stage.gemmlowp_max_bound); if(output_multipliers != nullptr && output_shifts != nullptr) { @@ -425,8 +415,8 @@ void CLGEMMLowpMatrixMultiplyReshapedOnlyRHSKernel::configure(const ICLTensor *i PixelValue min_val{}; PixelValue max_val{}; std::tie(min_val, max_val) = get_min_max(output->info()->data_type()); - build_opts.add_option_if((min != min_val.get<int32_t>()) && (min != max), "-DMIN_BOUND=" + support::cpp11::to_string(min)); - build_opts.add_option_if((max != max_val.get<int32_t>()) && (min != max), "-DMAX_BOUND=" + support::cpp11::to_string(max)); + build_opts.add_option_if(min != min_val.get<int32_t>(), "-DMIN_BOUND=" + support::cpp11::to_string(min)); + build_opts.add_option_if(max != max_val.get<int32_t>(), "-DMAX_BOUND=" + support::cpp11::to_string(max)); } // Create kernel |