24.08
NeonConvertFp32ToFp16Workload.hpp
Go to the documentation of this file.
1
//
2
// Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
3
// SPDX-License-Identifier: MIT
4
//
5
6
#pragma once
7
8
#include <arm_compute/runtime/NEON/functions/NECast.h>
9
#include <
armnn/backends/Workload.hpp
>
10
#include <
armnn/backends/WorkloadData.hpp
>
11
#include <memory>
12
#include <
neon/workloads/NeonWorkloadUtils.hpp
>
13
14
namespace
armnn
15
{
16
17
arm_compute::Status
NeonConvertFp32ToFp16WorkloadValidate
(
const
TensorInfo& input,
const
TensorInfo& output);
18
19
class
NeonConvertFp32ToFp16Workload
:
public
Float32ToFloat16Workload
<ConvertFp32ToFp16QueueDescriptor>
20
{
21
public
:
22
NeonConvertFp32ToFp16Workload
(
const
ConvertFp32ToFp16QueueDescriptor
& descriptor,
const
WorkloadInfo
&
info
);
23
virtual
void
Execute
()
const override
;
24
// Replace input tensor handle with the given TensorHandle
25
void
ReplaceInputTensorHandle
(
ITensorHandle
* tensorHandle,
unsigned
int
slot)
override
;
26
27
// Replace output tensor handle with the given TensorHandle
28
void
ReplaceOutputTensorHandle
(
ITensorHandle
* tensorHandle,
unsigned
int
slot)
override
;
29
private
:
30
virtual
void
Reconfigure();
31
using
TensorHandlePair = std::pair<const ITensorHandle*, ITensorHandle*>;
32
std::vector<TensorHandlePair> m_TensorHandlePairs;
33
mutable
std::unique_ptr<arm_compute::NECast> m_Cast;
34
};
35
36
}
//namespace armnn
armnn::NeonConvertFp32ToFp16Workload::ReplaceOutputTensorHandle
void ReplaceOutputTensorHandle(ITensorHandle *tensorHandle, unsigned int slot) override
Definition:
NeonConvertFp32ToFp16Workload.cpp:97
armnn::NeonConvertFp32ToFp16WorkloadValidate
arm_compute::Status NeonConvertFp32ToFp16WorkloadValidate(const TensorInfo &input, const TensorInfo &output)
Definition:
NeonConvertFp32ToFp16Workload.cpp:21
armnn::NeonConvertFp32ToFp16Workload::NeonConvertFp32ToFp16Workload
NeonConvertFp32ToFp16Workload(const ConvertFp32ToFp16QueueDescriptor &descriptor, const WorkloadInfo &info)
Definition:
NeonConvertFp32ToFp16Workload.cpp:31
WorkloadData.hpp
armnn::NeonConvertFp32ToFp16Workload::ReplaceInputTensorHandle
void ReplaceInputTensorHandle(ITensorHandle *tensorHandle, unsigned int slot) override
Definition:
NeonConvertFp32ToFp16Workload.cpp:80
armnn::ITensorHandle
Definition:
ITensorHandle.hpp:16
armnn::ConvertFp32ToFp16QueueDescriptor
Definition:
WorkloadData.hpp:457
armnn::NeonConvertFp32ToFp16Workload
Definition:
NeonConvertFp32ToFp16Workload.hpp:19
armnn::NeonConvertFp32ToFp16Workload::Execute
virtual void Execute() const override
Definition:
NeonConvertFp32ToFp16Workload.cpp:53
armnn::WorkloadInfo
Contains information about TensorInfos of a layer.
Definition:
WorkloadInfo.hpp:16
Workload.hpp
armnn::BoostLogSeverityMapping::info
@ info
armnn::Status
Status
Definition:
Types.hpp:42
NeonWorkloadUtils.hpp
armnn
Copyright (c) 2021 ARM Limited and Contributors.
Definition:
01_00_quick_start.dox:6
armnn::MultiTypedWorkload
Definition:
Workload.hpp:160
src
backends
neon
workloads
NeonConvertFp32ToFp16Workload.hpp
Generated on Wed Aug 28 2024 14:31:50 for Arm NN by
1.8.17