13 using namespace armcomputetensorutils;
15 static constexpr arm_compute::ConvertPolicy g_AclConvertPolicy = arm_compute::ConvertPolicy::SATURATE;
20 const arm_compute::CLCompileContext& clCompileContext) :
29 m_InputProxy = std::make_unique<ICLTensorProxy>(&input);
30 m_OutputProxy = std::make_unique<ICLTensorProxy>(&output);
34 m_Layer.configure(clCompileContext, m_InputProxy.get(), m_OutputProxy.get(), g_AclConvertPolicy, 0);
48 return arm_compute::Status(arm_compute::ErrorCode::RUNTIME_ERROR,
"Input should be Float32");
52 return arm_compute::Status(arm_compute::ErrorCode::RUNTIME_ERROR,
"Output should be Float16");
55 const arm_compute::TensorInfo aclInputInfo = BuildArmComputeTensorInfo(input);
56 const arm_compute::TensorInfo aclOutputInfo = BuildArmComputeTensorInfo(output);
59 &aclInputInfo, &aclOutputInfo, g_AclConvertPolicy, 0);
97 void ClConvertFp32ToFp16Workload::Reconfigure()
101 m_InputProxy->set(&input);
102 m_OutputProxy->set(&output);