From d05dce46a14a7b67f322328ecd95bf96bdd30bae Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Mon, 22 Jan 2018 16:29:17 +0000 Subject: COMPMID-791: Generic Depthwise Convolution Layer NEON QASYMM8 Change-Id: I33cf54e68f6c097ac58b6f16c3f9a720978f09cd Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/117289 Tested-by: Jenkins Reviewed-by: Michalis Spyrou Reviewed-by: Anthony Barbier --- .../NEON/kernels/NEDepthwiseVectorToTensorKernel.h | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'arm_compute/core/NEON/kernels/NEDepthwiseVectorToTensorKernel.h') diff --git a/arm_compute/core/NEON/kernels/NEDepthwiseVectorToTensorKernel.h b/arm_compute/core/NEON/kernels/NEDepthwiseVectorToTensorKernel.h index 19000905b0..458cbd7812 100644 --- a/arm_compute/core/NEON/kernels/NEDepthwiseVectorToTensorKernel.h +++ b/arm_compute/core/NEON/kernels/NEDepthwiseVectorToTensorKernel.h @@ -56,7 +56,7 @@ public: NEDepthwiseVectorToTensorKernel &operator=(NEDepthwiseVectorToTensorKernel &&) = default; /** Set the input and output of the kernel. * - * @param[in] input The input vector to convert. Data type supported: F32. + * @param[in] input The input vector to convert. Data type supported: QASYMM8/S32/F32. * @param[out] output The output tensor. 3 lower dimensions represent a single input [width, height, IFM]. Data type supported: same as @p input. * @param[in] conv_w The converted tensor's width. * @param[in] conv_h The converted tensor's height. @@ -67,8 +67,22 @@ public: void run(const Window &window, const ThreadInfo &info) override; private: - const ITensor *_input; - ITensor *_output; + /** Template function to run the vector to tensor reshape used for the depthwise convolution layer case + * + * @param[in] window Region on which to execute the kernel. (Must be a valid region of the window returned by window()). + */ + template + void vector_to_tensor(const Window &window); + /** Common signature for all the specialised depthwise vector to tensor functions + * + * @param[in] window Region on which to execute the kernel. + */ + using DepthwiseVectorToTensorFunctionPtr = void (NEDepthwiseVectorToTensorKernel::*)(const Window &window); + +private: + DepthwiseVectorToTensorFunctionPtr _func; + const ITensor *_input; + ITensor *_output; std::pair _conv_dims; }; } // arm_compute -- cgit v1.2.1