diff options
author | Gian Marco Iodice <gianmarco.iodice@arm.com> | 2022-05-30 14:41:49 +0100 |
---|---|---|
committer | Gian Marco Iodice <gianmarco.iodice@arm.com> | 2022-07-08 13:48:51 +0000 |
commit | 2cc50b39613cea5e55c8a4851ee08d284a3d4f66 (patch) | |
tree | 7faac6aaa4409bb127a9bd8ebc89056dae40066e /src/gpu/cl/kernels/ClDirectConv2dKernel.h | |
parent | 22dd8b9014112fe446cb8cff6d52933d2603a97f (diff) | |
download | ComputeLibrary-2cc50b39613cea5e55c8a4851ee08d284a3d4f66.tar.gz |
Extended direct conv 2d interface for tuning the OpenCl kernel
Resolves COMPMID-5298
Change-Id: Ie9b907e5dcf86aa6add8d08799fa7ba7c264edea
Signed-off-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/7888
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: SiCong Li <sicong.li@arm.com>
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/gpu/cl/kernels/ClDirectConv2dKernel.h')
-rw-r--r-- | src/gpu/cl/kernels/ClDirectConv2dKernel.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/gpu/cl/kernels/ClDirectConv2dKernel.h b/src/gpu/cl/kernels/ClDirectConv2dKernel.h index 5681927816..0cb8aebbe1 100644 --- a/src/gpu/cl/kernels/ClDirectConv2dKernel.h +++ b/src/gpu/cl/kernels/ClDirectConv2dKernel.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2021 Arm Limited. + * Copyright (c) 2017-2022 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -30,6 +30,9 @@ namespace arm_compute { +// Forward declaration +struct DirectConvComputeKernelInfo; + namespace opencl { namespace kernels @@ -62,9 +65,10 @@ public: * The 3rd dimensions must be equal to the 4th dimension of the @p kernels tensor. Data types supported: Same as @p src. * @param[in] conv_info Contains padding and stride information described in @ref PadStrideInfo. * @param[in] act_info Contains activaton information described in @ref ActivationLayerInfo. + * @param[in] desc Direct convolution descriptor used to build the NHWC direct convolution kernel. For NCHW, this parameter is ignored. */ void configure(const CLCompileContext &compile_context, ITensorInfo *src, ITensorInfo *weights, ITensorInfo *biases, ITensorInfo *dst, - const PadStrideInfo &conv_info, const ActivationLayerInfo &act_info); + const PadStrideInfo &conv_info, const ActivationLayerInfo &act_info, const DirectConvComputeKernelInfo &desc); /** Static function to check if given info will lead to a valid configuration * * Similar to ClDirectConv2dKernel::configure() @@ -72,7 +76,7 @@ public: * @return a status */ static Status validate(const ITensorInfo *src, const ITensorInfo *weights, const ITensorInfo *biases, const ITensorInfo *dst, - const PadStrideInfo &conv_info, const ActivationLayerInfo &act_info); + const PadStrideInfo &conv_info, const ActivationLayerInfo &act_info, const DirectConvComputeKernelInfo &desc); // Inherited methods overridden: void run_op(ITensorPack &tensors, const Window &window, cl::CommandQueue &queue) override; @@ -80,6 +84,7 @@ public: public: DataLayout _data_layout{}; PadStrideInfo _conv_info{}; + bool _export_to_cl_image{ false }; }; } // namespace kernels } // namespace opencl |