aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/runtime/CL/functions/CLGenerateProposalsLayer.h
diff options
context:
space:
mode:
Diffstat (limited to 'arm_compute/runtime/CL/functions/CLGenerateProposalsLayer.h')
-rw-r--r--arm_compute/runtime/CL/functions/CLGenerateProposalsLayer.h57
1 files changed, 41 insertions, 16 deletions
diff --git a/arm_compute/runtime/CL/functions/CLGenerateProposalsLayer.h b/arm_compute/runtime/CL/functions/CLGenerateProposalsLayer.h
index 0fb9a06c84..3a201e79b0 100644
--- a/arm_compute/runtime/CL/functions/CLGenerateProposalsLayer.h
+++ b/arm_compute/runtime/CL/functions/CLGenerateProposalsLayer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019-2020 Arm Limited.
+ * Copyright (c) 2019-2021 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -27,6 +27,7 @@
#include "arm_compute/core/Types.h"
#include "arm_compute/runtime/CL/CLScheduler.h"
#include "arm_compute/runtime/CL/CLTensor.h"
+#include "arm_compute/runtime/CL/functions/CLPermute.h"
#include "arm_compute/runtime/CL/functions/CLReshapeLayer.h"
#include "arm_compute/runtime/CPP/CPPScheduler.h"
#include "arm_compute/runtime/CPP/functions/CPPBoxWithNonMaximaSuppressionLimit.h"
@@ -39,24 +40,23 @@ namespace arm_compute
{
class CLCompileContext;
class CLBoundingBoxTransformKernel;
-class CLDequantizationLayerKernel;
+class CLDequantizationLayer;
class CLComputeAllAnchorsKernel;
class CLPadLayerKernel;
-class CLPermuteKernel;
-class CLQuantizationLayerKernel;
+class CLQuantizationLayer;
class ICLTensor;
class ITensorInfo;
/** Basic function to generate proposals for a RPN (Region Proposal Network)
*
* This function calls the following OpenCL kernels:
- * -# @ref CLComputeAllAnchors
+ * -# @ref CLComputeAllAnchorsKernel
* -# @ref CLPermute x 2
* -# @ref CLReshapeLayer x 2
* -# @ref CLBoundingBoxTransform
* -# @ref CLPadLayerKernel
- * -# @ref CLDequantizationLayerKernel x 2
- * -# @ref CLQuantizationLayerKernel
+ * -# @ref CLDequantizationLayer x 2
+ * -# @ref CLQuantizationLayer
* And the following CPP functions:
* -# @ref CPPBoxWithNonMaximaSuppressionLimit
*/
@@ -77,6 +77,16 @@ public:
/** Set the input and output tensors.
*
+ * Valid data layouts:
+ * - All
+ *
+ * Valid data type configurations:
+ * |src0 |src1 |src2 |dst |
+ * |:--------------|:------------------|:--------|:--------------|
+ * |F16 |F16 |F16 |F16 |
+ * |F32 |F32 |F32 |F32 |
+ * |QASYMM8 |QSYMM8 |QSYMM16 |QASYMM8 |
+ *
* @param[in] scores Scores from convolution layer of size (W, H, A), where H and W are the height and width of the feature map, and A is the number of anchors.
* Data types supported: QASYMM8/F16/F32
* @param[in] deltas Bounding box deltas from convolution layer of size (W, H, 4*A). Data types supported: Same as @p scores
@@ -90,7 +100,12 @@ public:
* @note Only single image prediction is supported. Height and Width (and scale) of the image will be contained in the @ref GenerateProposalsInfo struct.
* @note Proposals contains all the proposals. Of those, only the first num_valid_proposals are valid.
*/
- void configure(const ICLTensor *scores, const ICLTensor *deltas, const ICLTensor *anchors, ICLTensor *proposals, ICLTensor *scores_out, ICLTensor *num_valid_proposals,
+ void configure(const ICLTensor *scores,
+ const ICLTensor *deltas,
+ const ICLTensor *anchors,
+ ICLTensor *proposals,
+ ICLTensor *scores_out,
+ ICLTensor *num_valid_proposals,
const GenerateProposalsInfo &info);
/** Set the input and output tensors.
*
@@ -108,8 +123,14 @@ public:
* @note Only single image prediction is supported. Height and Width (and scale) of the image will be contained in the @ref GenerateProposalsInfo struct.
* @note Proposals contains all the proposals. Of those, only the first num_valid_proposals are valid.
*/
- void configure(const CLCompileContext &compile_context, const ICLTensor *scores, const ICLTensor *deltas, const ICLTensor *anchors, ICLTensor *proposals, ICLTensor *scores_out,
- ICLTensor *num_valid_proposals, const GenerateProposalsInfo &info);
+ void configure(const CLCompileContext &compile_context,
+ const ICLTensor *scores,
+ const ICLTensor *deltas,
+ const ICLTensor *anchors,
+ ICLTensor *proposals,
+ ICLTensor *scores_out,
+ ICLTensor *num_valid_proposals,
+ const GenerateProposalsInfo &info);
/** Static function to check if given info will lead to a valid configuration of @ref CLGenerateProposalsLayer
*
@@ -125,7 +146,11 @@ public:
*
* @return a Status
*/
- static Status validate(const ITensorInfo *scores, const ITensorInfo *deltas, const ITensorInfo *anchors, const ITensorInfo *proposals, const ITensorInfo *scores_out,
+ static Status validate(const ITensorInfo *scores,
+ const ITensorInfo *deltas,
+ const ITensorInfo *anchors,
+ const ITensorInfo *proposals,
+ const ITensorInfo *scores_out,
const ITensorInfo *num_valid_proposals,
const GenerateProposalsInfo &info);
@@ -137,16 +162,16 @@ private:
MemoryGroup _memory_group;
// OpenCL kernels
- std::unique_ptr<CLPermuteKernel> _permute_deltas_kernel;
+ CLPermute _permute_deltas;
CLReshapeLayer _flatten_deltas;
- std::unique_ptr<CLPermuteKernel> _permute_scores_kernel;
+ CLPermute _permute_scores;
CLReshapeLayer _flatten_scores;
std::unique_ptr<CLComputeAllAnchorsKernel> _compute_anchors_kernel;
std::unique_ptr<CLBoundingBoxTransformKernel> _bounding_box_kernel;
std::unique_ptr<CLPadLayerKernel> _pad_kernel;
- std::unique_ptr<CLDequantizationLayerKernel> _dequantize_anchors;
- std::unique_ptr<CLDequantizationLayerKernel> _dequantize_deltas;
- std::unique_ptr<CLQuantizationLayerKernel> _quantize_all_proposals;
+ std::unique_ptr<CLDequantizationLayer> _dequantize_anchors;
+ std::unique_ptr<CLDequantizationLayer> _dequantize_deltas;
+ std::unique_ptr<CLQuantizationLayer> _quantize_all_proposals;
// CPP functions
CPPBoxWithNonMaximaSuppressionLimit _cpp_nms;