diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2019-01-09 18:35:17 +0000 |
---|---|---|
committer | Georgios Pinitas <georgios.pinitas@arm.com> | 2019-01-18 13:41:40 +0000 |
commit | 7cd26d4a1b14bc4bf7c61496803416ab3d84791f (patch) | |
tree | 12cc4a27d7ecebc69a43e96b1f46c7eb05437978 /arm_compute/core/NEON/kernels/assembly/Helpers.h | |
parent | 3ac2f3a1d9297220d1b0ce920dd13fdd4edcc187 (diff) | |
download | ComputeLibrary-7cd26d4a1b14bc4bf7c61496803416ab3d84791f.tar.gz |
COMPMID-1867: Add NEON/SVE GEMM Hybrid kernels.
Change-Id: Ib40a9921e7f9a6a8be6c38872d6b3a0f24ed0cd3
Reviewed-on: https://review.mlplatform.org/515
Reviewed-by: Anthony Barbier <Anthony.barbier@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/core/NEON/kernels/assembly/Helpers.h')
-rw-r--r-- | arm_compute/core/NEON/kernels/assembly/Helpers.h | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/arm_compute/core/NEON/kernels/assembly/Helpers.h b/arm_compute/core/NEON/kernels/assembly/Helpers.h index 11c4c08086..e2a46e96a3 100644 --- a/arm_compute/core/NEON/kernels/assembly/Helpers.h +++ b/arm_compute/core/NEON/kernels/assembly/Helpers.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 ARM Limited. + * Copyright (c) 2018-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -27,6 +27,9 @@ #include "arm_compute/core/CPP/CPPTypes.h" #include "arm_compute/core/Utils.h" +#include "arm_compute/core/NEON/kernels/assembly/INEGEMMWrapperKernel.h" +#include "arm_compute/core/NEON/kernels/assembly/arm_gemm.hpp" + namespace arm_compute { /** Block sizes to use to break the M, N, K dimension */ @@ -38,31 +41,29 @@ struct BlockSizes unsigned int strategy_out_height{ 0 }; /**< Number of rows (M) processed by the selected strategy */ }; -/** Calculate the recommended block sizes to use based on the CPU cache sizes and data type - * - * @param[in] ci CPU information - * @param[in] M M dimension. - * @param[in] N N dimension. - * @param[in] K K dimension. - * @param[in] input_type Input data type - * @param[in] use_dot (Optional) If data_type is QASYMM8/U8/S8, then use the dot product instruction ? - * - * @return Recommeded block sizes to use for the given M, N, K dimensions. - */ -BlockSizes calculate_block_sizes_from_data_type(const CPUInfo &ci, unsigned int M, unsigned int N, unsigned int K, DataType input_type, bool use_dot = false); - -/** Get the name of the GEMM strategy which will be used for a given input type +/** Extracts the kernel description of the selected kernel by the GEMM backend heuristics * - * @param[in] input_type Input data type - * @param[in] use_dot (Optional) If data_type is QASYMM8/U8/S8, then use the dot product instruction ? + * @param[in] input_type Data type of the input tensor. + * @param[in] ci CPU information. + * @param[in] num_threads Maximum number of threads that might be used for the calculations. + * @param[in] p M, N, K sizes. + * @param[in] alpha Alpha value. + * @param[in] beta Beta value. + * @param[in] pretranspose_hint Is B also pretransposed ? * - * @return The name of the strategy that will be used + * @return Kernel description that the assembly heuristics picked for the given configuration */ -const char *get_strategy_name(DataType input_type, bool use_dot = false); +arm_gemm::KernelDescription get_gemm_info(DataType input_type, + const CPUInfo &ci, + const unsigned int num_threads, + const INEGEMMWrapperKernel::Params &p, + float alpha, + float beta, + bool pretranspose_hint); /** Calculate the recommended block sizes to use based on the CPU cache sizes and the strategy which will be used * - * @param[in] ci CPU information + * @param[in] ci CPU information. * @param[in] M M dimension. * @param[in] N N dimension. * @param[in] K K dimension. |