ArmNN
 24.08
NeonFillWorkload.cpp
Go to the documentation of this file.
1 //
2 // Copyright © 2020-2023 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #include "NeonFillWorkload.hpp"
7 
10 #include <arm_compute/core/Types.h>
11 #include <arm_compute/runtime/NEON/functions/NEFill.h>
12 
13 #include "NeonWorkloadUtils.hpp"
14 
15 namespace armnn
16 {
17 using namespace armcomputetensorutils;
18 
21 {
22  // Report Profiling Details
23  ARMNN_REPORT_PROFILING_WORKLOAD_DESC("NeonFillWorkload_Construct",
24  descriptor.m_Parameters,
25  info,
26  this->GetGuid());
27 
28  m_Data.ValidateInputsOutputs("NeonFillWorkload", 1, 1);
29 
30  arm_compute::ITensor& output = static_cast<IAclTensorHandle*>(m_Data.m_Outputs[0])->GetTensor();
31  arm_compute::PixelValue pixelValue = GetPixelValue(output.info(), descriptor.m_Parameters.m_Value);
32 
33  auto layer = std::make_unique<arm_compute::NEFill>();
34  layer->configure(&output, pixelValue);
35  m_Layer.reset(layer.release());
36 }
37 
39 {
40  ARMNN_SCOPED_PROFILING_EVENT_NEON_NAME_GUID("NeonFillWorkload_Execute");
41  m_Layer->run();
42 }
43 
44 } // namespace armnn
armnn::QueueDescriptor::ValidateInputsOutputs
void ValidateInputsOutputs(const std::string &descName, unsigned int numExpectedIn, unsigned int numExpectedOut) const
Definition: WorkloadData.cpp:447
NeonTensorHandle.hpp
NeonFillWorkload.hpp
armnn::NeonFillWorkload::NeonFillWorkload
NeonFillWorkload(const FillQueueDescriptor &descriptor, const WorkloadInfo &info)
Definition: NeonFillWorkload.cpp:19
armnn::FillDescriptor::m_Value
float m_Value
Definition: Descriptors.hpp:940
armnn::IAclTensorHandle
Definition: ArmComputeTensorHandle.hpp:16
armnn::QueueDescriptorWithParameters::m_Parameters
LayerDescriptor m_Parameters
Definition: WorkloadData.hpp:66
armnn::WorkloadInfo
Contains information about TensorInfos of a layer.
Definition: WorkloadInfo.hpp:16
armnn::FillQueueDescriptor
Definition: WorkloadData.hpp:174
armnn::NeonFillWorkload::Execute
void Execute() const override
Definition: NeonFillWorkload.cpp:38
armnn::BoostLogSeverityMapping::info
@ info
armnn::QueueDescriptor::m_Outputs
std::vector< ITensorHandle * > m_Outputs
Definition: WorkloadData.hpp:27
ARMNN_REPORT_PROFILING_WORKLOAD_DESC
#define ARMNN_REPORT_PROFILING_WORKLOAD_DESC(name, desc, infos, guid)
Definition: Profiling.hpp:227
armnn::BaseWorkload< FillQueueDescriptor >::m_Data
FillQueueDescriptor m_Data
Definition: Workload.hpp:89
NeonWorkloadUtils.hpp
armnn
Copyright (c) 2021 ARM Limited and Contributors.
Definition: 01_00_quick_start.dox:6
ArmComputeTensorUtils.hpp
ARMNN_SCOPED_PROFILING_EVENT_NEON_NAME_GUID
#define ARMNN_SCOPED_PROFILING_EVENT_NEON_NAME_GUID(label)
Creates a profiling event that uses GetGuid() and GetName() from the calling class.
Definition: NeonWorkloadUtils.hpp:33
armnn::NeonBaseWorkload
Definition: NeonBaseWorkload.hpp:13