36 struct CLWinogradConvolutionLayer::Impl
38 const ICLTensor *
src{
nullptr };
39 const ICLTensor *weights{
nullptr };
40 const ICLTensor *biases{
nullptr };
41 ICLTensor *
dst{
nullptr };
42 std::unique_ptr<opencl::ClWinogradConv2d> op{
nullptr };
43 ITensorPack run_pack{};
44 MemoryGroup memory_group{};
45 WorkspaceData<CLTensor> workspace_tensors{};
46 bool is_prepared{
false };
50 : _impl(
std::make_unique<Impl>())
58 bool enable_fast_math)
68 _impl->weights = weights;
69 _impl->biases = biases;
72 _impl->op = std::make_unique<opencl::ClWinogradConv2d>();
73 _impl->op->configure(compile_context, input->
info(), weights->
info(), (biases !=
nullptr ? biases->
info() :
nullptr), output->
info(),
conv_info,
act_info, enable_fast_math);
82 _impl->workspace_tensors = manage_workspace<CLTensor>(_impl->op->workspace(), _impl->memory_group, _impl->run_pack, _impl->run_pack);
95 _impl->op->run(_impl->run_pack);
100 if(!_impl->is_prepared)
102 _impl->op->prepare(_impl->run_pack);
107 _impl->is_prepared =
true;
CLWinogradConvolutionLayer(std::shared_ptr< IMemoryManager > memory_manager=nullptr)
Default Constructor.
void run() override
Run the kernels contained in the function.
void prepare() override
Prepare the function for executing.
void release_prepare_tensors(WorkspaceData< TensorType > &workspace, ITensorPack &prep_pack)
static CLKernelLibrary & get()
Access the KernelLibrary singleton.
Store the tensor's metadata.
Manages all the OpenCL kernels compilation and caching, provides accessors for the OpenCL Context...
Activation Layer Information class.
SimpleTensor< float > src
Copyright (c) 2017-2023 Arm Limited.
static Status validate(const ITensorInfo *src, const ITensorInfo *weights, const ITensorInfo *biases, const ITensorInfo *dst, const PadStrideInfo &conv_info, const ActivationLayerInfo &act_info=ActivationLayerInfo(), bool enable_fast_math=false)
Static function to check if given info will lead to a valid configuration.
virtual ITensorInfo * info() const =0
Interface to be implemented by the child class to return the tensor's metadata.
Padding and stride information class.
static Status validate(const ITensorInfo *input, const ITensorInfo *weights, const ITensorInfo *biases, const ITensorInfo *output, const PadStrideInfo &conv_info, const ActivationLayerInfo &act_info=ActivationLayerInfo(), bool enable_fast_math=false)
Static function to check if given info will lead to a valid configuration of CLWinogradConvolutionLay...
~CLWinogradConvolutionLayer()
Default Destructor.
Memory group resources scope handling class.
Interface for OpenCL tensor.
void configure(ICLTensor *input, const ICLTensor *weights, const ICLTensor *biases, ICLTensor *output, const PadStrideInfo &conv_info, const ActivationLayerInfo &act_info=ActivationLayerInfo(), bool enable_fast_math=false)
Set the input and output tensors.