21.02
|
Basic function to execute concatenate tensors along a given axis. More...
#include <ClConcatenate.h>
Public Member Functions | |
ClConcatenate () | |
Default constructor. More... | |
void | configure (const ClCompileContext &compile_context, const std::vector< ITensorInfo *> &src_vector, ITensorInfo *dst, size_t axis) |
Initialise the kernel's inputs vector and dst. More... | |
void | run (ITensorPack &tensors) override |
Run the kernels contained in the function. More... | |
Public Member Functions inherited from ICLOperator | |
ICLOperator (IRuntimeContext *ctx=nullptr) | |
Constructor. More... | |
ICLOperator (const ICLOperator &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
ICLOperator (ICLOperator &&)=default | |
Default move constructor. More... | |
ICLOperator & | operator= (const ICLOperator &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
ICLOperator & | operator= (ICLOperator &&)=default |
Default move assignment operator. More... | |
void | prepare (ITensorPack &constants) override |
Prepare the function for executing. More... | |
MemoryRequirements | workspace () const override |
Return the memory requirements required by the workspace. More... | |
Public Member Functions inherited from IOperator | |
virtual | ~IOperator ()=default |
Destructor. More... | |
Static Public Member Functions | |
static Status | validate (const std::vector< const ITensorInfo *> &src_vector, const ITensorInfo *dst, size_t axis) |
Static function to check if given info will lead to a valid configuration of ClConcatenate. More... | |
Basic function to execute concatenate tensors along a given axis.
This function calls the following kernels:
Definition at line 44 of file ClConcatenate.h.
ClConcatenate | ( | ) |
Default constructor.
Definition at line 45 of file ClConcatenate.cpp.
void configure | ( | const ClCompileContext & | compile_context, |
const std::vector< ITensorInfo *> & | src_vector, | ||
ITensorInfo * | dst, | ||
size_t | axis | ||
) |
Initialise the kernel's inputs vector and dst.
[in] | compile_context | The compile context to be used. |
[in,out] | src_vector | The vectors containing all the tensors info to concatenate. Data types supported: All |
[out] | dst | Destination tensor info. Data types supported: same as src_vector . |
[in] | axis | Concatenation axis. Supported underlying concatenation axis are 0, 1, 2 and 3. |
Definition at line 52 of file ClConcatenate.cpp.
References ARM_COMPUTE_ERROR, ARM_COMPUTE_ERROR_ON, ARM_COMPUTE_ERROR_ON_NULLPTR, ARM_COMPUTE_ERROR_THROW_ON, arm_compute::auto_init_if_empty(), arm_compute::misc::shape_calculator::calculate_concatenate_shape(), arm_compute::test::validation::data_type, Window::DimX, Window::DimY, Window::DimZ, arm_compute::test::validation::dst, arm_compute::test::validation::dst_shape, offset(), tf_frozen_model_extractor::t, and ClConcatenate::validate().
|
overridevirtual |
Run the kernels contained in the function.
[in] | tensors | Vector that contains the tensors to operate on. |
Reimplemented from ICLOperator.
Definition at line 223 of file ClConcatenate.cpp.
References arm_compute::ACL_DST, arm_compute::ACL_SRC, arm_compute::ACL_SRC_VEC, ITensorPack::add_tensor(), ARM_COMPUTE_ERROR, ARM_COMPUTE_ERROR_ON, Window::DimX, ITensorPack::empty(), CLScheduler::enqueue_op(), CLScheduler::get(), ITensorPack::get_const_tensor(), ITensorPack::get_tensor(), and ITensorPack::size().
|
static |
Static function to check if given info will lead to a valid configuration of ClConcatenate.
[in] | src_vector | The vectors containing all the tensors info to concatenate. Data types supported: All |
[in] | dst | Destination tensor info. Data types supported: same as src_vector . |
[in] | axis | Concatenation axis. Supported underlying concatenation axis are 0, 1, 2 and 3. |
Definition at line 146 of file ClConcatenate.cpp.
References ARM_COMPUTE_ERROR, ARM_COMPUTE_RETURN_ERROR_ON, ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR, ARM_COMPUTE_RETURN_ON_ERROR, arm_compute::misc::shape_calculator::calculate_concatenate_shape(), Window::DimX, Window::DimY, Window::DimZ, arm_compute::test::validation::dst_shape, offset(), arm_compute::test::validation::src, ITensorInfo::tensor_shape(), TensorShape::total_size(), ITensorInfo::total_size(), ClWidthConcatenate2TensorsKernel::validate(), ClWidthConcatenateKernel::validate(), ClHeightConcatenateKernel::validate(), ClBatchConcatenateKernel::validate(), ClDepthConcatenateKernel::validate(), and ClWidthConcatenate4TensorsKernel::validate().
Referenced by ClConcatenate::configure(), and CLConcatenateLayer::validate().