From 28fcc35fbc0b22e85d234a882a9c1f9c4faa3900 Mon Sep 17 00:00:00 2001 From: Teresa Charlin Date: Wed, 7 Apr 2021 20:39:49 +0100 Subject: Substitute NEFullyConnectedLayerReshapeWeights by NETranspose Resolves partially: COMPMID-4359 (2/2) Signed-off-by: Teresa Charlin Change-Id: Id65ef04268575cc9d74be6114e82e116b8ed106d Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5378 Tested-by: Arm Jenkins Reviewed-by: Georgios Pinitas Comments-Addressed: Arm Jenkins --- .../NEON/functions/NEFullyConnectedLayer.cpp | 37 +--------------------- 1 file changed, 1 insertion(+), 36 deletions(-) (limited to 'src') diff --git a/src/runtime/NEON/functions/NEFullyConnectedLayer.cpp b/src/runtime/NEON/functions/NEFullyConnectedLayer.cpp index 0a5318ac30..6ff102cd4a 100644 --- a/src/runtime/NEON/functions/NEFullyConnectedLayer.cpp +++ b/src/runtime/NEON/functions/NEFullyConnectedLayer.cpp @@ -142,41 +142,6 @@ Status validate_mm(const ITensorInfo *input, const ITensorInfo *weights, const I } } // namespace -struct NEFullyConnectedLayerReshapeWeights::Impl -{ - const ITensor *src{ nullptr }; - ITensor *dst{ nullptr }; - std::unique_ptr op{ nullptr }; -}; - -NEFullyConnectedLayerReshapeWeights::NEFullyConnectedLayerReshapeWeights() - : _impl(std::make_unique()) -{ -} - -NEFullyConnectedLayerReshapeWeights::~NEFullyConnectedLayerReshapeWeights() = default; - -void NEFullyConnectedLayerReshapeWeights::configure(const ITensor *input, ITensor *output) -{ - _impl->op = std::make_unique(); - _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 memory_manager, IWeightsManager *weights_manager) @@ -392,7 +357,7 @@ Status NEFullyConnectedLayer::validate(const ITensorInfo *input, const ITensorIn 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; } -- cgit v1.2.1