diff options
author | Gian Marco Iodice <gianmarco.iodice@arm.com> | 2018-07-26 11:44:03 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:54:54 +0000 |
commit | 68a3f56627b04acdefebe67d645727dd83889766 (patch) | |
tree | 4a3f4dc0facfda861a5ba7afa29d84d82d0829c2 /arm_compute/core/CL | |
parent | 4e0d3819be6c61cc00c7e0fa9b4b740738c703b7 (diff) | |
download | ComputeLibrary-68a3f56627b04acdefebe67d645727dd83889766.tar.gz |
COMPMID-1276 - Allow GEMM to work with 3D input tensor
Skipped im2col in CLGEMMConvolutionLayer for 1x1 convolutions with NHWC data layout
Change-Id: I894e6b952ed8605e8f3ffc0ffc25c24730d4664c
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/141909
Tested-by: Jenkins <bsgcomp@arm.com>
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'arm_compute/core/CL')
-rw-r--r-- | arm_compute/core/CL/kernels/CLGEMMInterleave4x4Kernel.h | 7 | ||||
-rw-r--r-- | arm_compute/core/CL/kernels/CLGEMMMatrixMultiplyKernel.h | 3 |
2 files changed, 7 insertions, 3 deletions
diff --git a/arm_compute/core/CL/kernels/CLGEMMInterleave4x4Kernel.h b/arm_compute/core/CL/kernels/CLGEMMInterleave4x4Kernel.h index 7f8e766f1a..4592fc2921 100644 --- a/arm_compute/core/CL/kernels/CLGEMMInterleave4x4Kernel.h +++ b/arm_compute/core/CL/kernels/CLGEMMInterleave4x4Kernel.h @@ -67,17 +67,19 @@ public: * @param[in] input Input tensor. Data types supported: U8/S8/QASYMM8/U16/S16/F16/U32/S32/F32 * @param[out] output Output tensor. Data type supported: same as @p input * @param[in] mult_interleave4x4_height (Optional) Multiplication factor for the height of the 4x4 interleave block + * @param[in] reinterpret_input_as_3d (Optional) True if the input has to be reinterpreted as 3D tensor */ - void configure(const ICLTensor *input, ICLTensor *output, int mult_interleave4x4_height = 1); + void configure(const ICLTensor *input, ICLTensor *output, int mult_interleave4x4_height = 1, bool reinterpret_input_as_3d = false); /** Static function to check if given info will lead to a valid configuration of @ref CLGEMMInterleave4x4Kernel * * @param[in] input Input tensor info. Data types supported: U8/S8/QASYMM8/U16/S16/F16/U32/S32/F32 * @param[in] output Output tensor info which stores the interleaved matrix. Data type supported: same as @p input. * @param[in] mult_interleave4x4_height Multiplication factor for the height of the 4x4 interleave block + * @param[in] reinterpret_input_as_3d (Optional) True if the input has to be reinterpreted as 3D tensor * * @return a status */ - static Status validate(const ITensorInfo *input, const ITensorInfo *output, int mult_interleave4x4_height); + static Status validate(const ITensorInfo *input, const ITensorInfo *output, int mult_interleave4x4_height, bool reinterpret_input_as_3d); // Inherited methods overridden void run(const Window &window, cl::CommandQueue &queue) override; @@ -85,6 +87,7 @@ public: private: const ICLTensor *_input; ICLTensor *_output; + bool _reinterpret_input_as_3d; }; } // namespace arm_compute #endif /* __ARM_COMPUTE_CLGEMMINTERLEAVE4X4KERNEL_H__ */ diff --git a/arm_compute/core/CL/kernels/CLGEMMMatrixMultiplyKernel.h b/arm_compute/core/CL/kernels/CLGEMMMatrixMultiplyKernel.h index 1b6a0c87a9..e030fa2d2a 100644 --- a/arm_compute/core/CL/kernels/CLGEMMMatrixMultiplyKernel.h +++ b/arm_compute/core/CL/kernels/CLGEMMMatrixMultiplyKernel.h @@ -85,7 +85,8 @@ public: const ICLTensor *_input1; ICLTensor *_output; bool _slide_matrix_b; - bool _is_gemm3d; + bool _reinterpret_input_as_3d; + bool _reinterpret_output_as_3d; }; } // namespace arm_compute #endif /* __ARM_COMPUTE_CLGEMMMATRIXMULTIPLYKERNEL_H__ */ |