24.02.1
|
Basic function to run cpu::CpuMul. More...
#include <NEPixelWiseMultiplication.h>
Public Member Functions | |
NEPixelWiseMultiplication () | |
Default Constructor. More... | |
~NEPixelWiseMultiplication () | |
Default Destructor. More... | |
NEPixelWiseMultiplication (const NEPixelWiseMultiplication &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
NEPixelWiseMultiplication (NEPixelWiseMultiplication &&)=default | |
Default move constructor. More... | |
NEPixelWiseMultiplication & | operator= (const NEPixelWiseMultiplication &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
NEPixelWiseMultiplication & | operator= (NEPixelWiseMultiplication &&)=default |
Default move assignment operator. More... | |
void | configure (const ITensor *input1, const ITensor *input2, ITensor *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... | |
Public Member Functions inherited from IFunction | |
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 NEPixelWiseMultiplication. More... | |
Basic function to run cpu::CpuMul.
Definition at line 40 of file NEPixelWiseMultiplication.h.
Default Constructor.
Definition at line 42 of file NEPixelWiseMultiplication.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 ITensor * | input1, |
const ITensor * | input2, | ||
ITensor * | 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 | S32 | F32 |
scale
equal to 1/255 only round to nearest even (implemented as round half up) is supported. For all other scale values only round to zero (implemented as round towards minus infinity) is supported.[in,out] | input1 | An input tensor. Data types supported: U8/QASYMM8/QASYMM8_SIGNED/S16/S32/QSYMM16/F16/F32 This 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 (only if input1 is QASYMM8), QASYMM8_SIGNED (only if input1 is QASYMM8_SIGNED), S16, S32, QSYMM16 (only if input1 is QSYMM16), F16 (only if input1 is F16), F32 (only if input1 is F32). This 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:
|
[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. If both input1 , input2 and output are of datatype S32, scale cannot be 1/255 |
[in] | overflow_policy | Overflow policy. ConvertPolicy cannot be WRAP if any of the inputs is of quantized datatype |
[in] | rounding_policy | Rounding policy. |
[in] | act_info | (Optional) Activation layer information in case of a fused activation. Currently not supported. |
Definition at line 58 of file NEPixelWiseMultiplication.cpp.
References arm_compute::test::validation::act_info, ITensor::info(), and arm_compute::test::validation::scale.
Referenced by NENormalizationLayer::configure(), NELSTMLayerQuantized::configure(), NELSTMLayer::configure(), and NEQLSTMLayer::configure().
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Default move assignment operator.
|
overridevirtual |
Run the kernels contained in the function.
For CPU kernels:
For OpenCL kernels:
Implements IFunction.
Definition at line 74 of file NEPixelWiseMultiplication.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 NENormalizationLayer::run(), NELSTMLayerQuantized::run(), NELSTMLayer::run(), and NEQLSTMLayer::run().
|
static |
Static function to check if given info will lead to a valid configuration of NEPixelWiseMultiplication.
scale
equal to 1/255 only round to nearest even (implemented as round half up) is supported. For all other scale values only round to zero (implemented as round towards minus infinity) is supported.[in] | input1 | An input tensor info. Data types supported: U8/QASYMM8/QASYMM8_SIGNED/S16/S32/QSYMM16/F16/F32 |
[in] | input2 | An input tensor info. Data types supported: U8, QASYMM8 (only if input1 is QASYMM8), QASYMM8_SIGNED (only if input1 is QASYMM8_SIGNED), S16, S32, QSYMM16 (only if both inputs are QSYMM16), F16 (only if input1 is F16), F32 (only if input1 is F32). |
[in] | output | Output tensor info. Data types supported:
|
[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. If both input1 , input2 and output are of datatype S32, scale cannot be 1/255 |
[in] | overflow_policy | Overflow policy. ConvertPolicy cannot be WRAP if any of the inputs is of quantized datatype |
[in] | rounding_policy | Rounding policy. |
[in] | act_info | (Optional) Activation layer information in case of a fused activation. Currently not supported. |
Definition at line 47 of file NEPixelWiseMultiplication.cpp.
References arm_compute::test::validation::act_info, arm_compute::test::validation::scale, and CpuMul::validate().
Referenced by NENormalizationLayer::validate(), NELSTMLayerQuantized::validate(), NELSTMLayer::validate(), and NEQLSTMLayer::validate().