23 using namespace armcomputetensorutils;
31 const arm_compute::TensorInfo aclInputInfo = BuildArmComputeTensorInfo(input, descriptor.
m_DataLayout);
32 const arm_compute::TensorInfo aclOutputInfo = BuildArmComputeTensorInfo(output, descriptor.
m_DataLayout);
33 const arm_compute::TensorInfo aclWeightsInfo = BuildArmComputeTensorInfo(weights, descriptor.
m_DataLayout);
35 arm_compute::TensorInfo aclBiasesInfo;
36 arm_compute::TensorInfo *optionalAclBiasesInfo =
nullptr;
42 "NeonTransposeConvolution2dWorkload: Bias was enabled in the descriptor but no value was supplied.");
43 aclBiasesInfo = BuildArmComputeTensorInfo(biases.
value(), descriptor.
m_DataLayout);
44 optionalAclBiasesInfo = &aclBiasesInfo;
47 arm_compute::PadStrideInfo layerInfo = BuildArmComputePadStrideInfo(descriptor);
49 return arm_compute::NEDeconvolutionLayer::validate(&aclInputInfo,
51 optionalAclBiasesInfo,
58 std::shared_ptr<arm_compute::MemoryManagerOnDemand>& memoryManager)
63 arm_compute::ITensor& input = PolymorphicDowncast<IAclTensorHandle*>(
m_Data.
m_Inputs[0])->GetTensor();
64 arm_compute::ITensor& output = PolymorphicDowncast<IAclTensorHandle*>(
m_Data.
m_Outputs[0])->GetTensor();
67 input.info()->set_data_layout(aclDataLayout);
68 output.info()->set_data_layout(aclDataLayout);
70 m_KernelTensor = std::make_unique<arm_compute::Tensor>();
75 m_BiasTensor = std::make_unique<arm_compute::Tensor>();
79 arm_compute::PadStrideInfo padStrideInfo = BuildArmComputePadStrideInfo(
m_Data.
m_Parameters);
98 m_Layer = std::make_unique<arm_compute::NEDeconvolutionLayer>(memoryManager);
99 m_Layer->configure(&input, m_KernelTensor.get(), m_BiasTensor.get(), &output, padStrideInfo);
118 void NeonTransposeConvolution2dWorkload::FreeUnusedTensors()
120 FreeTensorIfUnused(m_KernelTensor);
121 FreeTensorIfUnused(m_BiasTensor);