23.11
|
Basic function to run opencl::kernels::ClSaturatedArithmeticKernel for addition. More...
#include <CLElementwiseOperations.h>
Public Member Functions | |
CLArithmeticAddition () | |
Default Constructor. More... | |
~CLArithmeticAddition () | |
Default Destructor. More... | |
CLArithmeticAddition (const CLArithmeticAddition &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
CLArithmeticAddition (CLArithmeticAddition &&) | |
Default move constructor. More... | |
CLArithmeticAddition & | operator= (const CLArithmeticAddition &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
CLArithmeticAddition & | operator= (CLArithmeticAddition &&) |
Default move assignment operator. More... | |
void | configure (ICLTensor *input1, ICLTensor *input2, ICLTensor *output, ConvertPolicy policy, const ActivationLayerInfo &act_info=ActivationLayerInfo()) |
Initialise the kernel's inputs, output and conversion policy. More... | |
void | configure (const CLCompileContext &compile_context, const ICLTensor *input1, const ICLTensor *input2, ICLTensor *output, ConvertPolicy policy, const ActivationLayerInfo &act_info=ActivationLayerInfo()) |
Initialise the kernel's inputs, output and conversion policy. More... | |
void | run () override |
Run the kernels contained in the function. More... | |
![]() | |
virtual | ~IFunction ()=default |
Destructor. More... | |
virtual void | prepare () |
Prepare the function for executing. More... | |
Static Public Member Functions | |
static Status | validate (const ITensorInfo *input1, const ITensorInfo *input2, const ITensorInfo *output, ConvertPolicy policy, const ActivationLayerInfo &act_info=ActivationLayerInfo()) |
Static function to check if given info will lead to a valid configuration of opencl::kernels::ClSaturatedArithmeticKernel for addition. More... | |
Basic function to run opencl::kernels::ClSaturatedArithmeticKernel for addition.
Definition at line 42 of file CLElementwiseOperations.h.
Default Constructor.
Definition at line 45 of file CLElementwiseOperations.cpp.
|
default |
Default Destructor.
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Default move constructor.
void configure | ( | const CLCompileContext & | compile_context, |
const ICLTensor * | input1, | ||
const ICLTensor * | input2, | ||
ICLTensor * | output, | ||
ConvertPolicy | policy, | ||
const ActivationLayerInfo & | act_info = ActivationLayerInfo() |
||
) |
Initialise the kernel's inputs, output and conversion policy.
Valid configurations (Input1,Input2) -> Output :
[in] | compile_context | The compile context to be used. |
[in,out] | input1 | First tensor input. Data types supported: U8/QASYMM8/QASYMM8_SIGNED/S16/QSYMM16/S32/F16/F32. The input tensor is [in, out] because its TensorInfo might be modified inside the kernel in case of broadcasting of dimension 0. |
[in,out] | input2 | Second tensor input. Data types supported: U8/QASYMM8/QASYMM8_SIGNED/S16/QSYMM16/S32/F16/F32. The input tensor is [in, out] because its TensorInfo might be modified inside the kernel in case of broadcasting of dimension 0. |
[out] | output | Output tensor. Data types supported: U8/QASYMM8/QASYMM8_SIGNED/S16/QSYMM16/S32/F16/F32. |
[in] | policy | Policy to use to handle overflow. |
[in] | act_info | (Optional) Activation layer information in case of a fused activation. |
Definition at line 58 of file CLElementwiseOperations.cpp.
References arm_compute::test::validation::act_info, and ITensor::info().
void configure | ( | ICLTensor * | input1, |
ICLTensor * | input2, | ||
ICLTensor * | output, | ||
ConvertPolicy | policy, | ||
const ActivationLayerInfo & | act_info = ActivationLayerInfo() |
||
) |
Initialise the kernel's inputs, output and conversion policy.
Valid data layouts:
Valid data type configurations:
src0 | src1 | dst |
---|---|---|
QASYMM8 | QASYMM8 | QASYMM8 |
QASYMM8_SIGNED | QASYMM8_SIGNED | QASYMM8_SIGNED |
QSYMM16 | QSYMM16 | QASYMM16 |
U8 | U8 | U8 |
U8 | U8 | S16 |
U8 | S16 | S16 |
S16 | U8 | S16 |
S16 | S16 | S16 |
S32 | S32 | S32 |
F16 | F16 | F16 |
F32 | F32 | F32 |
[in,out] | input1 | First tensor input. Data types supported: U8/QASYMM8/QASYMM8_SIGNED/S16/QSYMM16/S32/F16/F32. The input tensor is [in, out] because its TensorInfo might be modified inside the kernel in case of broadcasting of dimension 0. |
[in,out] | input2 | Second tensor input. Data types supported: U8/QASYMM8/QASYMM8_SIGNED/S16/QSYMM16/S32/F16/F32. The input tensor is [in, out] because its TensorInfo might be modified inside the kernel in case of broadcasting of dimension 0. |
[out] | output | Output tensor. Data types supported: U8/QASYMM8/QASYMM8_SIGNED/S16/QSYMM16/S32/F16/F32. |
[in] | policy | Policy to use to handle overflow. |
[in] | act_info | (Optional) Activation layer information in case of a fused activation. |
Definition at line 52 of file CLElementwiseOperations.cpp.
References arm_compute::test::validation::act_info, and CLKernelLibrary::get().
Referenced by CLRNNLayer::configure(), CLFFTConvolutionLayer::configure(), CLLSTMLayerQuantized::configure(), CLLSTMLayer::configure(), and CLQLSTMLayer::configure().
|
default |
Default move assignment operator.
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
overridevirtual |
Run the kernels contained in the function.
For CPU kernels:
For OpenCL kernels:
Implements IFunction.
Definition at line 81 of file CLElementwiseOperations.cpp.
References arm_compute::ACL_DST, arm_compute::ACL_SRC_0, arm_compute::ACL_SRC_1, ITensorPack::add_tensor(), and arm_compute::test::validation::pack.
Referenced by CLQLSTMLayer::prepare(), CLRNNLayer::run(), CLFFTConvolutionLayer::run(), CLLSTMLayerQuantized::run(), CLLSTMLayer::run(), and CLQLSTMLayer::run().
|
static |
Static function to check if given info will lead to a valid configuration of opencl::kernels::ClSaturatedArithmeticKernel for addition.
Valid configurations (Input1,Input2) -> Output :
[in] | input1 | First tensor input info. Data types supported: U8/QASYMM8/QASYMM8_SIGNED/S16/QSYMM16/S32/F16/F32. |
[in] | input2 | Second tensor input info. Data types supported: U8/QASYMM8/QASYMM8_SIGNED/S16/QSYMM16/S32/F16/F32. |
[in] | output | Output tensor info. Data types supported: U8/QASYMM8/QASYMM8_SIGNED/S16/QSYMM16/S32/F16/F32. |
[in] | policy | Policy to use to handle overflow. |
[in] | act_info | (Optional) Activation layer information in case of a fused activation. |
Definition at line 72 of file CLElementwiseOperations.cpp.
References arm_compute::test::validation::act_info, and ClAdd::validate().
Referenced by arm_compute::test::validation::TEST_CASE(), CLRNNLayer::validate(), CLLSTMLayerQuantized::validate(), CLLSTMLayer::validate(), and CLQLSTMLayer::validate().