24.08
|
Go to the documentation of this file.
14 static constexpr arm_compute::ConvertPolicy g_AclConvertPolicy = arm_compute::ConvertPolicy::SATURATE;
35 arm_compute::ITensor& input = PolymorphicDowncast<IAclTensorHandle*>(
m_Data.
m_Inputs[0])->GetTensor();
36 arm_compute::ITensor& output = PolymorphicDowncast<IAclTensorHandle*>(
m_Data.
m_Outputs[0])->GetTensor();
38 if (arm_compute::NECast::validate(input.info(), output.info(), g_AclConvertPolicy))
41 m_Cast.reset(
new arm_compute::NECast());
42 m_Cast->configure(&input, &output, g_AclConvertPolicy);
63 auto convertFunc = [](uint8_t* dst,
const uint8_t* src,
size_t size)
65 auto input =
reinterpret_cast<const Half*
>(src);
66 auto output =
reinterpret_cast<float*
>(dst);
67 size_t numElements = size/2;
71 for (
const auto& pair : m_TensorHandlePairs)
111 void NeonConvertFp16ToFp32Workload::Reconfigure()
void ReplaceInputTensorHandle(ITensorHandle *tensorHandle, unsigned int slot) override
void ValidateInputsOutputs(const std::string &descName, unsigned int numExpectedIn, unsigned int numExpectedOut) const
void ReplaceOutputTensorHandle(ITensorHandle *tensorHandle, unsigned int slot) override
arm_compute::Status NeonConvertFp16ToFp32WorkloadValidate(const TensorInfo &input, const TensorInfo &output)
Contains information about TensorInfos of a layer.
static void ConvertFloat16To32(const void *srcFloat16Buffer, size_t numElements, float *dstFloat32Buffer)
virtual void Execute() const override
void GatherTensorHandlePairs(const DescriptorType &descriptor, std::vector< std::pair< SrcTensorHandleType *, DstTensorHandleType * >> &tensorHandlePairs)
void CopyTensorContentsGeneric(const ITensorHandle *srcTensor, ITensorHandle *dstTensor, CopyFunc copy)
std::vector< ITensorHandle * > m_Outputs
void IgnoreUnused(Ts &&...)
Copyright (c) 2021 ARM Limited and Contributors.
NeonConvertFp16ToFp32Workload(const ConvertFp16ToFp32QueueDescriptor &descriptor, const WorkloadInfo &info)
#define ARMNN_SCOPED_PROFILING_EVENT_NEON_NAME_GUID(label)
Creates a profiling event that uses GetGuid() and GetName() from the calling class.
std::vector< ITensorHandle * > m_Inputs