diff options
author | Adnan AlSinan <adnan.alsinan@arm.com> | 2023-02-14 14:24:09 +0000 |
---|---|---|
committer | Adnan AlSinan <adnan.alsinan@arm.com> | 2023-02-28 19:19:08 +0000 |
commit | 227db8db83cd85d8704a8edbd4e8c88af0dd1f84 (patch) | |
tree | 9247a7d4cfd9475f97d1cda6409af9f312d50989 /src/gpu/cl | |
parent | d538d161f6e55290bf1bb0b27cf26666379d0255 (diff) | |
download | ComputeLibrary-227db8db83cd85d8704a8edbd4e8c88af0dd1f84.tar.gz |
Add an option to use lowest for max-pooling
- Add a parameter in PoolingLayerInfo class to pick which value to use as min for max-pooling.
Resolves: [ONCPUML-1166]
Signed-off-by: Adnan AlSinan <adnan.alsinan@arm.com>
Change-Id: I34e1cccc15176bbf31523c61e99f3188ddca23e1
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/8989
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: SiCong Li <sicong.li@arm.com>
Reviewed-by: Pablo Marquez Tello <pablo.tello@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/gpu/cl')
-rw-r--r-- | src/gpu/cl/kernels/ClPool2dKernel.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gpu/cl/kernels/ClPool2dKernel.cpp b/src/gpu/cl/kernels/ClPool2dKernel.cpp index 2c98c5940f..83bc6bb442 100644 --- a/src/gpu/cl/kernels/ClPool2dKernel.cpp +++ b/src/gpu/cl/kernels/ClPool2dKernel.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2021 Arm Limited. + * Copyright (c) 2017-2021, 2023 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -182,7 +182,8 @@ void ClPool2dKernel::configure(const ClCompileContext &compile_context, ITensorI } else { - build_opts.add_option("-DINITIAL_VALUE=" + float_to_string_with_full_precision(std::numeric_limits<float>::lowest())); + std::string initial_value = pool_info.use_inf_as_limit ? "(-INFINITY)" : float_to_string_with_full_precision(std::numeric_limits<float>::lowest()); + build_opts.add_option("-DINITIAL_VALUE=" + initial_value); } } else |