24.02.1
|
Basic function to run kernels::CpuMulKernel. More...
#include <CpuMul.h>
Public Member Functions | |
void | configure (ITensorInfo *src1, ITensorInfo *src2, ITensorInfo *dst, float scale, ConvertPolicy overflow_policy, RoundingPolicy rounding_policy, const ActivationLayerInfo &act_info=ActivationLayerInfo()) |
Initialise the kernel's inputs, dst and convertion policy. More... | |
void | run (ITensorPack &tensors) override |
Run the kernels contained in the function. 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 | 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 *src1, const ITensorInfo *src2, const ITensorInfo *dst, 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. More... | |
Basic function to run kernels::CpuMulKernel.
void configure | ( | ITensorInfo * | src1, |
ITensorInfo * | src2, | ||
ITensorInfo * | dst, | ||
float | scale, | ||
ConvertPolicy | overflow_policy, | ||
RoundingPolicy | rounding_policy, | ||
const ActivationLayerInfo & | act_info = ActivationLayerInfo() |
||
) |
Initialise the kernel's inputs, dst and convertion policy.
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] | src1 | First input tensor info. 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] | src2 | Second input tensor info. Data types supported: U8, QASYMM8 (only if src1 is QASYMM8), QASYMM8_SIGNED (only if src1 is QASYMM8_SIGNED), S16, S32, QSYMM16 (only if src1 is QSYMM16), F16 (only if src1 is F16), F32 (only if src1 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] | dst | dst 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 src1 , src2 and dst 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 49 of file CpuMul.cpp.
References arm_compute::test::validation::act_info, ARM_COMPUTE_LOG_PARAMS, ARM_COMPUTE_UNUSED, arm_compute::test::validation::dst, and arm_compute::test::validation::scale.
|
overridevirtual |
Run the kernels contained in the function.
[in] | tensors | Vector that contains the tensors to operate on. |
Reimplemented from INEOperator.
Definition at line 65 of file CpuMul.cpp.
References ARM_COMPUTE_ERROR_ON_MSG, ITensorPack::empty(), Scheduler::get(), and IScheduler::schedule_op().
|
static |
Static function to check if given info will lead to a valid configuration.
Similar to CpuMul::configure()
Definition at line 37 of file CpuMul.cpp.
References arm_compute::test::validation::act_info, ARM_COMPUTE_RETURN_ERROR_ON, arm_compute::test::validation::dst, arm_compute::test::validation::scale, and CpuMulKernel::validate().
Referenced by NEPixelWiseMultiplication::validate().