24.02.1
|
Go to the documentation of this file.
37 struct CLWinogradConvolutionLayer::Impl
39 const ICLTensor *
src{
nullptr};
40 const ICLTensor *weights{
nullptr};
41 const ICLTensor *biases{
nullptr};
42 ICLTensor *
dst{
nullptr};
43 std::unique_ptr<opencl::ClWinogradConv2d> op{
nullptr};
44 ITensorPack run_pack{};
45 MemoryGroup memory_group{};
46 WorkspaceData<CLTensor> workspace_tensors{};
47 bool is_prepared{
false};
51 : _impl(std::make_unique<Impl>())
64 bool enable_fast_math)
77 bool enable_fast_math)
80 _impl->weights = weights;
81 _impl->biases = biases;
84 _impl->op = std::make_unique<opencl::ClWinogradConv2d>();
85 _impl->op->configure(compile_context,
input->info(), weights->
info(),
93 _impl->workspace_tensors =
94 manage_workspace<CLTensor>(_impl->op->workspace(), _impl->memory_group, _impl->run_pack, _impl->run_pack);
103 bool enable_fast_math)
112 _impl->op->run(_impl->run_pack);
117 if (!_impl->is_prepared)
119 _impl->op->prepare(_impl->run_pack);
124 _impl->is_prepared =
true;
SimpleTensor< float > src
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...
Interface for OpenCL tensor.
~CLWinogradConvolutionLayer()
Default Destructor.
void release_prepare_tensors(WorkspaceData< TensorType > &workspace, ITensorPack &prep_pack)
static CLKernelLibrary & get()
Access the KernelLibrary singleton.
Manages all the OpenCL kernels compilation and caching, provides accessors for the OpenCL Context.
void prepare() override
Prepare the function for executing.
Activation Layer Information class.
virtual ITensorInfo * info() const =0
Interface to be implemented by the child class to return the tensor's metadata.
CLWinogradConvolutionLayer(std::shared_ptr< IMemoryManager > memory_manager=nullptr)
Default Constructor.
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.
void run() override
Run the kernels contained in the function.
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.
Memory group resources scope handling class.
Copyright (c) 2017-2024 Arm Limited.
Store the tensor's metadata.