24.02.1
|
Go to the documentation of this file.
49 auto k = std::make_unique<kernels::CpuAddMulAddKernel>();
54 _dequantize_bn_mul.
configure(bn_mul, &_dequantized_bn_mul);
55 _dequantize_bn_add.
configure(bn_add, &_dequantized_bn_add);
57 k->configure(input1, input2, &_dequantized_bn_mul, &_dequantized_bn_add, add_output, final_output, policy,
61 _aux_mem[DequantizedBnMul] =
64 _aux_mem[DequantizedBnAdd] =
70 k->configure(input1, input2, bn_mul, bn_add, add_output, final_output, policy,
act_info);
73 _kernel = std::move(k);
95 add_output, final_output, policy,
act_info);
124 _dequantize_bn_mul.
run(dequantize_mul_pack);
125 _dequantize_bn_add.
run(dequantize_add_pack);
Tensor handler to wrap and handle tensor allocations on workspace buffers.
void run(ITensorPack &tensors) override
Run the kernels contained in the function.
static Status validate(const ITensorInfo *src, const ITensorInfo *dst)
Static function to check if given info will lead to a valid configuration.
std::vector< MemoryInfo > MemoryRequirements
void run(ITensorPack &tensors) override
Run the kernels contained in the function.
virtual void schedule_op(ICPPKernel *kernel, const Hints &hints, const Window &window, ITensorPack &tensors)=0
Runs the kernel in the same thread as the caller synchronously.
Interface for CPU tensor.
ITensor * get_tensor(int id)
Get tensor of a given id from the pac.
#define ARM_COMPUTE_RETURN_ON_ERROR(status)
Checks if a status contains an error and returns it.
Activation Layer Information class.
virtual ITensorInfo * info() const =0
Interface to be implemented by the child class to return the tensor's metadata.
const ITensor * get_const_tensor(int id) const
Get constant tensor of a given id.
void configure(const ITensorInfo *input1, const ITensorInfo *input2, const ITensorInfo *bn_mul, const ITensorInfo *bn_add, ITensorInfo *add_output, ITensorInfo *final_output, ConvertPolicy policy, const ActivationLayerInfo &act_info)
Initialize the operator's inputs and outputs.
size_t total_size() const override
Returns the total size of the tensor in bytes.
static IScheduler & get()
Access the scheduler singleton.
virtual DataType data_type() const =0
Data type used for each element of the tensor.
static Status validate(const ITensorInfo *input1, const ITensorInfo *input2, const ITensorInfo *bn_mul, const ITensorInfo *bn_add, const ITensorInfo *add_output, const ITensorInfo *final_output, ConvertPolicy policy, const ActivationLayerInfo &act_info)
Static function to check if given info will lead to a valid configuration.
static constexpr size_t DimY
Alias for dimension 1 also known as Y dimension.
virtual std::unique_ptr< T > clone() const =0
Provide a clone of the current object of class T.
Store the tensor's metadata.
int offset_int_vec(int offset)
Copyright (c) 2017-2024 Arm Limited.
ConvertPolicy
Policy to handle integer overflow.
void configure(const ITensorInfo *src, ITensorInfo *dst)
Configure the kernel.
bool is_data_type_quantized(DataType dt)
Check if a given data type is of quantized type.
Store the tensor's metadata.
@ F32
32-bit floating-point number
#define ARM_COMPUTE_LOG_PARAMS(...)
DataType
Available data types.
static Status validate(const ITensorInfo *input1, const ITensorInfo *input2, const ITensorInfo *bn_mul, const ITensorInfo *bn_add, const ITensorInfo *add_output, const ITensorInfo *final_output, ConvertPolicy policy, const ActivationLayerInfo &act_info)
Static function to check if given info will lead to a valid configuration.
experimental::MemoryRequirements workspace() const override
Return the memory requirements required by the workspace.