diff options
author | Gunes Bayir <gunes.bayir@arm.com> | 2023-09-28 10:30:18 +0100 |
---|---|---|
committer | Gunes Bayir <gunes.bayir@arm.com> | 2023-10-02 16:07:22 +0000 |
commit | c2a51bd2cc7c4148d9444e7377af44b2f6c264ba (patch) | |
tree | e8f66188d7e048a3f61d660c236ef66b33a0bf35 /src | |
parent | a396da19ee6e5c36ae07c11e4f16a6787e9bc143 (diff) | |
download | ComputeLibrary-c2a51bd2cc7c4148d9444e7377af44b2f6c264ba.tar.gz |
Optimize CL and Neon Winograd tests
Several test optimizations have been introduced into Winograd tests for Gpu and Cpu backends. The testing strategy has been detailed as a comment header in the test design files.
In summary
- Very large shapes in the nightly are made smaller
- If the underlying kernel is the same for different data types, we only need to stress some key aspects of the kernels (e.g. read/write lengths in case of fp32/fp16).
- In case the underlying kernel is the same (OpenCL), Fp16 is tested on a subset of the shapes
- In Cpu, there is no need to test every combination for both NCHW and NHWC as we just permute the inputs and use NHWC kernels anyways
- All activations does not need to be tested for each and every shape
Resolves: COMPMID-6464
Change-Id: Ie25fded85c65b9c7386dc21b23f9b695b1e77b07
Signed-off-by: Gunes Bayir <gunes.bayir@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10393
Reviewed-by: Jakub Sujak <jakub.sujak@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/cpu/operators/CpuWinogradConv2d.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/cpu/operators/CpuWinogradConv2d.h b/src/cpu/operators/CpuWinogradConv2d.h index 7e1d952462..ba9b879431 100644 --- a/src/cpu/operators/CpuWinogradConv2d.h +++ b/src/cpu/operators/CpuWinogradConv2d.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Arm Limited. + * Copyright (c) 2021-2023 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -21,16 +21,16 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#ifndef ARM_COMPUTE_CPU_WINOGRAD_CONV2D_KERNEL_H -#define ARM_COMPUTE_CPU_WINOGRAD_CONV2D_KERNEL_H +#ifndef ACL_SRC_CPU_OPERATORS_CPUWINOGRADCONV2D_H +#define ACL_SRC_CPU_OPERATORS_CPUWINOGRADCONV2D_H #include "arm_compute/core/TensorInfo.h" #include "arm_compute/runtime/FunctionDescriptors.h" #include "src/core/common/Macros.h" #include "src/cpu/ICpuOperator.h" -#include "src/cpu/kernels/assembly/gemm_common.hpp" #include "src/cpu/kernels/CpuWinogradConv2dKernel.h" +#include "src/cpu/kernels/assembly/gemm_common.hpp" #include "src/cpu/operators/CpuActivation.h" #include "src/cpu/operators/CpuGemm.h" #include "src/cpu/operators/CpuPermute.h" @@ -65,7 +65,7 @@ public: * while every optional dimension from 4 and above represent a batch of inputs. * Data types supported: F16/F32. * @param[in] weights Weights tensor Info. Weights are 4D tensor with dimensions [kernel_x, kernel_y, IFM, OFM]. Data type supported: Same as @p input. - * Currently only 3x3 and 5x5 kernels are supported. + * For supported kernel sizes, see @ref arm_compute::NEWinogradConvolutionLayer * @param[in] biases Biases tensor Info. Shared biases supported. Biases are 1D tensor with dimensions [OFM]. Data type supported: Same as @p weights. * @param[out] dst Destination tensor Info. 3 lower dimensions represent a single output [width, height, OFM], while the rest represent batch of outputs. * Data types supported: Same as @p input. @@ -96,8 +96,8 @@ public: bool enable_fast_math = false); // Inherited methods overridden: - void run(ITensorPack &tensors) override; - void prepare(ITensorPack &constants) override; + void run(ITensorPack &tensors) override; + void prepare(ITensorPack &constants) override; experimental::MemoryRequirements workspace() const override; private: @@ -124,9 +124,9 @@ private: std::unique_ptr<CpuPermute> _permute_input; std::unique_ptr<CpuPermute> _permute_output; std::unique_ptr<CpuPermute> _permute_weights; - experimental::MemoryRequirements _aux_mem{Count}; + experimental::MemoryRequirements _aux_mem{ Count }; std::unique_ptr<arm_conv::ConvolutionArgs> - _conv_args; // Make it unique ptr because this type does not have a default constructor + _conv_args; // Make it unique ptr because this type does not have a default constructor arm_conv::winograd::WinogradImpl _winograd_impl; DataLayout _data_layout; TensorInfo _winograd_transformed_input; @@ -143,4 +143,4 @@ private: } // namespace cpu } // namespace arm_compute -#endif /* ARM_COMPUTE_CPU_WINOGRAD_CONV2D_KERNEL_H */ +#endif // ACL_SRC_CPU_OPERATORS_CPUWINOGRADCONV2D_H |