23.08
|
Basic function to run opencl::ClMul. More...
#include <CLPixelWiseMultiplication.h>
Public Member Functions | |
CLPixelWiseMultiplication () | |
Default Constructor. More... | |
~CLPixelWiseMultiplication () | |
Default Destructor. More... | |
CLPixelWiseMultiplication (const CLPixelWiseMultiplication &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
CLPixelWiseMultiplication (CLPixelWiseMultiplication &&) | |
Default move constructor. More... | |
CLPixelWiseMultiplication & | operator= (const CLPixelWiseMultiplication &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
CLPixelWiseMultiplication & | operator= (CLPixelWiseMultiplication &&) |
Default move assignment operator. More... | |
void | configure (ICLTensor *input1, ICLTensor *input2, ICLTensor *output, float scale, ConvertPolicy overflow_policy, RoundingPolicy rounding_policy, const ActivationLayerInfo &act_info=ActivationLayerInfo()) |
Initialise the kernel's inputs, output and convertion policy. More... | |
void | configure (const CLCompileContext &compile_context, ICLTensor *input1, ICLTensor *input2, ICLTensor *output, float scale, ConvertPolicy overflow_policy, RoundingPolicy rounding_policy, const ActivationLayerInfo &act_info=ActivationLayerInfo()) |
Initialise the kernel's inputs, output and convertion 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, float scale, ConvertPolicy overflow_policy, RoundingPolicy rounding_policy, const ActivationLayerInfo &act_info=ActivationLayerInfo()) |
Static function to check if given info will lead to a valid configuration of CLPixelWiseMultiplication. More... | |
Basic function to run opencl::ClMul.
Definition at line 40 of file CLPixelWiseMultiplication.h.
Default Constructor.
Definition at line 43 of file CLPixelWiseMultiplication.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, |
ICLTensor * | input1, | ||
ICLTensor * | input2, | ||
ICLTensor * | output, | ||
float | scale, | ||
ConvertPolicy | overflow_policy, | ||
RoundingPolicy | rounding_policy, | ||
const ActivationLayerInfo & | act_info = ActivationLayerInfo() |
||
) |
Initialise the kernel's inputs, output and convertion policy.
[in] | compile_context | The compile context to be used. |
[in,out] | input1 | An input tensor. Data types supported: U8/QASYMM8/QASYMM8_SIGNED/S16/QSYMM16/F16/F32/S32 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 | An input tensor. Data types supported: U8/QASYMM8/QASYMM8_SIGNED/S16/QSYMM16/F16/F32/S32 The input tensor is [in, out] because its TensorInfo might be modified inside the kernel in case of broadcasting of dimension 0. |
[out] | output | The output tensor. Data types supported: U8/QASYMM8/QASYMM8_SIGNED/S16/QSYMM16/F16/F32/S32 |
[in] | scale | Scale to apply after multiplication. Scale must be positive and its value must be either 1/255 or 1/2^n where n is between 0 and 15. |
[in] | overflow_policy | Overflow policy. Supported overflow policies: Wrap, Saturate |
[in] | rounding_policy | Rounding policy. Supported rounding modes: to zero, to nearest even. |
[in] | act_info | (Optional) Activation layer information in case of a fused activation. |
Definition at line 57 of file CLPixelWiseMultiplication.cpp.
References arm_compute::test::validation::act_info, ITensor::info(), and arm_compute::test::validation::scale.
void configure | ( | ICLTensor * | input1, |
ICLTensor * | input2, | ||
ICLTensor * | output, | ||
float | scale, | ||
ConvertPolicy | overflow_policy, | ||
RoundingPolicy | rounding_policy, | ||
const ActivationLayerInfo & | act_info = ActivationLayerInfo() |
||
) |
Initialise the kernel's inputs, output and convertion policy.
Valid data layouts:
Valid data type configurations:
src0 | src1 | dst |
---|---|---|
QASYMM8 | QASYMM8 | QASYMM8 |
QASYMM8_SIGNED | QASYMM8_SIGNED | QASYMM8_SIGNED |
QSYMM16 | QSYMM16 | QASYMM16 |
QSYMM16 | QSYMM16 | S32 |
U8 | U8 | U8 |
U8 | U8 | S16 |
U8 | S16 | S16 |
S16 | U8 | S16 |
S16 | S16 | S16 |
F16 | F16 | F16 |
F32 | F32 | F32 |
S32 | S32 | S32 |
[in,out] | input1 | An input tensor. Data types supported: U8/QASYMM8/QASYMM8_SIGNED/S16/QSYMM16/F16/F32/S32 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 | An input tensor. Data types supported: U8/QASYMM8/QASYMM8_SIGNED/S16/QSYMM16/F16/F32/S32 The input tensor is [in, out] because its TensorInfo might be modified inside the kernel in case of broadcasting of dimension 0. |
[out] | output | The output tensor. Data types supported: U8/QASYMM8/QASYMM8_SIGNED/S16/QSYMM16/F16/F32/S32 |
[in] | scale | Scale to apply after multiplication. Scale must be positive and its value must be either 1/255 or 1/2^n where n is between 0 and 15. |
[in] | overflow_policy | Overflow policy. Supported overflow policies: Wrap, Saturate |
[in] | rounding_policy | Rounding policy. Supported rounding modes: to zero, to nearest even. |
[in] | act_info | (Optional) Activation layer information in case of a fused activation. |
Definition at line 51 of file CLPixelWiseMultiplication.cpp.
References arm_compute::test::validation::act_info, CLKernelLibrary::get(), and arm_compute::test::validation::scale.
Referenced by 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 73 of file CLPixelWiseMultiplication.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 CLLSTMLayerQuantized::run(), CLLSTMLayer::run(), and CLQLSTMLayer::run().
|
static |
Static function to check if given info will lead to a valid configuration of CLPixelWiseMultiplication.
[in] | input1 | An input tensor info. Data types supported: U8/QASYMM8/QASYMM8_SIGNED/S16/QSYMM16/F16/F32. |
[in] | input2 | An input tensor info. Data types supported: U8/QASYMM8/QASYMM8_SIGNED/S16/QSYMM16/F16/F32. |
[in] | output | The output tensor info. Data types supported: U8/QASYMM8/QASYMM8_SIGNED/S16/QSYMM16/F16/F32. |
[in] | scale | Scale to apply after multiplication. Scale must be positive and its value must be either 1/255 or 1/2^n where n is between 0 and 15. |
[in] | overflow_policy | Overflow policy. Supported overflow policies: Wrap, Saturate |
[in] | rounding_policy | Rounding policy. Supported rounding modes: to zero, to nearest even. |
[in] | act_info | (Optional) Activation layer information in case of a fused activation. |
Definition at line 67 of file CLPixelWiseMultiplication.cpp.
References arm_compute::test::validation::act_info, arm_compute::test::validation::scale, and ClMul::validate().
Referenced by CLLSTMLayerQuantized::validate(), CLLSTMLayer::validate(), and CLQLSTMLayer::validate().