diff options
-rw-r--r-- | src/core/CPP/kernels/CPPPermuteKernel.cpp | 2 | ||||
-rw-r--r-- | src/runtime/NEON/functions/NEWinogradLayer.cpp | 22 | ||||
-rw-r--r-- | tests/datasets/ShapeDatasets.h | 6 | ||||
-rw-r--r-- | tests/validation/NEON/ConvolutionLayer.cpp | 2 |
4 files changed, 6 insertions, 26 deletions
diff --git a/src/core/CPP/kernels/CPPPermuteKernel.cpp b/src/core/CPP/kernels/CPPPermuteKernel.cpp index 6b3e855ad3..5c93f3e93a 100644 --- a/src/core/CPP/kernels/CPPPermuteKernel.cpp +++ b/src/core/CPP/kernels/CPPPermuteKernel.cpp @@ -65,7 +65,7 @@ inline void permute_strides(Dimensions<T> &dimensions, const PermutationVector & const auto old_dim = utility::make_array<Dimensions<T>::num_max_dimensions>(dimensions.begin(), dimensions.end()); for(unsigned int i = 0; i < perm.num_dimensions(); ++i) { - T dimension_val = (perm[i] < dimensions.num_dimensions()) ? old_dim[i] : 0; + T dimension_val = old_dim[i]; dimensions.set(perm[i], dimension_val); } } diff --git a/src/runtime/NEON/functions/NEWinogradLayer.cpp b/src/runtime/NEON/functions/NEWinogradLayer.cpp index d2d40dfcb0..215f1bfddf 100644 --- a/src/runtime/NEON/functions/NEWinogradLayer.cpp +++ b/src/runtime/NEON/functions/NEWinogradLayer.cpp @@ -109,34 +109,14 @@ void NEWinogradLayer::configure(const ITensor *input, const ITensor *weights, co _output->info()->dimension(1), _output->info()->dimension(3)), 1, _output->info()->data_type()); _output_nhwc.allocator()->init(info); - _output_nhwc.allocator()->allocate(); // Re-order a weight tensor from [Output feature map x Input feature map x Height x Width] to [Height x Width x Input feature map x Output feature map] - switch(weights->info()->num_dimensions()) - { - case 3: - { - _permute_weights.configure(weights, &_weights_hwio, PermutationVector(2U, 0U, 1U)); - break; - } - case 4: - { - _permute_weights.configure(weights, &_weights_hwio, PermutationVector(3U, 2U, 0U, 1U)); - break; - } - default: - { - ARM_COMPUTE_ERROR("Not supported."); - break; - } - } - + _permute_weights.configure(weights, &_weights_hwio, PermutationVector(3U, 2U, 0U, 1U)); _weights_hwio.allocator()->allocate(); // configure the kernel to transform the input tensor from NCHW -> NHWC _permute_input.configure(input, &_input_nhwc, PermutationVector(2U, 0U, 1U)); - _input_nhwc.allocator()->allocate(); using T = winograd::WinogradGEMM<2, 2, 3, 3>::Convolution<float, float>; diff --git a/tests/datasets/ShapeDatasets.h b/tests/datasets/ShapeDatasets.h index 733394224c..4b563708e1 100644 --- a/tests/datasets/ShapeDatasets.h +++ b/tests/datasets/ShapeDatasets.h @@ -100,7 +100,8 @@ public: Small3DShapes() : ShapeDataset("Shape", { - TensorShape{ 7U, 7U, 5U }, + TensorShape{ 1U, 7U, 7U }, + TensorShape{ 7U, 7U, 5U }, TensorShape{ 27U, 13U, 37U }, TensorShape{ 128U, 64U, 21U } }) @@ -128,7 +129,8 @@ public: Small4DShapes() : ShapeDataset("Shape", { - TensorShape{ 7U, 7U, 5U, 3U }, + TensorShape{ 1U, 7U, 1U, 3U }, + TensorShape{ 7U, 7U, 5U, 3U }, TensorShape{ 27U, 13U, 37U, 2U }, TensorShape{ 128U, 64U, 21U, 3U } }) diff --git a/tests/validation/NEON/ConvolutionLayer.cpp b/tests/validation/NEON/ConvolutionLayer.cpp index f6736785bd..ed4f160a37 100644 --- a/tests/validation/NEON/ConvolutionLayer.cpp +++ b/tests/validation/NEON/ConvolutionLayer.cpp @@ -68,7 +68,6 @@ const auto CNNDataTypes = framework::dataset::make("DataType", TEST_SUITE(NEON) -#if defined(__aarch64__) TEST_SUITE(WinogradLayer) template <typename T> using NEWinogradLayerFixture = WinogradLayerValidationFixture<Tensor, Accessor, NEWinogradLayer, T>; @@ -82,7 +81,6 @@ FIXTURE_DATA_TEST_CASE(RunSmall, NEWinogradLayerFixture<float>, framework::Datas TEST_SUITE_END() TEST_SUITE_END() -#endif /* __aarch64__ */ TEST_SUITE(ConvolutionLayer) |