21 const arm_compute::TensorInfo aclInput = armcomputetensorutils::BuildArmComputeTensorInfo(input);
22 const arm_compute::TensorInfo aclOutput = armcomputetensorutils::BuildArmComputeTensorInfo(output);
37 return arm_compute::NEStridedSlice::validate(&aclInput,
53 arm_compute::ITensor& input = boost::polymorphic_downcast<IAclTensorHandle*>(
m_Data.
m_Inputs[0])->GetTensor();
54 arm_compute::ITensor& output = boost::polymorphic_downcast<IAclTensorHandle*>(
m_Data.
m_Outputs[0])->GetTensor();
64 auto numDimensions = boost::numeric_cast<
int>(info.
m_InputTensorInfos[0].GetNumDimensions());
70 input.info()->set_data_layout(aclDataLayout);
71 output.info()->set_data_layout(aclDataLayout);
73 auto layer = std::make_unique<arm_compute::NEStridedSlice>();
75 layer->configure(&input,
83 m_Layer.reset(layer.release());
virtual void Execute() const override
#define ARMNN_SCOPED_PROFILING_EVENT_NEON(name)
std::vector< int > m_Stride
Stride values for the input that will be sliced.
unsigned int GetNumDimensions() const
LayerDescriptor m_Parameters
std::vector< int > m_Begin
Begin values for the input that will be sliced.
std::array< unsigned int, MaxNumOfTensorDimensions > Coordinates
NeonStridedSliceWorkload(const StridedSliceQueueDescriptor &descriptor, const WorkloadInfo &info)
const StridedSliceQueueDescriptor m_Data
std::vector< int > m_End
End values for the input that will be sliced.
auto SetNeonStridedSliceData(const std::vector< int > &m_begin, const std::vector< int > &m_end, const std::vector< int > &m_stride)
std::vector< TensorInfo > m_InputTensorInfos
int32_t m_BeginMask
Begin mask value. If set, then the begin is disregarded and the fullest range is used for the dimensi...
void ValidateInputsOutputs(const std::string &descName, unsigned int numExpectedIn, unsigned int numExpectedOut) const
int32_t ConvertMaskToACLFormat(int32_t mask, int32_t numDim)
std::vector< ITensorHandle * > m_Outputs
std::vector< ITensorHandle * > m_Inputs
DataLayout m_DataLayout
The data layout to be used (NCHW, NHWC).
int32_t m_ShrinkAxisMask
Shrink axis mask value. If set, the nth specification shrinks the dimensionality by 1...
int32_t m_EndMask
End mask value. If set, then the end is disregarded and the fullest range is used for the dimension...
arm_compute::Status NeonStridedSliceWorkloadValidate(const TensorInfo &input, const TensorInfo &output, const StridedSliceDescriptor &descriptor)
A StridedSliceDescriptor for the StridedSliceLayer.