23.08
|
Go to the documentation of this file.
35 template <
bool IS_LOG>
36 struct NESoftmaxLayerGeneric<IS_LOG>::Impl
38 const ITensor *
src{
nullptr };
39 ITensor *
dst{
nullptr };
41 std::unique_ptr<cpu::CpuSoftmaxGeneric<IS_LOG>> op{
nullptr };
42 MemoryGroup memory_group{};
43 ITensorPack run_pack{};
44 WorkspaceData<Tensor> workspace_tensors{};
47 template <
bool IS_LOG>
49 : _impl(std::make_unique<Impl>())
51 _impl->memory_group =
MemoryGroup(std::move(memory_manager));
54 template <
bool IS_LOG>
56 template <
bool IS_LOG>
58 template <
bool IS_LOG>
61 template <
bool IS_LOG>
68 _impl->op = std::make_unique<cpu::CpuSoftmaxGeneric<IS_LOG>>();
69 _impl->op->configure(
input->info(), output->
info(), beta, axis);
72 _impl->workspace_tensors = manage_workspace<Tensor>(_impl->op->workspace(), _impl->memory_group, _impl->run_pack);
75 template <
bool IS_LOG>
83 template <
bool IS_LOG>
89 _impl->op->run(_impl->run_pack);
SimpleTensor< float > src
NESoftmaxLayerGeneric & operator=(const NESoftmaxLayerGeneric &)=delete
Prevent instances of this class from being copied (As this class contains pointers)
Interface for CPU tensor.
Basic function to compute a SoftmaxLayer and a Log SoftmaxLayer.
#define ARM_COMPUTE_RETURN_ON_ERROR(status)
Checks if a status contains an error and returns it.
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 NESoftmaxLayer.
#define ARM_COMPUTE_ERROR_ON_NULLPTR(...)
virtual ITensorInfo * info() const =0
Interface to be implemented by the child class to return the tensor's metadata.
Basic function to compute a SoftmaxLayer and a Log SoftmaxLayer.
NESoftmaxLayerGeneric(std::shared_ptr< IMemoryManager > memory_manager=nullptr)
Constructor.
void run() override
Run the kernels contained in the function.
Memory group resources scope handling class.
Copyright (c) 2017-2023 Arm Limited.
#define ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(...)
void configure(ITensor *input, ITensor *output, float beta=1.0f, int32_t axis=0)
Set the input and output tensors.
Store the tensor's metadata.
~NESoftmaxLayerGeneric()
Default destructor.