14 #include <arm_compute/core/Types.h> 18 using namespace armcomputetensorutils;
22 int CalcAxis(
const unsigned int axis,
const unsigned int inputDimensions)
33 std::vector<arm_compute::ITensorInfo*> aclInputPtrs;
34 arm_compute::TensorInfo aclInputInfo;
37 aclInputInfo = BuildArmComputeTensorInfo(*input);
38 aclInputPtrs.emplace_back(&aclInputInfo);
40 const arm_compute::TensorInfo aclOutputInfo = BuildArmComputeTensorInfo(output);
44 return arm_compute::CLStackLayer::validate(aclInputPtrs, aclAxis, &aclOutputInfo);
49 const arm_compute::CLCompileContext& clCompileContext)
58 std::vector<arm_compute::ICLTensor*> aclInputs;
61 arm_compute::ICLTensor& aclInput = armnn::PolymorphicPointerDowncast<IClTensorHandle>(input)->GetTensor();
62 aclInputs.emplace_back(&aclInput);
64 arm_compute::ICLTensor& output = armnn::PolymorphicPointerDowncast<IClTensorHandle>(
67 m_Layer.reset(
new arm_compute::CLStackLayer());
71 m_Layer->configure(clCompileContext, aclInputs, aclAxis, &output);
#define ARMNN_SCOPED_PROFILING_EVENT_CL_GUID(name, guid)
uint32_t m_Axis
0-based axis along which to stack the input tensors.
TensorShape m_InputShape
Required shape of all input tensors.
ClStackWorkload(const StackQueueDescriptor &descriptor, const WorkloadInfo &info, const arm_compute::CLCompileContext &clCompileContext)
arm::pipe::ProfilingGuid GetGuid() const final
Copyright (c) 2021 ARM Limited and Contributors.
void Execute() const override
LayerDescriptor m_Parameters
#define ARMNN_SCOPED_PROFILING_EVENT(backendId, name)
A StackDescriptor for the StackLayer.
arm_compute::Status ClStackWorkloadValidate(const std::vector< const TensorInfo *> &inputs, const TensorInfo &output, const StackDescriptor &descriptor)
StackQueueDescriptor m_Data
std::vector< ITensorHandle * > m_Outputs
unsigned int GetNumDimensions() const
Function that returns the tensor rank.
#define ARMNN_REPORT_PROFILING_WORKLOAD_DESC(name, desc, infos, guid)
std::enable_if_t< std::is_unsigned< Source >::value &&std::is_unsigned< Dest >::value, Dest > numeric_cast(Source source)
Contains information about TensorInfos of a layer.
std::vector< ITensorHandle * > m_Inputs