From ed2a8ed7efb54ae0ec539b8735820b2c30756c44 Mon Sep 17 00:00:00 2001 From: Manuel Bottini Date: Wed, 7 Oct 2020 17:17:16 +0100 Subject: COMPMID-3715: Remove OpenCL padding - CLElementwiseOperationKernel Change-Id: I8a685d4ac5de747a0f775bd10be9c411cf394953 Signed-off-by: Manuel Bottini Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4140 Comments-Addressed: Arm Jenkins Reviewed-by: Michele Di Giorgio Reviewed-by: Giorgio Arena Reviewed-by: Sang-Hoon Park Tested-by: Arm Jenkins --- src/runtime/CL/functions/CLPReluLayer.cpp | 37 ------------------------------- 1 file changed, 37 deletions(-) (limited to 'src/runtime/CL/functions/CLPReluLayer.cpp') diff --git a/src/runtime/CL/functions/CLPReluLayer.cpp b/src/runtime/CL/functions/CLPReluLayer.cpp index e03bd13284..aaddd46071 100644 --- a/src/runtime/CL/functions/CLPReluLayer.cpp +++ b/src/runtime/CL/functions/CLPReluLayer.cpp @@ -30,43 +30,9 @@ namespace arm_compute { -namespace -{ -void configure_border_handler(const CLCompileContext &compile_context, CLFillBorderKernel &border_handler, BorderSize border_size, ITensorInfo *input1, ITensorInfo *input2, const ITensorInfo *output) -{ - if(output->dimension(0) > 1) - { - ITensorInfo *broadcasted_info = (input1->dimension(0) == 1) ? input1 : input2; - - if(broadcasted_info->dimension(0) == 1) - { - border_handler.configure(compile_context, broadcasted_info, border_size, BorderMode::REPLICATE); - } - } -} - -ITensorPack select_border_input(ITensorPack &tensors) -{ - ITensorPack pack; - if(tensors.get_tensor(TensorType::ACL_DST)->info()->dimension(0) > 1) - { - if(tensors.get_const_tensor(TensorType::ACL_SRC_1)->info()->dimension(0) == 1) - { - pack.add_tensor(TensorType::ACL_SRC, tensors.get_const_tensor(TensorType::ACL_SRC_1)); - } - else - { - pack.add_tensor(TensorType::ACL_SRC, tensors.get_const_tensor(TensorType::ACL_SRC_0)); - } - } - return pack; -} -} // namespace - namespace experimental { CLPReluLayer::CLPReluLayer() - : _border_handler() { } @@ -75,7 +41,6 @@ void CLPReluLayer::configure(const CLCompileContext &compile_context, ITensorInf auto k = arm_compute::support::cpp14::make_unique(); k->configure(compile_context, ArithmeticOperation::PRELU, input, alpha, output); _kernel = std::move(k); - configure_border_handler(compile_context, _border_handler, _kernel->border_size(), input, alpha, output); } Status CLPReluLayer::validate(const ITensorInfo *input, const ITensorInfo *alpha, const ITensorInfo *output) @@ -85,8 +50,6 @@ Status CLPReluLayer::validate(const ITensorInfo *input, const ITensorInfo *alpha void CLPReluLayer::run(ITensorPack &tensors) { - auto border_pack = select_border_input(tensors); - CLScheduler::get().enqueue_op(_border_handler, border_pack); ICLOperator::run(tensors); } } // namespace experimental -- cgit v1.2.1