aboutsummaryrefslogtreecommitdiff
path: root/arm_compute
diff options
context:
space:
mode:
authorSang-Hoon Park <sang-hoon.park@arm.com>2020-10-01 10:13:07 +0100
committerSang-Hoon Park <sang-hoon.park@arm.com>2020-10-19 08:08:24 +0000
commite4558b501bc4a8e4e731517916a29fb1594d2a78 (patch)
tree1de4af663025100a09a2f39c801eb233003a4942 /arm_compute
parent671d4f01d96b62a24cf0688059118a1e7908650e (diff)
downloadComputeLibrary-e4558b501bc4a8e4e731517916a29fb1594d2a78.tar.gz
COMPMID-3163: Remove padding from NEDepthwiseConvolutionLayerNativeKernel
Change-Id: Ibbd6bee5c6a4ce4f212b207d17a65b9c33bcfa78 Signed-off-by: Sang-Hoon Park <sang-hoon.park@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4106 Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute')
-rw-r--r--arm_compute/core/NEON/kernels/NEDepthwiseConvolutionLayerNativeKernel.h19
-rw-r--r--arm_compute/core/Window.h4
-rw-r--r--arm_compute/runtime/NEON/functions/NEDepthwiseConvolutionLayer.h1
3 files changed, 12 insertions, 12 deletions
diff --git a/arm_compute/core/NEON/kernels/NEDepthwiseConvolutionLayerNativeKernel.h b/arm_compute/core/NEON/kernels/NEDepthwiseConvolutionLayerNativeKernel.h
index 2e29234b6f..335a70fc2b 100644
--- a/arm_compute/core/NEON/kernels/NEDepthwiseConvolutionLayerNativeKernel.h
+++ b/arm_compute/core/NEON/kernels/NEDepthwiseConvolutionLayerNativeKernel.h
@@ -25,7 +25,7 @@
#define ARM_COMPUTE_NEDEPTHWISECONVOLUTIONLAYERNATIVEKERNEL_H
#include "arm_compute/core/NEON/INEKernel.h"
-#include "arm_compute/core/utils/misc/Requires.h"
+#include "arm_compute/core/utils/misc/Traits.h"
#ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC
#include <arm_neon.h>
@@ -92,18 +92,18 @@ public:
// Inherited methods overridden:
void run(const Window &window, const ThreadInfo &info) override;
- BorderSize border_size() const override;
private:
- template < typename T, typename TW, int S, typename std::enable_if < std::is_same<T, float>::value
-#ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC
- || std::is_same<T, float16_t>::value
-#endif // __ARM_FEATURE_FP16_VECTOR_ARITHMETIC
- ,
- int >::type = 0 >
+ template <typename T>
+ using FloatEnalber = typename std::enable_if<arm_compute::utils::traits::is_floating_point<T>::value, int>::type;
+
+ template <typename T, typename TW, FloatEnalber<T> = 0>
void run_depthwise(const Window &window, bool has_biases);
- template < typename T, typename TW, int S, REQUIRES_TA(std::is_same<T, uint8_t>::value || std::is_same<T, int8_t>::value) >
+ template <typename T>
+ using Quantized8bitEnalber = typename std::enable_if < std::is_same<T, uint8_t>::value || std::is_same<T, int8_t>::value, int >::type;
+
+ template <typename T, typename TW, Quantized8bitEnalber<T> = 0>
void run_depthwise(const Window &window, bool has_biases);
/** Common signature for all the specialised depthwise convolution native functions
@@ -113,7 +113,6 @@ private:
using DepthwiseFunctionPtr = void (NEDepthwiseConvolutionLayerNativeKernel::*)(const Window &window, bool has_biases);
DepthwiseFunctionPtr _func;
- BorderSize _border_size;
const ITensor *_input;
const ITensor *_weights;
const ITensor *_biases;
diff --git a/arm_compute/core/Window.h b/arm_compute/core/Window.h
index 2ba5440c68..150320a90e 100644
--- a/arm_compute/core/Window.h
+++ b/arm_compute/core/Window.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2019 Arm Limited.
+ * Copyright (c) 2016-2020 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -45,6 +45,8 @@ public:
static constexpr size_t DimY = 1;
/** Alias for dimension 2 also known as Z dimension */
static constexpr size_t DimZ = 2;
+ /** Alias for dimension 3 also known as W dimension */
+ static constexpr size_t DimW = 3;
/** Default constructor: create a window containing a single element. */
constexpr Window()
diff --git a/arm_compute/runtime/NEON/functions/NEDepthwiseConvolutionLayer.h b/arm_compute/runtime/NEON/functions/NEDepthwiseConvolutionLayer.h
index 3b75bb11a7..c6b98ed435 100644
--- a/arm_compute/runtime/NEON/functions/NEDepthwiseConvolutionLayer.h
+++ b/arm_compute/runtime/NEON/functions/NEDepthwiseConvolutionLayer.h
@@ -249,7 +249,6 @@ private:
private:
NEDepthwiseConvolutionLayerNativeKernel _depthwise_conv_kernel;
- NEFillBorderKernel _fill_border;
NEPermute _permute_input;
NEPermute _permute_weights;
NEPermute _permute_output;