/external/armnn/src/backends/reference/workloads/ |
D | BatchToSpaceNd.cpp | 20 unsigned int channels, const DataLayoutIndexed& dataLayout) in Offset() argument 22 if (dataLayout.GetDataLayout() == DataLayout::NHWC) in Offset() 24 …return ((batch * shape[dataLayout.GetHeightIndex()] + height) * shape[dataLayout.GetWidthIndex()] … in Offset() 25 shape[dataLayout.GetChannelsIndex()] + channels; in Offset() 29 return ((batch * shape[dataLayout.GetChannelsIndex()] + channels) * in Offset() 30 shape[dataLayout.GetHeightIndex()] + height) * in Offset() 31 shape[dataLayout.GetWidthIndex()] + width; in Offset() 35 void BatchToSpaceNd(const DataLayoutIndexed& dataLayout, in BatchToSpaceNd() argument 52 const unsigned int channels = inputShape[dataLayout.GetChannelsIndex()]; in BatchToSpaceNd() 55 const unsigned int outputHeight = outputShape[dataLayout.GetHeightIndex()]; in BatchToSpaceNd() [all …]
|
D | SpaceToBatchNd.cpp | 20 const DataLayoutIndexed& dataLayout) in GetOffset() argument 22 if (dataLayout.GetDataLayout() == DataLayout::NHWC) in GetOffset() 24 … return ((b * shape[dataLayout.GetHeightIndex()] + h) * shape[dataLayout.GetWidthIndex()] + w) * in GetOffset() 25 shape[dataLayout.GetChannelsIndex()] + c; in GetOffset() 29 … return ((b * shape[dataLayout.GetChannelsIndex()] + c) * shape[dataLayout.GetHeightIndex()] + h) * in GetOffset() 30 shape[dataLayout.GetWidthIndex()] + w; in GetOffset() 40 DataLayoutIndexed dataLayout = params.m_DataLayout; in SpaceToBatchNd() local 45 const unsigned int channels = inputShape[dataLayout.GetChannelsIndex()]; in SpaceToBatchNd() 48 const unsigned int inputHeight = inputShape[dataLayout.GetHeightIndex()]; in SpaceToBatchNd() 49 const unsigned int inputWidth = inputShape[dataLayout.GetWidthIndex()]; in SpaceToBatchNd() [all …]
|
D | SpaceToDepth.cpp | 18 const DataLayoutIndexed& dataLayout) in GetOffset() argument 20 if (dataLayout.GetDataLayout() == armnn::DataLayout::NHWC) in GetOffset() 22 … return ((b * shape[dataLayout.GetHeightIndex()] + h) * shape[dataLayout.GetWidthIndex()] + w) * in GetOffset() 23 shape[dataLayout.GetChannelsIndex()] + c; in GetOffset() 27 … return ((b * shape[dataLayout.GetChannelsIndex()] + c) * shape[dataLayout.GetHeightIndex()] + h) * in GetOffset() 28 shape[dataLayout.GetWidthIndex()] + w; in GetOffset() 42 DataLayoutIndexed dataLayout = params.m_DataLayout; in SpaceToDepth() local 48 const unsigned int inputChannels = inputShape[dataLayout.GetChannelsIndex()]; in SpaceToDepth() 50 const unsigned int outputHeight = outputShape[dataLayout.GetHeightIndex()]; in SpaceToDepth() 51 const unsigned int outputWidth = outputShape[dataLayout.GetWidthIndex()]; in SpaceToDepth() [all …]
|
D | Resize.cpp | 69 DataLayoutIndexed dataLayout, in Resize() argument 82 const unsigned int channelCount = inputInfo.GetShape()[dataLayout.GetChannelsIndex()]; in Resize() 84 const unsigned int inputHeight = inputInfo.GetShape()[dataLayout.GetHeightIndex()]; in Resize() 85 const unsigned int inputWidth = inputInfo.GetShape()[dataLayout.GetWidthIndex()]; in Resize() 86 const unsigned int outputHeight = outputInfo.GetShape()[dataLayout.GetHeightIndex()]; in Resize() 87 const unsigned int outputWidth = outputInfo.GetShape()[dataLayout.GetWidthIndex()]; in Resize() 149 in[dataLayout.GetIndex(inputShape, n, c, y0, x0)]; in Resize() 151 in[dataLayout.GetIndex(inputShape, n, c, y0, x1)]; in Resize() 153 in[dataLayout.GetIndex(inputShape, n, c, y1, x0)]; in Resize() 155 in[dataLayout.GetIndex(inputShape, n, c, y1, x1)]; in Resize() [all …]
|
D | InstanceNorm.cpp | 25 armnnUtils::DataLayoutIndexed dataLayout(data.m_Parameters.m_DataLayout); in InstanceNorm() local 28 unsigned int inputHeight = inputShape[dataLayout.GetHeightIndex()]; in InstanceNorm() 29 unsigned int inputWidth = inputShape[dataLayout.GetWidthIndex()]; in InstanceNorm() 30 unsigned int inputChannels = inputShape[dataLayout.GetChannelsIndex()]; in InstanceNorm() 47 unsigned int index = dataLayout.GetIndex(inputShape, n, c, h, w); in InstanceNorm() 61 unsigned int index = dataLayout.GetIndex(inputShape, n, c, h, w); in InstanceNorm() 75 unsigned int index = dataLayout.GetIndex(inputShape, n, c, h, w); in InstanceNorm()
|
D | RefL2NormalizationWorkload.cpp | 37 DataLayoutIndexed dataLayout(m_Data.m_Parameters.m_DataLayout); in Execute() local 46 const int channelsIdx = armnn::numeric_cast<int>(dataLayout.GetChannelsIndex()); in Execute() 52 const int heightIdx = armnn::numeric_cast<int>(dataLayout.GetHeightIndex()); in Execute() 58 const int widthIdx = armnn::numeric_cast<int>(dataLayout.GetWidthIndex()); in Execute() 77 unsigned int inputIndex = dataLayout.GetIndex(paddedShape, n, d, h, w); in Execute() 84 unsigned int index = dataLayout.GetIndex(paddedShape, n, c, h, w); in Execute()
|
D | BatchNormImpl.cpp | 29 armnnUtils::DataLayoutIndexed dataLayout(data.m_Parameters.m_DataLayout); in BatchNormImpl() local 32 unsigned int inputHeight = inputShape[dataLayout.GetHeightIndex()]; in BatchNormImpl() 33 unsigned int inputWidth = inputShape[dataLayout.GetWidthIndex()]; in BatchNormImpl() 34 unsigned int inputChannels = inputShape[dataLayout.GetChannelsIndex()]; in BatchNormImpl() 56 unsigned int index = dataLayout.GetIndex(inputShape, n, c, h, w); in BatchNormImpl()
|
/external/armnn/src/backends/backendsCommon/test/layerTests/ |
D | ResizeTestImpl.cpp | 155 const armnn::DataLayout dataLayout) in ResizeBilinearNopTest() argument 159 testParams.m_DataLayout = dataLayout; in ResizeBilinearNopTest() 189 const armnn::DataLayout dataLayout) in SimpleResizeBilinearTest() argument 193 testParams.m_DataLayout = dataLayout; in SimpleResizeBilinearTest() 229 const armnn::DataLayout dataLayout) in ResizeBilinearSqMinTest() argument 233 testParams.m_DataLayout = dataLayout; in ResizeBilinearSqMinTest() 270 const armnn::DataLayout dataLayout) in ResizeBilinearMinTest() argument 274 testParams.m_DataLayout = dataLayout; in ResizeBilinearMinTest() 309 const armnn::DataLayout dataLayout) in ResizeBilinearMagTest() argument 313 testParams.m_DataLayout = dataLayout; in ResizeBilinearMagTest() [all …]
|
D | DepthToSpaceTestImpl.cpp | 82 armnn::DataLayout dataLayout) in DepthToSpaceTest1() argument 98 desc.m_Parameters.m_DataLayout = dataLayout; in DepthToSpaceTest1() 111 armnn::DataLayout dataLayout) in DepthToSpaceTest2() argument 148 desc.m_Parameters.m_DataLayout = dataLayout; in DepthToSpaceTest2() 161 armnn::DataLayout dataLayout) in DepthToSpaceTest3() argument 175 desc.m_Parameters.m_DataLayout = dataLayout; in DepthToSpaceTest3() 188 armnn::DataLayout dataLayout) in DepthToSpaceTest4() argument 228 desc.m_Parameters.m_DataLayout = dataLayout; in DepthToSpaceTest4() 242 armnn::DataLayout dataLayout); 248 armnn::DataLayout dataLayout); [all …]
|
D | ResizeTestImpl.hpp | 23 const armnn::DataLayout dataLayout); 30 const armnn::DataLayout dataLayout); 37 const armnn::DataLayout dataLayout); 44 const armnn::DataLayout dataLayout); 51 const armnn::DataLayout dataLayout); 59 const armnn::DataLayout dataLayout); 66 const armnn::DataLayout dataLayout); 73 const armnn::DataLayout dataLayout); 80 const armnn::DataLayout dataLayout); 87 const armnn::DataLayout dataLayout, [all …]
|
D | InstanceNormalizationTestImpl.cpp | 74 armnn::DataLayout dataLayout) in InstanceNormTest() argument 131 if (dataLayout == armnn::DataLayout::NCHW) in InstanceNormTest() 141 descriptor.m_Parameters.m_DataLayout = dataLayout; in InstanceNormTest() 159 armnn::DataLayout dataLayout) in InstanceNormTest2() argument 217 if (dataLayout == armnn::DataLayout::NCHW) in InstanceNormTest2() 227 descriptor.m_Parameters.m_DataLayout = dataLayout; in InstanceNormTest2() 246 armnn::DataLayout dataLayout) in InstanceNormFloat32Test() argument 248 …ormTest<armnn::DataType::Float32>(workloadFactory, memoryManager, tensorHandleFactory, dataLayout); in InstanceNormFloat32Test() 255 armnn::DataLayout dataLayout) in InstanceNormFloat16Test() argument 257 …ormTest<armnn::DataType::Float16>(workloadFactory, memoryManager, tensorHandleFactory, dataLayout); in InstanceNormFloat16Test() [all …]
|
D | InstanceNormalizationTestImpl.hpp | 21 armnn::DataLayout dataLayout); 27 armnn::DataLayout dataLayout); 33 armnn::DataLayout dataLayout); 39 armnn::DataLayout dataLayout);
|
D | DepthToSpaceTestImpl.hpp | 18 armnn::DataLayout dataLayout); 24 armnn::DataLayout dataLayout); 30 armnn::DataLayout dataLayout); 36 armnn::DataLayout dataLayout);
|
/external/armnn/src/backends/backendsCommon/ |
D | WorkloadUtils.cpp | 37 void ReshapeWeightsForAcl(TensorInfo& weightInfo, DataLayout dataLayout) in ReshapeWeightsForAcl() argument 41 switch (dataLayout) in ReshapeWeightsForAcl() 63 ConstTensor ReorderWeightChannelsForAcl(const ConstTensor& weightHandle, DataLayout dataLayout, voi… in ReorderWeightChannelsForAcl() argument 71 switch (dataLayout) in ReorderWeightChannelsForAcl() 110 …nsorInfo ConvertWeightTensorInfoFromArmnnToAcl(const TensorInfo& weightInfo, DataLayout dataLayout) in ConvertWeightTensorInfoFromArmnnToAcl() argument 119 if (dataLayout == DataLayout::NHWC) in ConvertWeightTensorInfoFromArmnnToAcl() 127 ReshapeWeightsForAcl(weightPermutedInfo, dataLayout); in ConvertWeightTensorInfoFromArmnnToAcl() 134 DataLayout dataLayout, in ConvertWeightTensorFromArmnnToAcl() argument 151 if (dataLayout == DataLayout::NHWC) in ConvertWeightTensorFromArmnnToAcl() 159 if (multiplier > 1 && inputChannels > 1 && dataLayout == DataLayout::NCHW) in ConvertWeightTensorFromArmnnToAcl() [all …]
|
/external/armnn/src/armnnUtils/ |
D | DataLayoutIndexed.cpp | 13 DataLayoutIndexed::DataLayoutIndexed(armnn::DataLayout dataLayout) in DataLayoutIndexed() argument 14 : m_DataLayout(dataLayout) in DataLayoutIndexed() 16 switch (dataLayout) in DataLayoutIndexed() 30 std::to_string(static_cast<int>(dataLayout))); in DataLayoutIndexed() 34 bool operator==(const DataLayout& dataLayout, const DataLayoutIndexed& indexed) in operator ==() argument 36 return dataLayout == indexed.GetDataLayout(); in operator ==() 39 bool operator==(const DataLayoutIndexed& indexed, const DataLayout& dataLayout) in operator ==() argument 41 return indexed.GetDataLayout() == dataLayout; in operator ==()
|
D | TensorUtils.cpp | 23 const DataLayout dataLayout) in GetTensorShape() argument 25 switch (dataLayout) in GetTensorShape() 33 + std::to_string(static_cast<int>(dataLayout)) + in GetTensorShape() 42 const DataLayout dataLayout, in GetTensorInfo() argument 45 switch (dataLayout) in GetTensorInfo() 53 + std::to_string(static_cast<int>(dataLayout)) + in GetTensorInfo()
|
/external/armnn/src/backends/backendsCommon/test/ |
D | ResizeEndToEndTestImpl.hpp | 44 armnn::DataLayout dataLayout, in ResizeEndToEnd() argument 56 TensorShape inputShape = MakeTensorShape(1, 1, inputHeight, inputWidth, dataLayout); in ResizeEndToEnd() 57 TensorShape outputShape = MakeTensorShape(1, 1, outputHeight, outputWidth, dataLayout); in ResizeEndToEnd() 109 descriptor.m_DataLayout = dataLayout; in ResizeEndToEnd() 112 if (dataLayout == armnn::DataLayout::NHWC) in ResizeEndToEnd() 138 armnn::DataLayout dataLayout) in ResizeBilinearEndToEnd() argument 140 ResizeEndToEnd<ArmnnType>(backends, dataLayout, armnn::ResizeMethod::Bilinear); in ResizeBilinearEndToEnd() 145 armnn::DataLayout dataLayout) in ResizeNearestNeighborEndToEnd() argument 147 ResizeEndToEnd<ArmnnType>(backends, dataLayout, armnn::ResizeMethod::NearestNeighbor); in ResizeNearestNeighborEndToEnd()
|
D | BatchToSpaceNdEndToEndTestImpl.hpp | 25 armnn::DataLayout dataLayout, in CreateBatchToSpaceNdNetwork() argument 37 batchToSpaceNdDesc.m_DataLayout = dataLayout; in CreateBatchToSpaceNdNetwork() 50 void BatchToSpaceNdEndToEnd(const std::vector<BackendId>& backends, armnn::DataLayout dataLayout) in BatchToSpaceNdEndToEnd() argument 58 const TensorShape& outputShape = (dataLayout == DataLayout::NCHW) in BatchToSpaceNdEndToEnd() 63 …t = CreateBatchToSpaceNdNetwork<ArmnnType>(inputShape, outputShape, blockShape, crops, dataLayout); in BatchToSpaceNdEndToEnd() 79 …BatchToSpaceNdComplexEndToEnd(const std::vector<BackendId>& backends, armnn::DataLayout dataLayout) in BatchToSpaceNdComplexEndToEnd() argument 86 const TensorShape& inputShape = (dataLayout == DataLayout::NCHW) in BatchToSpaceNdComplexEndToEnd() 89 const TensorShape& outputShape = (dataLayout == DataLayout::NCHW) in BatchToSpaceNdComplexEndToEnd() 94 …t = CreateBatchToSpaceNdNetwork<ArmnnType>(inputShape, outputShape, blockShape, crops, dataLayout); in BatchToSpaceNdComplexEndToEnd()
|
D | SpaceToDepthEndToEndTestImpl.cpp | 27 const armnn::DataLayout dataLayout, in CreateSpaceToDepthNetwork() argument 39 armnnUtils::DataLayoutIndexed dimensionIndices(dataLayout); in CreateSpaceToDepthNetwork() 48 spaceToDepthDesc.m_DataLayout = dataLayout; in CreateSpaceToDepthNetwork() 62 const armnn::DataLayout& dataLayout, in SpaceToDepthEndToEnd() argument 71 if (dataLayout == DataLayout::NCHW) in SpaceToDepthEndToEnd() 81 dataLayout, in SpaceToDepthEndToEnd()
|
D | TransposeConvolution2dEndToEndTestImpl.hpp | 49 armnn::DataLayout dataLayout) in TransposeConvolution2dEndToEnd() argument 66 TensorShape inputShape = MakeTensorShape(batches, channels, hInput, wInput, dataLayout); in TransposeConvolution2dEndToEnd() 67 TensorShape outputShape = MakeTensorShape(batches, channels, hOutput, wOutput, dataLayout); in TransposeConvolution2dEndToEnd() 68 TensorShape weightsShape = MakeTensorShape(batches, channels, hWeights, wWeights, dataLayout); in TransposeConvolution2dEndToEnd() 111 descriptor.m_DataLayout = dataLayout; in TransposeConvolution2dEndToEnd() 114 if (dataLayout == armnn::DataLayout::NHWC) in TransposeConvolution2dEndToEnd()
|
/external/armnn/src/armnnTfParser/test/ |
D | Convolution2d.cpp | 18 explicit Convolution2dFixture(const std::string& dataLayout, const std::string& paddingType) in Convolution2dFixture() 19 : Convolution2dFixture(dataLayout, paddingType, 1) in Convolution2dFixture() 24 explicit Convolution2dFixture(const std::string& dataLayout, const std::string& paddingType, in Convolution2dFixture() 29 if (dataLayout == "NHWC") in Convolution2dFixture() 106 m_Prototext.append(dataLayout); in Convolution2dFixture() 157 if (dataLayout == "NHWC") in Convolution2dFixture()
|
D | FusedBatchNorm.cpp | 16 explicit FusedBatchNormFixture(const std::string& dataLayout) in FusedBatchNormFixture() 147 if (dataLayout != "NHWC") in FusedBatchNormFixture() 153 m_Prototext.append(dataLayout); in FusedBatchNormFixture() 175 if (dataLayout == "NHWC") in FusedBatchNormFixture()
|
/external/armnn/src/backends/neon/test/ |
D | NeonCreateWorkloadTests.cpp | 196 static void NeonCreateBatchNormalizationWorkloadTest(DataLayout dataLayout) in NeonCreateBatchNormalizationWorkloadTest() argument 203 (factory, graph, dataLayout); in NeonCreateBatchNormalizationWorkloadTest() 210 …TensorShape inputShape = (dataLayout == DataLayout::NCHW) ? TensorShape{2, 3, 4, 4} : TensorShape… in NeonCreateBatchNormalizationWorkloadTest() 211 …TensorShape outputShape = (dataLayout == DataLayout::NCHW) ? TensorShape{2, 3, 4, 4} : TensorShape… in NeonCreateBatchNormalizationWorkloadTest() 240 static void NeonCreateConvolution2dWorkloadTest(DataLayout dataLayout = DataLayout::NCHW) in NeonCreateConvolution2dWorkloadTest() argument 246 …= CreateConvolution2dWorkloadTest<NeonConvolution2dWorkload, DataType>(factory, graph, dataLayout); in NeonCreateConvolution2dWorkloadTest() 248 …TensorShape inputShape = (dataLayout == DataLayout::NCHW) ? TensorShape{2, 3, 8, 16} : TensorShap… in NeonCreateConvolution2dWorkloadTest() 249 …TensorShape outputShape = (dataLayout == DataLayout::NCHW) ? TensorShape{2, 2, 2, 10} : TensorShap… in NeonCreateConvolution2dWorkloadTest() 308 static void NeonCreateDepthWiseConvolutionWorkloadTest(DataLayout dataLayout) in NeonCreateDepthWiseConvolutionWorkloadTest() argument 315 DataType>(factory, graph, dataLayout); in NeonCreateDepthWiseConvolutionWorkloadTest() [all …]
|
/external/armnn/src/backends/reference/test/ |
D | RefCreateWorkloadTests.cpp | 286 static void RefCreateBatchNormalizationWorkloadTest(DataLayout dataLayout) in RefCreateBatchNormalizationWorkloadTest() argument 292 … dataLayout); in RefCreateBatchNormalizationWorkloadTest() 297 switch (dataLayout) in RefCreateBatchNormalizationWorkloadTest() 402 static void RefCreateConvolution2dWorkloadTest(DataLayout dataLayout = DataLayout::NCHW) in RefCreateConvolution2dWorkloadTest() argument 407 (factory, graph, dataLayout); in RefCreateConvolution2dWorkloadTest() 409 …TensorShape inputShape = (dataLayout == DataLayout::NCHW) ? std::initializer_list<unsigned int>({… in RefCreateConvolution2dWorkloadTest() 411 …TensorShape outputShape = (dataLayout == DataLayout::NCHW) ? std::initializer_list<unsigned int>({… in RefCreateConvolution2dWorkloadTest() 432 DataLayout dataLayout = DataLayout::NHWC; in BOOST_AUTO_TEST_CASE() local 436 (factory, graph, dataLayout); in BOOST_AUTO_TEST_CASE() 438 …TensorShape inputShape = (dataLayout == DataLayout::NCHW) ? std::initializer_list<unsigned int>({… in BOOST_AUTO_TEST_CASE() [all …]
|
/external/armnn/src/backends/cl/test/ |
D | ClCreateWorkloadTests.cpp | 179 static void ClCreateBatchNormalizationWorkloadTest(DataLayout dataLayout) in ClCreateBatchNormalizationWorkloadTest() argument 186 (factory, graph, dataLayout); in ClCreateBatchNormalizationWorkloadTest() 193 switch (dataLayout) in ClCreateBatchNormalizationWorkloadTest() 266 static void ClConvolution2dWorkloadTest(DataLayout dataLayout) in ClConvolution2dWorkloadTest() argument 274 dataLayout); in ClConvolution2dWorkloadTest() 276 …TensorShape inputShape = (dataLayout == DataLayout::NCHW) ? std::initializer_list<unsigned int>({… in ClConvolution2dWorkloadTest() 278 …TensorShape outputShape = (dataLayout == DataLayout::NCHW) ? std::initializer_list<unsigned int>({… in ClConvolution2dWorkloadTest() 338 static void ClDepthwiseConvolutionWorkloadTest(DataLayout dataLayout) in ClDepthwiseConvolutionWorkloadTest() argument 345 (factory, graph, dataLayout); in ClDepthwiseConvolutionWorkloadTest() 352 …TensorShape inputShape = (dataLayout == DataLayout::NCHW) ? std::initializer_list<unsigned int>({… in ClDepthwiseConvolutionWorkloadTest() [all …]
|