ArmNN
 25.02
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RefLogSoftmaxWorkload.cpp
Go to the documentation of this file.
1 //
2 // Copyright © 2019-2024 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
7 
8 #include "Decoders.hpp"
9 #include "Encoders.hpp"
10 #include "LogSoftmax.hpp"
11 #include "RefWorkloadUtils.hpp"
12 
13 #include <Profiling.hpp>
14 
15 namespace armnn
16 {
17 
19 {
21 }
22 
23 void RefLogSoftmaxWorkload::Execute(std::vector<ITensorHandle*> inputs, std::vector<ITensorHandle*> outputs) const
24 {
25  ARMNN_SCOPED_PROFILING_EVENT_REF_NAME_GUID("RefLogSoftmaxWorkload_Execute");
26 
27  const TensorInfo& inputInfo = GetTensorInfo(inputs[0]);
28  const TensorInfo& outputInfo = GetTensorInfo(outputs[0]);
29 
30  std::unique_ptr<Decoder<float>> decoder = MakeDecoder<float>(inputInfo, inputs[0]->Map());
31  std::unique_ptr<Encoder<float>> encoder = MakeEncoder<float>(outputInfo, outputs[0]->Map());
32 
33  LogSoftmax(*decoder, *encoder, inputInfo, m_Data.m_Parameters);
34 }
35 
36 } // namespace armnn
#define ARMNN_SCOPED_PROFILING_EVENT_REF_NAME_GUID(label)
Creates a profiling event that uses GetGuid() and GetName() from the calling class.
QueueDescriptor m_Data
Definition: Workload.hpp:74
Copyright (c) 2021 ARM Limited and Contributors.
const TensorInfo & GetTensorInfo(const ITensorHandle *tensorHandle)
float32 helpers
void LogSoftmax(Decoder< float > &input, Encoder< float > &output, const TensorInfo &inputInfo, const LogSoftmaxDescriptor &descriptor)
Definition: LogSoftmax.cpp:27
std::vector< ITensorHandle * > m_Inputs
std::vector< ITensorHandle * > m_Outputs