From 232c45253a84c16fc70eae6406cac5f4048efaca Mon Sep 17 00:00:00 2001 From: Giorgio Arena Date: Thu, 3 Mar 2022 10:09:01 +0000 Subject: Merge kernel prototype patch Resolves: COMPMID-5151 Signed-off-by: Giorgio Arena Change-Id: Ic4024d5cd4819fe917a1d49621f1866ae2e90a37 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/7260 Tested-by: Arm Jenkins Reviewed-by: SiCong Li Comments-Addressed: Arm Jenkins --- src/core/CL/CLCompileContext.cpp | 7 +++++- src/core/CL/ICLKernel.h | 25 ++++++++++++++++++++-- .../fp_post_ops_act_eltwise_op_act.h | 4 ++-- .../act_eltwise_op_act/gemm_mm_native.cl | 7 ++++-- .../fp_mixed_precision_helpers.h | 4 ++-- 5 files changed, 38 insertions(+), 9 deletions(-) (limited to 'src/core/CL') diff --git a/src/core/CL/CLCompileContext.cpp b/src/core/CL/CLCompileContext.cpp index c9dd13e25c..b9b2b5651a 100644 --- a/src/core/CL/CLCompileContext.cpp +++ b/src/core/CL/CLCompileContext.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2021 Arm Limited. + * Copyright (c) 2020-2022 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -74,6 +74,11 @@ const CLBuildOptions::StringSet &CLBuildOptions::options() const return _build_opts; } +bool CLBuildOptions::operator==(const CLBuildOptions &other) const +{ + return _build_opts == other._build_opts; +} + Program::Program() : _context(), _device(), _is_binary(false), _name(), _source(), _binary() { diff --git a/src/core/CL/ICLKernel.h b/src/core/CL/ICLKernel.h index bc138e7e3f..4c8028e42a 100644 --- a/src/core/CL/ICLKernel.h +++ b/src/core/CL/ICLKernel.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2021 Arm Limited. + * Copyright (c) 2016-2022 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -37,6 +37,20 @@ #include +#if defined(ENABLE_EXPERIMENTAL_DYNAMIC_FUSION) +namespace arm_compute +{ +namespace experimental +{ +namespace dynamic_fusion +{ +struct TensorBinding; +struct ClExecutionDescriptor; +} // namespace dynamic_fusion +} // namespace experimental +} // namespace arm_compute +#endif // defined(ENABLE_EXPERIMENTAL_DYNAMIC_FUSION) + namespace arm_compute { namespace @@ -63,7 +77,6 @@ template class ICLArray; class ICLTensor; class Window; - /** Common interface for all the OpenCL kernels */ class ICLKernel : public IKernel { @@ -323,6 +336,14 @@ public: { ARM_COMPUTE_UNUSED(tensors, window, queue); } + +#if defined(ENABLE_EXPERIMENTAL_DYNAMIC_FUSION) + /// The execution is carried out through run_op method. But the run_op method needs to be extended to include ClExecutionDescriptor as now LWS GWS tuning will be separated from the IKernel + virtual void run_composite_op(experimental::dynamic_fusion::TensorBinding &tensors, const Window &window, cl::CommandQueue &queue, const experimental::dynamic_fusion::ClExecutionDescriptor &exec_desc) + { + ARM_COMPUTE_UNUSED(tensors, window, queue, exec_desc); + } +#endif // defined(ENABLE_EXPERIMENTAL_DYNAMIC_FUSION) /** Add the passed parameters to the object's kernel's arguments starting from the index idx. * * @param[in,out] idx Index at which to start adding the arguments. Will be incremented by the number of kernel arguments set. diff --git a/src/core/CL/cl_kernels/common/experimental/gemm_fused_post_ops/act_eltwise_op_act/fp_post_ops_act_eltwise_op_act.h b/src/core/CL/cl_kernels/common/experimental/gemm_fused_post_ops/act_eltwise_op_act/fp_post_ops_act_eltwise_op_act.h index 070c47bd7f..2c2d60ed13 100644 --- a/src/core/CL/cl_kernels/common/experimental/gemm_fused_post_ops/act_eltwise_op_act/fp_post_ops_act_eltwise_op_act.h +++ b/src/core/CL/cl_kernels/common/experimental/gemm_fused_post_ops/act_eltwise_op_act/fp_post_ops_act_eltwise_op_act.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Arm Limited. + * Copyright (c) 2021-2022 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#include "fp_mixed_precision_helpers.h" +#include "common/experimental/gemm_fused_post_ops/fp_mixed_precision_helpers.h" /** (EXPERIMENTAL_POST_OPS) Post Op expansions for the post op sequence: * act (optional): POST_OP1_ACTIVATION_OPTIONAL diff --git a/src/core/CL/cl_kernels/common/experimental/gemm_fused_post_ops/act_eltwise_op_act/gemm_mm_native.cl b/src/core/CL/cl_kernels/common/experimental/gemm_fused_post_ops/act_eltwise_op_act/gemm_mm_native.cl index d8453ed80a..22ae098772 100644 --- a/src/core/CL/cl_kernels/common/experimental/gemm_fused_post_ops/act_eltwise_op_act/gemm_mm_native.cl +++ b/src/core/CL/cl_kernels/common/experimental/gemm_fused_post_ops/act_eltwise_op_act/gemm_mm_native.cl @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Arm Limited. + * Copyright (c) 2021-2022 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -22,7 +22,10 @@ * SOFTWARE. */ -#include "fp_post_ops_act_eltwise_op_act.h" +#include "common/experimental/gemm_fused_post_ops/act_eltwise_op_act/fp_post_ops_act_eltwise_op_act.h" +#include "common/experimental/gemm_fused_post_ops/fp_elementwise_op_helpers.h" +#include "common/experimental/gemm_fused_post_ops/fp_mixed_precision_helpers.h" + #include "gemm_helpers.h" #include "repeat.h" diff --git a/src/core/CL/cl_kernels/common/experimental/gemm_fused_post_ops/fp_mixed_precision_helpers.h b/src/core/CL/cl_kernels/common/experimental/gemm_fused_post_ops/fp_mixed_precision_helpers.h index e8df121142..e107f4452d 100644 --- a/src/core/CL/cl_kernels/common/experimental/gemm_fused_post_ops/fp_mixed_precision_helpers.h +++ b/src/core/CL/cl_kernels/common/experimental/gemm_fused_post_ops/fp_mixed_precision_helpers.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Arm Limited. + * Copyright (c) 2021-2022 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#include "fp_elementwise_op_helpers.h" +#include "common/experimental/gemm_fused_post_ops/fp_elementwise_op_helpers.h" #include "gemm_helpers.h" #include "load_store_utility.h" -- cgit v1.2.1