40 template <
bool IS_LOG>
41 struct CLSoftmaxLayerGeneric<IS_LOG>::Impl
43 const ICLTensor *
src{
nullptr };
44 ICLTensor *
dst{
nullptr };
45 std::unique_ptr<OperatorType> op{
nullptr };
46 MemoryGroup memory_group{};
47 ITensorPack run_pack{};
48 WorkspaceData<CLTensor> workspace_tensors{};
51 template <
bool IS_LOG>
53 : _impl(
std::make_unique<Impl>())
55 _impl->memory_group =
MemoryGroup(std::move(memory_manager));
58 template <
bool IS_LOG>
61 template <
bool IS_LOG>
67 template <
bool IS_LOG>
72 _impl->op = std::make_unique<OperatorType>();
75 _impl->op->configure(compile_context, *input->
info(), *output->
info(), softmax_info);
78 _impl->workspace_tensors = manage_workspace<CLTensor>(_impl->op->workspace(), _impl->memory_group, _impl->run_pack);
81 template <
bool IS_LOG>
88 template <
bool IS_LOG>
94 _impl->op->run(_impl->run_pack);
void run() override
Run the kernels contained in the function.
CLSoftmaxLayerGeneric(std::shared_ptr< IMemoryManager > memory_manager=nullptr)
Constructor.
void configure(const ICLTensor *input, ICLTensor *output, float beta=1.0f, int32_t axis=0)
Set the input and output tensors.
virtual DataType data_type() const =0
Data type used for each element of the tensor.
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...
SimpleTensor< float > src
Copyright (c) 2017-2022 Arm Limited.
Basic function to compute a SoftmaxLayer.
virtual ITensorInfo * info() const =0
Interface to be implemented by the child class to return the tensor's metadata.
static Status validate(const ITensorInfo *input, const ITensorInfo *output, float beta=1.0f, int32_t axis=0)
Static function to check if given info will lead to a valid configuration of CLSoftmaxLayer.
Memory group resources scope handling class.
Interface for OpenCL tensor.
#define ARM_COMPUTE_ERROR_ON_NULLPTR(...)
opencl::ClGemm OperatorType
static Status validate(const ITensorInfo *a, const ITensorInfo *b, const ITensorInfo *c, const ITensorInfo *output, float alpha, float beta, const GEMMInfo &gemm_info)
Static function to check if given info will lead to a valid configuration.
Descriptor used by the softmax kernels.
~CLSoftmaxLayerGeneric()
Default destructor.