aboutsummaryrefslogtreecommitdiff
path: root/src/cpu/kernels/CpuQuantizeKernel.h
diff options
context:
space:
mode:
authorMohammed Suhail Munshi <MohammedSuhail.Munshi@arm.com>2024-01-30 18:25:51 +0000
committerGunes Bayir <gunes.bayir@arm.com>2024-02-20 11:31:57 +0000
commit0a48c4c83b598991b4d4235f870c24d9e6634b20 (patch)
tree4d0117496c527fd952f435711e5c385023d7068e /src/cpu/kernels/CpuQuantizeKernel.h
parent946905847bf1d82b183e718fddfc7664702e5a84 (diff)
downloadComputeLibrary-0a48c4c83b598991b4d4235f870c24d9e6634b20.tar.gz
Requantization cases for offset changes only
Resolves: [COMPMID-6681] Signed-off-by: Mohammed Suhail Munshi <MohammedSuhail.Munshi@arm.com> Change-Id: I325b9d478dd1d04a45533bb7708cf76e98ee0cee Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/11058 Reviewed-by: Gunes Bayir <gunes.bayir@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/cpu/kernels/CpuQuantizeKernel.h')
-rw-r--r--src/cpu/kernels/CpuQuantizeKernel.h25
1 files changed, 21 insertions, 4 deletions
diff --git a/src/cpu/kernels/CpuQuantizeKernel.h b/src/cpu/kernels/CpuQuantizeKernel.h
index d6714136da..c2f7ac6d9d 100644
--- a/src/cpu/kernels/CpuQuantizeKernel.h
+++ b/src/cpu/kernels/CpuQuantizeKernel.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2022 Arm Limited.
+ * Copyright (c) 2017-2022, 2024 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -21,8 +21,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-#ifndef ARM_COMPUTE_CPU_QUANTIZE_KERNEL_H
-#define ARM_COMPUTE_CPU_QUANTIZE_KERNEL_H
+#ifndef ACL_SRC_CPU_KERNELS_CPUQUANTIZEKERNEL_H
+#define ACL_SRC_CPU_KERNELS_CPUQUANTIZEKERNEL_H
#include "src/core/common/Macros.h"
#include "src/cpu/ICpuKernel.h"
@@ -58,6 +58,15 @@ public:
*/
static Status validate(const ITensorInfo *src, const ITensorInfo *dst);
+ /** Get the preferred dimension in which the scheduler splits the work into multiple jobs.
+ *
+ * @return The split dimension hint.
+ */
+ size_t get_split_dimension_hint() const
+ {
+ return _split_dimension;
+ }
+
// Inherited methods overridden:
void run_op(ITensorPack &tensors, const Window &window, const ThreadInfo &info) override;
const char *name() const override;
@@ -86,9 +95,17 @@ private:
template <typename TIn, typename TOut>
void run_quantize_qsymm8(const ITensor *src, ITensor *dst, const Window &window);
+ template <typename TIn, typename TOut>
+ void run_requantize_offset_only(const ITensor *src, ITensor *dst, const Window &window);
+
+ template <typename TIn, typename TOut>
+ void run_requantize_offset_only_convert(const ITensor *src, ITensor *dst, const Window &window);
+
QuantizeFunctionExecutorPtr _func{nullptr};
+ size_t _split_dimension{Window::DimY};
};
+
} // namespace kernels
} // namespace cpu
} // namespace arm_compute
-#endif /* ARM_COMPUTE_CPU_QUANTIZE_KERNEL_H */
+#endif // ACL_SRC_CPU_KERNELS_CPUQUANTIZEKERNEL_H