ArmNN
 25.11
Loading...
Searching...
No Matches
RefBatchMatMulWorkload.cpp
Go to the documentation of this file.
1//
2// Copyright © 2022-2024 Arm Ltd and Contributors. All rights reserved.
3// SPDX-License-Identifier: MIT
4//
5
7
8#include "BatchMatMulImpl.hpp"
10#include "Profiling.hpp"
11
12namespace armnn
13{
14
18
20{
21 Execute(m_Data.m_Inputs, m_Data.m_Outputs);
22}
23
24void RefBatchMatMulWorkload::Execute(std::vector<ITensorHandle*> inputs, std::vector<ITensorHandle*> outputs) const
25{
26 ARMNN_SCOPED_PROFILING_EVENT_REF_NAME_GUID("RefBatchMatMulWorkload_Execute");
27
28 const TensorInfo& inputXInfo = GetTensorInfo(inputs[0]);
29 const TensorInfo& inputYInfo = GetTensorInfo(inputs[1]);
30 const TensorInfo& outputInfo = GetTensorInfo(outputs[0]);
31
32 std::unique_ptr<Decoder<float>> inputXDecoder = MakeDecoder<float>(GetTensorInfo(inputs[0]),
33 inputs[0]->Map());
34
35 std::unique_ptr<Decoder<float>> inputYDecoder = MakeDecoder<float>(GetTensorInfo(inputs[1]),
36 inputs[1]->Map());
37
38 std::unique_ptr<Encoder<float>> outputEncoder = MakeEncoder<float>(GetTensorInfo(outputs[0]),
39 outputs[0]->Map());
40
42 inputXInfo,
43 inputYInfo,
44 outputInfo,
45 *inputXDecoder,
46 *inputYDecoder,
47 *outputEncoder);
48}
49
50} // namespace armnn
#define ARMNN_SCOPED_PROFILING_EVENT_REF_NAME_GUID(label)
Creates a profiling event that uses GetGuid() and GetName() from the calling class.
RefBaseWorkload(const BatchMatMulQueueDescriptor &descriptor, const WorkloadInfo &info)
RefBatchMatMulWorkload(const BatchMatMulQueueDescriptor &descriptor, const WorkloadInfo &info)
Copyright (c) 2021 ARM Limited and Contributors.
std::unique_ptr< Decoder< T > > MakeDecoder(const TensorInfo &info, const void *data=nullptr)
std::unique_ptr< Encoder< T > > MakeEncoder(const TensorInfo &info, void *data=nullptr)
armnn::TensorInfo GetTensorInfo(unsigned int numberOfBatches, unsigned int numberOfChannels, unsigned int height, unsigned int width, const armnn::DataLayout dataLayout, const armnn::DataType dataType)
Contains information about TensorInfos of a layer.