aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/core/NEON
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2020-07-13 21:21:33 +0100
committerGeorgios Pinitas <georgios.pinitas@arm.com>2020-07-14 14:28:46 +0000
commit4667dddc0ed403c636348294cd7f70261e5540cf (patch)
tree177b74f377dcbb32cf8a83d407c633df255665a0 /arm_compute/core/NEON
parent2232a201a9f72de483c12a7857c5f08b81cf7396 (diff)
downloadComputeLibrary-4667dddc0ed403c636348294cd7f70261e5540cf.tar.gz
COMPMID-3374: Remove memory state from NEConcatenateLayer kernels
* Allow the following kernels to accept backing memory at run-time: * NEBatchConcatenateLayerKernel * NEDepthConcatenateLayerKernel * NEHeightConcatenateLayerKernel * NEWidthConcatenateLayerKernel * Allow the following functions to accept backing memory at run-time: * NEConcatenateLayer Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com> Change-Id: Ib0b6714cff7f06a52dc74d294bc3e0d72a1c2419 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3569 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Michalis Spyrou <michalis.spyrou@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/core/NEON')
-rw-r--r--arm_compute/core/NEON/kernels/NEBatchConcatenateLayerKernel.h11
-rw-r--r--arm_compute/core/NEON/kernels/NEDepthConcatenateLayerKernel.h11
-rw-r--r--arm_compute/core/NEON/kernels/NEHeightConcatenateLayerKernel.h15
-rw-r--r--arm_compute/core/NEON/kernels/NEWidthConcatenateLayerKernel.h16
4 files changed, 24 insertions, 29 deletions
diff --git a/arm_compute/core/NEON/kernels/NEBatchConcatenateLayerKernel.h b/arm_compute/core/NEON/kernels/NEBatchConcatenateLayerKernel.h
index 267211fad6..f397a29b48 100644
--- a/arm_compute/core/NEON/kernels/NEBatchConcatenateLayerKernel.h
+++ b/arm_compute/core/NEON/kernels/NEBatchConcatenateLayerKernel.h
@@ -56,15 +56,15 @@ public:
~NEBatchConcatenateLayerKernel() = default;
/** Initialise the kernel's inputs and output
*
- * @param[in] input Input tensor. Data types supported: All.
+ * @param[in] input Input tensor info. Data types supported: All.
* @param[in] batch_offset The offset on axis # 3.
- * @param[in,out] output Output tensor. Data types supported: Same as @p input.
+ * @param[in,out] output Output tensor info. Data types supported: Same as @p input.
*
* @note: The output tensor's low two dimensions can't be smaller than the input one's.
* @note: The gaps between the two lowest dimensions of input and output need to be divisible by 2.
*
*/
- void configure(const ITensor *input, unsigned int batch_offset, ITensor *output);
+ void configure(const ITensorInfo *input, unsigned int batch_offset, ITensorInfo *output);
/** Static function to check if given info will lead to a valid configuration of @ref NEBatchConcatenateLayerKernel
*
* @param[in] input Input tensor info. Data types supported: All.
@@ -76,15 +76,14 @@ public:
static Status validate(const ITensorInfo *input, unsigned int batch_offset, const ITensorInfo *output);
// Inherited methods overridden:
- void run(const Window &window, const ThreadInfo &info) override;
+ void run_op(const InputTensorMap &inputs, const OutputTensorMap &outputs,
+ const Window &window, const ThreadInfo &info) override;
private:
using BatchConcatFunction = void(const ITensor *in, ITensor *out, unsigned int batch_offset, const Window &window);
private:
BatchConcatFunction *_func;
- const ITensor *_input;
- ITensor *_output;
unsigned int _batch_offset;
};
} // namespace arm_compute
diff --git a/arm_compute/core/NEON/kernels/NEDepthConcatenateLayerKernel.h b/arm_compute/core/NEON/kernels/NEDepthConcatenateLayerKernel.h
index a465146184..e1aaa59f25 100644
--- a/arm_compute/core/NEON/kernels/NEDepthConcatenateLayerKernel.h
+++ b/arm_compute/core/NEON/kernels/NEDepthConcatenateLayerKernel.h
@@ -56,15 +56,15 @@ public:
~NEDepthConcatenateLayerKernel() = default;
/** Initialise the kernel's inputs and output
*
- * @param[in] input Input tensor. Data types supported: QASYMM8/QASYMM8_SIGNED/F16/F32.
+ * @param[in] input Input tensor info. Data types supported: QASYMM8/QASYMM8_SIGNED/F16/F32.
* @param[in] depth_offset The offset on the Z axis.
- * @param[in,out] output Output tensor. Data types supported: Same as @p input.
+ * @param[in,out] output Output tensor info. Data types supported: Same as @p input.
*
* @note: The output tensor's low two dimensions can't be smaller than the input one's.
* @note: The gaps between the two lowest dimensions of input and output need to be divisible by 2.
*
*/
- void configure(const ITensor *input, unsigned int depth_offset, ITensor *output);
+ void configure(const ITensorInfo *input, unsigned int depth_offset, ITensorInfo *output);
/** Static function to check if given info will lead to a valid configuration of @ref NEDepthConcatenateLayerKernel
*
* @param[in] input Input tensor info. Data types supported: QASYMM8/QASYMM8_SIGNED/F16/F32.
@@ -76,15 +76,14 @@ public:
static Status validate(const ITensorInfo *input, unsigned int depth_offset, const ITensorInfo *output);
// Inherited methods overridden:
- void run(const Window &window, const ThreadInfo &info) override;
+ void run_op(const InputTensorMap &inputs, const OutputTensorMap &outputs,
+ const Window &window, const ThreadInfo &info) override;
private:
using DepthConcatFunction = void(const ITensor *in, ITensor *out, unsigned int depth_offset, const Window &window);
private:
DepthConcatFunction *_func;
- const ITensor *_input;
- ITensor *_output;
unsigned int _depth_offset;
};
} // namespace arm_compute
diff --git a/arm_compute/core/NEON/kernels/NEHeightConcatenateLayerKernel.h b/arm_compute/core/NEON/kernels/NEHeightConcatenateLayerKernel.h
index e8a9d9ad94..d463b53e2c 100644
--- a/arm_compute/core/NEON/kernels/NEHeightConcatenateLayerKernel.h
+++ b/arm_compute/core/NEON/kernels/NEHeightConcatenateLayerKernel.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019 Arm Limited.
+ * Copyright (c) 2019-2020 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -57,12 +57,12 @@ public:
~NEHeightConcatenateLayerKernel() = default;
/** Initialise the kernel's inputs and output
*
- * @param[in] input Input tensor. Data types supported: All
+ * @param[in] input Input tensor info. Data types supported: All
* @param[in] height_offset The starting offset on the Y axis for the output tensor.
- * @param[in,out] output Output tensor. Data types supported: Same as @p input.
+ * @param[in,out] output Output tensor info. Data types supported: Same as @p input.
*
*/
- void configure(const ITensor *input, unsigned int height_offset, ITensor *output);
+ void configure(const ITensorInfo *input, unsigned int height_offset, ITensorInfo *output);
/** Static function to check if given info will lead to a valid configuration of @ref NEHeightConcatenateLayerKernel
*
* @param[in] input Input tensor info. Data types supported: All
@@ -74,12 +74,11 @@ public:
static Status validate(const ITensorInfo *input, unsigned int height_offset, const ITensorInfo *output);
// Inherited methods overridden:
- void run(const Window &window, const ThreadInfo &info) override;
+ void run_op(const InputTensorMap &inputs, const OutputTensorMap &outputs,
+ const Window &window, const ThreadInfo &info) override;
private:
- const ITensor *_input;
- ITensor *_output;
- unsigned int _height_offset;
+ unsigned int _height_offset;
};
} // namespace arm_compute
#endif /* ARM_COMPUTE_NEHEIGHTCONCATENATELAYERKERNEL_H */
diff --git a/arm_compute/core/NEON/kernels/NEWidthConcatenateLayerKernel.h b/arm_compute/core/NEON/kernels/NEWidthConcatenateLayerKernel.h
index 442d35c656..b5336ad026 100644
--- a/arm_compute/core/NEON/kernels/NEWidthConcatenateLayerKernel.h
+++ b/arm_compute/core/NEON/kernels/NEWidthConcatenateLayerKernel.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2019 Arm Limited.
+ * Copyright (c) 2018-2020 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -57,12 +57,11 @@ public:
~NEWidthConcatenateLayerKernel() = default;
/** Initialise the kernel's inputs and output
*
- * @param[in] input Input tensor. Data types supported: All
+ * @param[in] input Input tensor info. Data types supported: All
* @param[in] width_offset The offset on the X axis.
- * @param[in,out] output Output tensor. Data types supported: Same as @p input.
- *
+ * @param[in,out] output Output tensor info. Data types supported: Same as @p input.
*/
- void configure(const ITensor *input, unsigned int width_offset, ITensor *output);
+ void configure(const ITensorInfo *input, unsigned int width_offset, ITensorInfo *output);
/** Static function to check if given info will lead to a valid configuration of @ref NEWidthConcatenateLayerKernel
*
* @param[in] input Input tensor info. Data types supported: All
@@ -74,12 +73,11 @@ public:
static Status validate(const ITensorInfo *input, unsigned int width_offset, const ITensorInfo *output);
// Inherited methods overridden:
- void run(const Window &window, const ThreadInfo &info) override;
+ void run_op(const InputTensorMap &inputs, const OutputTensorMap &outputs,
+ const Window &window, const ThreadInfo &info) override;
private:
- const ITensor *_input;
- ITensor *_output;
- unsigned int _width_offset;
+ unsigned int _width_offset;
};
} // namespace arm_compute
#endif /* ARM_COMPUTE_NEWIDTHCONCATENATELAYERKERNEL_H */