24 #ifndef ARM_COMPUTE_CLDEPTHWISECONVOLUTION_H 25 #define ARM_COMPUTE_CLDEPTHWISECONVOLUTION_H 35 class CLCompileContext;
36 class CLFillBorderKernel;
37 class CLDepthwiseConvolutionLayerNativeKernel;
38 class CLDepthwiseConvolutionLayerReshapeWeightsKernel;
39 class ICLDepthwiseConvolutionLayer3x3Kernel;
131 const PadStrideInfo &conv_info,
unsigned int depth_multiplier = 1,
142 class CLDepthwiseConvolutionLayerInternal3x3 :
public IFunction 146 CLDepthwiseConvolutionLayerInternal3x3(std::shared_ptr<IMemoryManager> memory_manager =
nullptr);
148 CLDepthwiseConvolutionLayerInternal3x3(
const CLDepthwiseConvolutionLayerInternal3x3 &) =
delete;
150 CLDepthwiseConvolutionLayerInternal3x3(CLDepthwiseConvolutionLayerInternal3x3 &&) =
default;
152 CLDepthwiseConvolutionLayerInternal3x3 &
operator=(
const CLDepthwiseConvolutionLayerInternal3x3 &) =
delete;
154 CLDepthwiseConvolutionLayerInternal3x3 &
operator=(CLDepthwiseConvolutionLayerInternal3x3 &&) =
default;
209 void set_memory_group(std::shared_ptr<IMemoryManager> memory_manager)
211 _memory_group =
MemoryGroup(std::move(memory_manager));
216 std::unique_ptr<ICLDepthwiseConvolutionLayer3x3Kernel> _kernel;
217 std::unique_ptr<CLFillBorderKernel> _border_handler;
221 std::unique_ptr<CLDepthwiseConvolutionLayerReshapeWeightsKernel> _reshape_weights;
227 const ITensor *_original_weights;
231 bool _needs_weights_reshape;
242 class CLDepthwiseConvolutionLayerGeneric :
public IFunction 246 CLDepthwiseConvolutionLayerGeneric(std::shared_ptr<IMemoryManager> memory_manager =
nullptr);
248 CLDepthwiseConvolutionLayerGeneric(
const CLDepthwiseConvolutionLayerGeneric &) =
delete;
250 CLDepthwiseConvolutionLayerGeneric(CLDepthwiseConvolutionLayerGeneric &&) =
default;
252 CLDepthwiseConvolutionLayerGeneric &
operator=(
const CLDepthwiseConvolutionLayerGeneric &) =
delete;
254 CLDepthwiseConvolutionLayerGeneric &
operator=(CLDepthwiseConvolutionLayerGeneric &&) =
default;
309 void set_memory_group(std::shared_ptr<IMemoryManager> memory_manager)
311 _memory_group =
MemoryGroup(std::move(memory_manager));
317 std::unique_ptr<CLDepthwiseConvolutionLayerNativeKernel> _dwc_native_kernel;
327 const ITensor *_original_weights;
336 std::shared_ptr<IMemoryManager> _memory_manager;
339 CLDepthwiseConvolutionLayerInternal3x3 _func_3x3;
340 CLDepthwiseConvolutionLayerGeneric _func_generic;
DepthwiseConvolutionFunction
Available DepthwiseConvolutionFunction.
Base class for all functions.
void prepare() override
Prepare the function for executing.
Store the tensor's metadata.
Activation Layer Information class.
Interface for Neon tensor.
Copyright (c) 2017-2021 Arm Limited.
CLDepthwiseConvolutionLayer & operator=(const CLDepthwiseConvolutionLayer &)=delete
Prevent instances of this class from being copied (As this class contains pointers) ...
void configure(ICLTensor *input, const ICLTensor *weights, const ICLTensor *biases, ICLTensor *output, const PadStrideInfo &conv_info, unsigned int depth_multiplier=1, ActivationLayerInfo act_info=ActivationLayerInfo(), const Size2D &dilation=Size2D(1U, 1U))
Initialize the function's source, destination, weights and convolution information.
Basic function to execute an opencl::kernels::ClPermuteKernel.
Padding and stride information class.
CLDepthwiseConvolutionLayer(std::shared_ptr< IMemoryManager > memory_manager=nullptr)
Default constructor.
Function to execute a depthwise convolution.
~CLDepthwiseConvolutionLayer()
Default destructor.
Interface for OpenCL tensor.
GPUTarget
Available GPU Targets.
Class for specifying the size of an image or rectangle.
void run() override
Run the kernels contained in the function.
static Status validate(const ITensorInfo *input, const ITensorInfo *weights, const ITensorInfo *biases, const ITensorInfo *output, const PadStrideInfo &conv_info, unsigned int depth_multiplier=1, ActivationLayerInfo act_info=ActivationLayerInfo(), const Size2D &dilation=Size2D(1U, 1U))
Static function to check if given info will lead to a valid configuration of CLDepthwiseConvolutionLa...
Basic implementation of the OpenCL tensor interface.