ArmNN
 25.11
Loading...
Searching...
No Matches
ClFillWorkload.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 "ClFillWorkload.hpp"
7
8#include "ClWorkloadUtils.hpp"
9
10#include <cl/ClTensorHandle.hpp>
12#include <arm_compute/core/Types.h>
13
14namespace armnn
15{
16using namespace armcomputetensorutils;
17
19 const WorkloadInfo& info,
20 const arm_compute::CLCompileContext& clCompileContext)
22{
23 // Report Profiling Details
24 ARMNN_REPORT_PROFILING_WORKLOAD_DESC("ClFillWorkload_Construct",
25 descriptor.m_Parameters,
26 info,
27 this->GetGuid());
28
29 m_Data.ValidateInputsOutputs("ClFillWorkload", 1, 1);
30
31 arm_compute::ICLTensor& output = static_cast<IClTensorHandle*>(this->m_Data.m_Outputs[0])->GetTensor();
32 arm_compute::PixelValue pixelValue = GetPixelValue(output.info(), descriptor.m_Parameters.m_Value);
33
34 {
35 ARMNN_SCOPED_PROFILING_EVENT_CL_NAME_GUID("ClFillWorkload_configure");
36 m_Layer.configure(clCompileContext, &output, pixelValue);
37 }
38}
39
41{
42 ARMNN_SCOPED_PROFILING_EVENT_CL_NAME_GUID("ClFillWorkload_Execute");
43 RunClFunction(m_Layer, CHECK_LOCATION());
44}
45
46} // namespace armnn
#define ARMNN_SCOPED_PROFILING_EVENT_CL_NAME_GUID(label)
Creates a profiling event that uses GetGuid() and GetName() from the calling class.
#define CHECK_LOCATION()
#define ARMNN_REPORT_PROFILING_WORKLOAD_DESC(name, desc, infos, guid)
ClBaseWorkload(const FillQueueDescriptor &descriptor, const WorkloadInfo &info)
ClFillWorkload(const FillQueueDescriptor &descriptor, const WorkloadInfo &info, const arm_compute::CLCompileContext &clCompileContext)
void Execute() const override
Copyright (c) 2021 ARM Limited and Contributors.
void RunClFunction(arm_compute::IFunction &function, const CheckLocation &location)
Contains information about TensorInfos of a layer.