ONE - On-device Neural Engine
|
Class to perform ReduceOperation. More...
#include <CLReduceOperation.h>
Public Member Functions | |
CLReduceOperation (std::shared_ptr< IMemoryManager > memory_manager) | |
Construct a new ReduceOperation object. | |
void | configure (ICLTensor *input, ICLTensor *output, const std::set< uint32_t > &axis, bool keep_dims, ReductionOperation op) |
Set the input and output tensors. | |
void | run () override |
Run the OpenCL kernel for this operation. | |
Static Public Member Functions | |
static Status | validate (const ITensorInfo *input, const ITensorInfo *output, const std::set< uint32_t > &axis, bool keep_dims, const ReductionOperation &op) |
Static function to check if given info will lead to a valid configuration of CLReduceOperation. | |
Class to perform ReduceOperation.
Definition at line 66 of file CLReduceOperation.h.
CLReduceOperation::CLReduceOperation | ( | std::shared_ptr< IMemoryManager > | memory_manager | ) |
Construct a new ReduceOperation object.
Definition at line 48 of file CLReduceOperation.cpp.
void CLReduceOperation::configure | ( | ICLTensor * | input, |
ICLTensor * | output, | ||
const std::set< uint32_t > & | axis, | ||
bool | keep_dims, | ||
ReductionOperation | op | ||
) |
Set the input and output tensors.
[in] | input | Source tensor. Data types supported: U8/S32/F32 |
[out] | output | Destination tensor. Data types and data layouts supported: Same as input . |
[in] | axis | Axis along which to reduce. It must be sorted and no duplicates. |
[in] | keep_dims | If positive, retains reduced dimensions with length 1. |
[in] | op | Reduce operation to perform. |
Definition at line 106 of file CLReduceOperation.cpp.
References validate().
|
override |
Run the OpenCL kernel for this operation.
Definition at line 165 of file CLReduceOperation.cpp.
Referenced by package.infer.session::inference().
|
static |
Static function to check if given info will lead to a valid configuration of CLReduceOperation.
[in] | input | Source tensor info. Data types supported: U8/S32/F32 |
[in] | output | Destination tensor info. Data types and data layouts supported: Same as input . |
[in] | axis | Axis along which to reduce. It must be sorted and no duplicates. |
[in] | keep_dims | If positive, retains reduced dimensions with length 1. |
[in] | op | Reduce operation to perform. |
Definition at line 54 of file CLReduceOperation.cpp.
References arm_compute::CLReduceOperationKernel::validate().
Referenced by configure().