diff options
author | Teresa Charlin <teresa.charlinreyes@arm.com> | 2021-04-07 20:39:49 +0100 |
---|---|---|
committer | TeresaARM <teresa.charlinreyes@arm.com> | 2021-04-08 09:28:00 +0000 |
commit | 28fcc35fbc0b22e85d234a882a9c1f9c4faa3900 (patch) | |
tree | 2533b66ef531219f0e3cee6cbdab9b72aa6f7e29 /src | |
parent | 3b5981ce898569aafa98abdf220c73f1a80685b9 (diff) | |
download | ComputeLibrary-28fcc35fbc0b22e85d234a882a9c1f9c4faa3900.tar.gz |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/runtime/NEON/functions/NEFullyConnectedLayer.cpp | 37 |
1 files changed, 1 insertions, 36 deletions
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<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 @@ 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; } |