21.02
|
Basic function to run NEPixelWiseMultiplicationKernel. More...
#include <NEPixelWiseMultiplication.h>
Public Member Functions | |
void | configure (ITensorInfo *input1, ITensorInfo *input2, ITensorInfo *output, float scale, ConvertPolicy overflow_policy, RoundingPolicy rounding_policy, const ActivationLayerInfo &act_info=ActivationLayerInfo()) |
Initialise the kernel's inputs, output and convertion policy. More... | |
Public Member Functions inherited from INEOperator | |
INEOperator (IRuntimeContext *ctx=nullptr) | |
Constructor. More... | |
INEOperator (const INEOperator &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
INEOperator (INEOperator &&)=default | |
Default move constructor. More... | |
INEOperator & | operator= (const INEOperator &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
INEOperator & | operator= (INEOperator &&)=default |
Default move assignment operator. More... | |
~INEOperator () | |
Default destructor. More... | |
void | run (ITensorPack &tensors) override |
Run the kernels contained in the function. 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 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 NEPixelWiseMultiplicationKernel.
Definition at line 39 of file NEPixelWiseMultiplication.h.
void configure | ( | ITensorInfo * | input1, |
ITensorInfo * | input2, | ||
ITensorInfo * | output, | ||
float | scale, | ||
ConvertPolicy | overflow_policy, | ||
RoundingPolicy | rounding_policy, | ||
const ActivationLayerInfo & | act_info = ActivationLayerInfo() |
||
) |
Initialise the kernel's inputs, output and convertion policy.
Valid configurations (Input1,Input2) -> Output :
Support: Broadcast? Scale=1/255?
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 | First 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 | Second 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. |
[out] | output | 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. 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 35 of file NEPixelWiseMultiplication.cpp.
References ARM_COMPUTE_UNUSED.
|
static |
Static function to check if given info will lead to a valid configuration of NEPixelWiseMultiplication.
Valid configurations (Input1,Input2) -> Output :
Support: Broadcast? Scale=1/255?
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 | First input tensor info. Data types supported: U8/QASYMM8/QASYMM8_SIGNED/S16/S32/QSYMM16/F16/F32 |
[in] | input2 | Second input tensor info. Data types supported: U8/QASYMM8/QASYMM8_SIGNED/S16/S32/QSYMM16/F16/F32 |
[in] | output | Output tensor info. 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. 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 43 of file NEPixelWiseMultiplication.cpp.
References ARM_COMPUTE_RETURN_ERROR_ON, ActivationLayerInfo::enabled(), and NEPixelWiseMultiplicationKernel::validate().
Referenced by NEPixelWiseMultiplication::validate().