Substitute NEFullyConnectedLayerReshapeWeights by NETranspose

Resolves partially: COMPMID-4359 (2/2)

Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com>
Change-Id: Id65ef04268575cc9d74be6114e82e116b8ed106d
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5378
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
diff --git a/src/runtime/NEON/functions/NEFullyConnectedLayer.cpp b/src/runtime/NEON/functions/NEFullyConnectedLayer.cpp
index 0a5318a..6ff102c 100644
--- a/src/runtime/NEON/functions/NEFullyConnectedLayer.cpp
+++ b/src/runtime/NEON/functions/NEFullyConnectedLayer.cpp
@@ -142,41 +142,6 @@
 }
 } // namespace
 
-struct NEFullyConnectedLayerReshapeWeights::Impl
-{
-    const ITensor                                    *src{ nullptr };
-    ITensor                                          *dst{ nullptr };
-    std::unique_ptr<cpu::kernels::CpuTransposeKernel> op{ nullptr };
-};
-
-NEFullyConnectedLayerReshapeWeights::NEFullyConnectedLayerReshapeWeights()
-    : _impl(std::make_unique<Impl>())
-{
-}
-
-NEFullyConnectedLayerReshapeWeights::~NEFullyConnectedLayerReshapeWeights() = default;
-
-void NEFullyConnectedLayerReshapeWeights::configure(const ITensor *input, ITensor *output)
-{
-    _impl->op = std::make_unique<cpu::kernels::CpuTransposeKernel>();
-    _impl->op->configure(input->info(), output->info());
-    _impl->src = input;
-    _impl->dst = output;
-}
-
-Status NEFullyConnectedLayerReshapeWeights::validate(const ITensorInfo *input, const ITensorInfo *output)
-{
-    return cpu::kernels::CpuTransposeKernel::validate(input, output);
-}
-
-void NEFullyConnectedLayerReshapeWeights::run()
-{
-    ITensorPack pack{};
-    pack.add_tensor(TensorType::ACL_SRC, _impl->src);
-    pack.add_tensor(TensorType::ACL_DST, _impl->dst);
-    NEScheduler::get().schedule_op(_impl->op.get(), Window::DimY, _impl->op->window(), pack);
-}
-
 NEFullyConnectedLayer::~NEFullyConnectedLayer() = default;
 
 NEFullyConnectedLayer::NEFullyConnectedLayer(std::shared_ptr<IMemoryManager> memory_manager, IWeightsManager *weights_manager)
@@ -392,7 +357,7 @@
     if(!weights_reshaped)
     {
         // Validate reshape weights kernel
-        ARM_COMPUTE_RETURN_ON_ERROR(NEFullyConnectedLayerReshapeWeights::validate(weights, &reshaped_weights));
+        ARM_COMPUTE_RETURN_ON_ERROR(NETranspose::validate(weights, &reshaped_weights));
         weights_to_use = &reshaped_weights;
     }