38 ITensorPack select_activation_src_dst(ITensorPack &tensors)
54 auto k = std::make_unique<kernels::ClDirectConv2dKernel>();
56 k->configure(compile_context, src, weights, biases, dst, conv_info, conv2d_act_info);
57 _direct_conv_kernel = std::move(k);
65 auto b = std::make_unique<CLFillBorderKernel>();
66 b->configure(compile_context, src, _direct_conv_kernel->border_size(),
BorderMode::CONSTANT, zero_value);
67 _src_border_handler = std::move(b);
72 auto a = std::make_unique<kernels::ClActivationKernel>();
73 a->configure(compile_context, dst, dst, act_info);
74 _activation_kernel = std::move(a);
99 if(_activation_kernel)
101 auto act_pack = select_activation_src_dst(tensors);
Class describing the value of a pixel for any image format.
static Status validate(const ITensorInfo *src, const ITensorInfo *weights, const ITensorInfo *biases, const ITensorInfo *dst, const PadStrideInfo &conv_info, const ActivationLayerInfo &act_info=ActivationLayerInfo())
Static function to check if given info will lead to a valid configuration.
bool enabled() const
Check if initialised.
static CLScheduler & get()
Access the scheduler singleton.
#define ARM_COMPUTE_RETURN_ON_ERROR(status)
Checks if a status contains an error and returns it.
virtual DataType data_type() const =0
Data type used for each element of the tensor.
Store the tensor's metadata.
static Status validate(const ITensorInfo *src, const ITensorInfo *weights, const ITensorInfo *biases, const ITensorInfo *dst, const PadStrideInfo &conv_info, const ActivationLayerInfo &act_info, const GPUTarget target)
Static function to check if given info will lead to a valid configuration.
Activation Layer Information class.
SimpleTensor< float > src
Copyright (c) 2017-2021 Arm Limited.
Interface to enqueue OpenCL kernels and get/set the OpenCL CommandQueue and ICLTuner.
void enqueue_op(ICLKernel &kernel, ITensorPack &tensors, bool flush=true)
Schedule the execution of the passed kernel if possible.
void configure(const CLCompileContext &compile_context, ITensorInfo *src, ITensorInfo *weights, ITensorInfo *biases, ITensorInfo *dst, const PadStrideInfo &conv_info, const ActivationLayerInfo &act_info=ActivationLayerInfo())
Set the src and dst tensors.
static Status validate(const ITensorInfo *src, const ITensorInfo *dst, const ActivationLayerInfo &act_info)
Static function to check if given info will lead to a valid configuration.
Padding and stride information class.
virtual QuantizationInfo quantization_info() const =0
Get the quantization settings (scale and offset) of the tensor.
bool is_data_type_quantized_asymmetric(DataType dt)
Check if a given data type is of asymmetric quantized type.
Num samples, height, width, channels.
#define ARM_COMPUTE_ERROR_ON_NULLPTR(...)
void run(ITensorPack &tensors) override
Run the kernels contained in the function.
void tune_kernel_static(ICLKernel &kernel)
Tunes OpenCL kernel.
bool is_data_type_float(DataType dt)
Check if a given data type is of floating point type.
void add_tensor(int id, ITensor *tensor)
Add tensor to the pack.
virtual DataLayout data_layout() const =0
Get the data layout of the tensor.