From 09cad7253cc75f67bf428ceef196cfbec7f8c357 Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Wed, 22 Jul 2020 12:11:20 +0100 Subject: COMPMID-3393: Minor tweaks on memory injection interface * Avoid the need to overload workspace() everytime * Remove the Layer suffix from the operators * Clean interface by removing default arguments when unsupported Signed-off-by: Georgios Pinitas Change-Id: I7710ecd485cae13e9c2d45216debbd8103bc5a0f Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3610 Tested-by: Arm Jenkins Reviewed-by: Michalis Spyrou Comments-Addressed: Arm Jenkins --- src/runtime/NEON/functions/NEPReluLayer.cpp | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'src/runtime/NEON/functions/NEPReluLayer.cpp') diff --git a/src/runtime/NEON/functions/NEPReluLayer.cpp b/src/runtime/NEON/functions/NEPReluLayer.cpp index c54c70615a..15d9fd9959 100644 --- a/src/runtime/NEON/functions/NEPReluLayer.cpp +++ b/src/runtime/NEON/functions/NEPReluLayer.cpp @@ -31,30 +31,25 @@ namespace arm_compute { namespace experimental { -void NEPReluLayer::configure(const ITensorInfo *input, const ITensorInfo *alpha, ITensorInfo *output) +void NEPRelu::configure(const ITensorInfo *input, const ITensorInfo *alpha, ITensorInfo *output) { auto k = arm_compute::support::cpp14::make_unique(); k->configure(ArithmeticOperation::PRELU, input, alpha, output); _kernel = std::move(k); } -Status NEPReluLayer::validate(const ITensorInfo *input, const ITensorInfo *alpha, const ITensorInfo *output) +Status NEPRelu::validate(const ITensorInfo *input, const ITensorInfo *alpha, const ITensorInfo *output) { return NEArithmeticOperationKernel::validate(ArithmeticOperation::PRELU, input, alpha, output); } - -MemoryRequirements NEPReluLayer::workspace() const -{ - return MemoryRequirements{}; -} } // nsamespace experimental struct NEPReluLayer::Impl { - const ITensor *src_0{ nullptr }; - const ITensor *src_1{ nullptr }; - ITensor *dst{ nullptr }; - std::unique_ptr op{ nullptr }; + const ITensor *src_0{ nullptr }; + const ITensor *src_1{ nullptr }; + ITensor *dst{ nullptr }; + std::unique_ptr op{ nullptr }; }; NEPReluLayer::NEPReluLayer() @@ -70,7 +65,7 @@ void NEPReluLayer::configure(const ITensor *input, const ITensor *alpha, ITensor _impl->src_0 = input; _impl->src_1 = alpha; _impl->dst = output; - _impl->op = arm_compute::support::cpp14::make_unique(); + _impl->op = arm_compute::support::cpp14::make_unique(); _impl->op->configure(input->info(), alpha->info(), output->info()); } @@ -83,6 +78,6 @@ void NEPReluLayer::run() Status NEPReluLayer::validate(const ITensorInfo *input, const ITensorInfo *alpha, const ITensorInfo *output) { - return experimental::NEPReluLayer::validate(input, alpha, output); + return experimental::NEPRelu::validate(input, alpha, output); } } // namespace arm_compute -- cgit v1.2.1