aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/runtime/CL/functions/CLDeconvolutionLayerUpsample.h
diff options
context:
space:
mode:
Diffstat (limited to 'arm_compute/runtime/CL/functions/CLDeconvolutionLayerUpsample.h')
-rw-r--r--arm_compute/runtime/CL/functions/CLDeconvolutionLayerUpsample.h34
1 files changed, 23 insertions, 11 deletions
diff --git a/arm_compute/runtime/CL/functions/CLDeconvolutionLayerUpsample.h b/arm_compute/runtime/CL/functions/CLDeconvolutionLayerUpsample.h
index 2d3dde1ea0..5a2abafe79 100644
--- a/arm_compute/runtime/CL/functions/CLDeconvolutionLayerUpsample.h
+++ b/arm_compute/runtime/CL/functions/CLDeconvolutionLayerUpsample.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2020 ARM Limited.
+ * Copyright (c) 2017-2021 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -24,21 +24,23 @@
#ifndef ARM_COMPUTE_CLDECONVOLUTIONLAYERUPSAMPLE_H
#define ARM_COMPUTE_CLDECONVOLUTIONLAYERUPSAMPLE_H
-#include "arm_compute/runtime/IFunction.h"
-
-#include "arm_compute/core/CL/kernels/CLDeconvolutionLayerUpsampleKernel.h"
-#include "arm_compute/core/CL/kernels/CLMemsetKernel.h"
#include "arm_compute/core/Types.h"
+#include "arm_compute/runtime/CL/functions/CLFill.h"
#include "arm_compute/runtime/IFunction.h"
+#include <memory>
+
namespace arm_compute
{
// Forward declarations
+class CLDeconvolutionLayerUpsampleKernel;
+class CLCompileContext;
class ICLTensor;
+class ITensorInfo;
/** Basic function to execute deconvolution upsample on OpenCL. This function calls the following OpenCL kernels and functions:
*
- * -# @ref CLMemsetKernel
+ * -# @ref CLFill
* -# @ref CLDeconvolutionLayerUpsampleKernel
*/
class CLDeconvolutionLayerUpsample : public IFunction
@@ -55,10 +57,19 @@ public:
/** Allow instances of this class to be moved */
CLDeconvolutionLayerUpsample &operator=(CLDeconvolutionLayerUpsample &&) = default;
/** Default destructor */
- virtual ~CLDeconvolutionLayerUpsample() = default;
+ ~CLDeconvolutionLayerUpsample();
/** Initialize the function's source, destination, interpolation type and border_mode.
*
+ * Valid data layouts:
+ * - NHWC
+ * - NCHW
+ *
+ * Valid data type configurations:
+ * |src |dst |
+ * |:--------------|:--------------|
+ * |All |All |
+ *
* @param[in, out] input Source tensor. Data type supported: All.
* @param[out] output Destination tensor. Data type supported: same as @p input.
* @param[in] info Contains padding and policies to be used in the deconvolution.
@@ -71,7 +82,8 @@ public:
* @param[out] output Destination tensor. Data type supported: same as @p input.
* @param[in] info Contains padding and policies to be used in the deconvolution.
*/
- void configure(const CLCompileContext &compile_context, ICLTensor *input, ICLTensor *output, const PadStrideInfo &info);
+ void
+ configure(const CLCompileContext &compile_context, ICLTensor *input, ICLTensor *output, const PadStrideInfo &info);
/** Static function to check if given info will lead to a valid configuration of @ref CLDeconvolutionLayerUpsample
*
* @param[in] input Source tensor info. Data type supported: All.
@@ -86,9 +98,9 @@ public:
void run() override;
private:
- CLDeconvolutionLayerUpsampleKernel _upsample;
- CLMemsetKernel _memset;
- ICLTensor *_output;
+ std::unique_ptr<CLDeconvolutionLayerUpsampleKernel> _upsample;
+ CLFill _fill;
+ ICLTensor *_output;
};
} // namespace arm_compute
#endif /* ARM_COMPUTE_CLDECONVOLUTIONLAYERUPSAMPLE_H */